#!/bin/bash set -ex export TRAVIS_BUILD_DIR=$(pwd) export DRONE_BUILD_DIR=$(pwd) export TRAVIS_BRANCH=$DRONE_BRANCH export VCS_COMMIT_ID=$DRONE_COMMIT export GIT_COMMIT=$DRONE_COMMIT export REPO_NAME=$DRONE_REPO export PATH=~/.local/bin:/usr/local/bin:$PATH echo '==================================> BEFORE_INSTALL' . .drone/before-install.sh echo '==================================> INSTALL' GIT_FETCH_JOBS=8 BOOST_BRANCH=develop if [ "$TRAVIS_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi cd .. git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root git submodule init tools/boostdep git submodule init tools/build git submodule init tools/boost_install git submodule init libs/headers git submodule init libs/config git submodule update --jobs $GIT_FETCH_JOBS cp -r $TRAVIS_BUILD_DIR/* libs/integer python tools/boostdep/depinst/depinst.py --git_args "--jobs $GIT_FETCH_JOBS" integer ./bootstrap.sh ./b2 headers echo '==================================> BEFORE_SCRIPT' . $DRONE_BUILD_DIR/.drone/before-script.sh echo '==================================> SCRIPT' echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null` ./b2 -j $BUILD_JOBS libs/integer/test toolset=$TOOLSET cxxstd=$CXXSTD ${UBSAN:+cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined linkflags=-fsanitize=undefined define=UBSAN=1 debug-symbols=on visibility=global} ${CXXFLAGS:+cxxflags="$CXXFLAGS"} ${LINKFLAGS:+linkflags="$LINKFLAGS"} echo '==================================> AFTER_SUCCESS' . $DRONE_BUILD_DIR/.drone/after-success.sh