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
18gem install asciidoctor || echo "ERROR. Failed to install asciidoctor"
19gem install coderay || echo "ERROR. Failed to install coderay"
20cd ..
21git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
22cd boost-root
23git submodule update --init tools/build
24git submodule update --init tools/inspect
25git submodule update --init libs/config
26git submodule update --init tools/boostdep
27rm -rf libs/exception
28mkdir libs/exception
29cp -r $TRAVIS_BUILD_DIR/* libs/exception
30python tools/boostdep/depinst/depinst.py exception
31./bootstrap.sh
32./b2 headers
33cd libs/exception
34
35echo '==================================> BEFORE_SCRIPT'
36
37. $DRONE_BUILD_DIR/.drone/before-script.sh
38
39echo '==================================> SCRIPT'
40
41echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
42../../b2 test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=address,undefined cxxflags=-fno-sanitize-recover=address,undefined linkflags=-fsanitize=address,undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
43../../b2 exception-handling=off rtti=off test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${UBSAN:+cxxflags=-fsanitize=address,undefined cxxflags=-fno-sanitize-recover=address,undefined linkflags=-fsanitize=address,undefined debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}
44
45echo '==================================> AFTER_SUCCESS'
46
47. $DRONE_BUILD_DIR/.drone/after-success.sh
48