• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
12if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
13
14echo '==================================> INSTALL'
15
16BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
17cd ..
18git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
19cd boost-root
20git submodule update --init tools/boostdep
21cp -r $TRAVIS_BUILD_DIR/* libs/preprocessor
22python tools/boostdep/depinst/depinst.py preprocessor
23./bootstrap.sh
24./b2 headers
25
26echo '==================================> SCRIPT'
27
28echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
29./b2 libs/preprocessor/test -j 3 toolset=$TOOLSET cxxstd=$CXXSTD $ADDRMD
30
31elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-install-script" ]; then
32
33echo '==================================> INSTALL'
34
35BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
36cd ..
37git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
38cd boost-root
39git submodule update --init tools/boostdep
40cp -r $TRAVIS_BUILD_DIR/* libs/preprocessor
41python tools/boostdep/depinst/depinst.py preprocessor
42./bootstrap.sh
43./b2 headers
44
45echo '==================================> SCRIPT'
46
47mkdir __build__ && cd __build__
48cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor -DCMAKE_INSTALL_PREFIX=~/.local ..
49cmake --build . --target install
50cd ../libs/preprocessor/test/cmake_install_test && mkdir __build__ && cd __build__
51cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
52cmake --build .
53cmake --build . --target check
54
55elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-subdir-script" ]; then
56
57echo '==================================> INSTALL'
58
59true
60
61echo '==================================> SCRIPT'
62
63cd test/cmake_subdir_test && mkdir __build__ && cd __build__
64cmake ..
65cmake --build .
66cmake --build . --target check
67
68elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-test-script" ]; then
69
70echo '==================================> INSTALL'
71
72BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
73cd ..
74git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
75cd boost-root
76git submodule update --init tools/boostdep
77cp -r $TRAVIS_BUILD_DIR/* libs/preprocessor
78python tools/boostdep/depinst/depinst.py preprocessor
79./bootstrap.sh
80./b2 headers
81
82echo '==================================> SCRIPT'
83
84mkdir __build__ && cd __build__
85cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor ..
86ctest --output-on-failure -R boost_preprocessor
87
88fi
89