|
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# Copyright 2020 Rene Rivera, Sam Darwin |
| 4 | +# Distributed under the Boost Software License, Version 1.0. |
| 5 | +# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt) |
| 6 | + |
| 7 | +set -e |
| 8 | +export TRAVIS_BUILD_DIR=$(pwd) |
| 9 | +export DRONE_BUILD_DIR=$(pwd) |
| 10 | +export TRAVIS_BRANCH=$DRONE_BRANCH |
| 11 | +export VCS_COMMIT_ID=$DRONE_COMMIT |
| 12 | +export GIT_COMMIT=$DRONE_COMMIT |
| 13 | +export REPO_NAME=$DRONE_REPO |
| 14 | +export PATH=~/.local/bin:/usr/local/bin:$PATH |
| 15 | + |
| 16 | +if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then |
| 17 | + |
| 18 | +echo '==================================> INSTALL' |
| 19 | + |
| 20 | +export SELF=`basename $REPO_NAME` |
| 21 | +cd .. |
| 22 | +git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root |
| 23 | +cd boost-root |
| 24 | +git submodule update -q --init tools/boostdep |
| 25 | +git submodule update -q --init tools/build |
| 26 | +git submodule update -q --init tools/inspect |
| 27 | +cp -r $TRAVIS_BUILD_DIR/* libs/$SELF |
| 28 | +export BOOST_ROOT="`pwd`" |
| 29 | +export PATH="`pwd`":$PATH |
| 30 | +python tools/boostdep/depinst/depinst.py $SELF --include example |
| 31 | +./bootstrap.sh |
| 32 | +./b2 headers |
| 33 | + |
| 34 | +echo '==================================> SCRIPT' |
| 35 | + |
| 36 | +cd libs/$SELF |
| 37 | +ci/build.sh |
| 38 | + |
| 39 | +elif [ "$DRONE_JOB_BUILDTYPE" == "15edef0d20-06e41ec903" ]; then |
| 40 | + |
| 41 | +echo '==================================> INSTALL' |
| 42 | + |
| 43 | +export SELF=`basename $REPO_NAME` |
| 44 | +cd .. |
| 45 | +git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root |
| 46 | +cd boost-root |
| 47 | +git submodule update -q --init tools/boostdep |
| 48 | +git submodule update -q --init tools/build |
| 49 | +git submodule update -q --init tools/inspect |
| 50 | +cp -r $TRAVIS_BUILD_DIR/* libs/$SELF |
| 51 | +export BOOST_ROOT="`pwd`" |
| 52 | +export PATH="`pwd`":$PATH |
| 53 | +python tools/boostdep/depinst/depinst.py $SELF --include example |
| 54 | +./bootstrap.sh |
| 55 | +./b2 headers |
| 56 | + |
| 57 | +echo '==================================> SCRIPT' |
| 58 | + |
| 59 | +libs/$SELF/ci/cppcheck.sh |
| 60 | + |
| 61 | +elif [ "$DRONE_JOB_BUILDTYPE" == "15edef0d20-35de83136e" ]; then |
| 62 | + |
| 63 | +echo '==================================> INSTALL' |
| 64 | + |
| 65 | +export SELF=`basename $REPO_NAME` |
| 66 | +cd .. |
| 67 | +git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root |
| 68 | +cd boost-root |
| 69 | +git submodule update -q --init tools/boostdep |
| 70 | +git submodule update -q --init tools/build |
| 71 | +git submodule update -q --init tools/inspect |
| 72 | +cp -r $TRAVIS_BUILD_DIR/* libs/$SELF |
| 73 | +export BOOST_ROOT="`pwd`" |
| 74 | +export PATH="`pwd`":$PATH |
| 75 | +python tools/boostdep/depinst/depinst.py $SELF --include example |
| 76 | +./bootstrap.sh |
| 77 | +./b2 headers |
| 78 | + |
| 79 | +echo '==================================> SCRIPT' |
| 80 | + |
| 81 | +pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && cd lcov && sudo make install && which lcov && lcov --version && popd |
| 82 | +cd libs/$SELF |
| 83 | +ci/codecov.sh |
| 84 | + |
| 85 | +fi |
0 commit comments