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 PATH=~/.local/bin:/usr/local/bin:$PATH
10
11echo '==================================> BEFORE_INSTALL'
12
13. .drone/before-install.sh
14
15echo '==================================> INSTALL'
16
17BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
18cd ..
19git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
20cd boost-root
21git submodule update --init tools/build
22git submodule update --init tools/boost_install
23git submodule update --init libs/headers
24git submodule update --init libs/detail
25git submodule update --init libs/core
26git submodule update --init libs/assert
27git submodule update --init libs/type_traits
28cp -r $TRAVIS_BUILD_DIR/* libs/config
29./bootstrap.sh
30./b2 headers
31
32echo '==================================> BEFORE_SCRIPT'
33
34. $DRONE_BUILD_DIR/.drone/before-script.sh
35
36echo '==================================> SCRIPT'
37
38if [ $TEST_INTEL ]; then source ~/.bashrc; fi
39echo "using $TOOLSET : : $COMPILER : <cxxflags>$EXTRA_FLAGS <linkflags>$EXTRA_FLAGS ;" > ~/user-config.jam
40./b2 libs/config/test//print_config_info libs/config/test//print_math_info toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
41./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
42
43echo '==================================> AFTER_SUCCESS'
44
45. $DRONE_BUILD_DIR/.drone/after-success.sh
46
47