1#!/bin/bash 2 3set -ex 4export TRAVIS_BUILD_DIR=$(pwd) 5export DRONE_BUILD_DIR=$(pwd) 6export TRAVIS_BRANCH=$DRONE_BRANCH 7export VCS_COMMIT_ID=$DRONE_COMMIT 8export GIT_COMMIT=$DRONE_COMMIT 9export REPO_NAME=$DRONE_REPO 10export PATH=~/.local/bin:/usr/local/bin:$PATH 11 12echo '==================================> BEFORE_INSTALL' 13 14. .drone/before-install.sh 15 16echo '==================================> INSTALL' 17 18GIT_FETCH_JOBS=8 19BOOST_BRANCH=develop 20if [ "$TRAVIS_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi 21cd .. 22git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root 23cd boost-root 24git submodule init tools/boostdep 25git submodule init tools/build 26git submodule init tools/boost_install 27git submodule init libs/headers 28git submodule init libs/config 29git submodule update --jobs $GIT_FETCH_JOBS 30cp -r $TRAVIS_BUILD_DIR/* libs/integer 31python tools/boostdep/depinst/depinst.py --git_args "--jobs $GIT_FETCH_JOBS" integer 32./bootstrap.sh 33./b2 headers 34 35echo '==================================> BEFORE_SCRIPT' 36 37. $DRONE_BUILD_DIR/.drone/before-script.sh 38 39echo '==================================> SCRIPT' 40 41echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam 42BUILD_JOBS=`(nproc || sysctl -n hw.ncpu) 2> /dev/null` 43./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"} 44 45echo '==================================> AFTER_SUCCESS' 46 47. $DRONE_BUILD_DIR/.drone/after-success.sh 48