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
7set -e
8export TRAVIS_BUILD_DIR=$(pwd)
9export DRONE_BUILD_DIR=$(pwd)
10export TRAVIS_BRANCH=$DRONE_BRANCH
11export VCS_COMMIT_ID=$DRONE_COMMIT
12export GIT_COMMIT=$DRONE_COMMIT
13export REPO_NAME=$DRONE_REPO
14export PATH=~/.local/bin:/usr/local/bin:$PATH
15
16if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
17
18echo '==================================> INSTALL'
19
20BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
21cd ..
22git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root
23cd boost-root
24git submodule update --init tools/build
25git submodule update --init libs/config
26git submodule update --init tools/boostdep
27cp -r $TRAVIS_BUILD_DIR/* libs/serialization
28python tools/boostdep/depinst/depinst.py serialization
29./bootstrap.sh
30./b2 headers
31
32echo '==================================> SCRIPT'
33
34echo "using $TOOLSET : : $TRAVIS_COMPILER ;" > ~/user-config.jam
35./b2 -j 3 libs/serialization/test toolset=$TOOLSET link=${LINK:-shared}
36
37fi
38