blob: 55f83956b557abf80a77baa782bb8f4318be8de8 [file] [log] [blame]
Brian Silvermanf14e1af2018-08-04 23:36:29 -07001# Copyright (C) 2016 Daniel James.
2# Distributed under the Boost Software License, Version 1.0. (See accompanying
3# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4
5# Use Trusty to get a reasonably recent version of Boost.
6sudo: required
7dist: trusty
8
9language: c++
10
11matrix:
12 include:
13 - compiler: gcc
14 env: |
15 USER_CONFIG="using gcc : : g++-4.8 ;"
16 CXXSTD=03,11
17 - compiler: clang
18 env: |
19 USER_CONFIG="using clang : : clang++ ;"
20 CXXSTD=03,11
21 - compiler: clang
22 env: |
23 USER_CONFIG="using clang : : clang++ -D_HAS_AUTO_PTR_ETC=0 ;"
24 CXXSTD=11
25
26before_script:
27 - export BOOST_VERSION=1.67.0
28 - export BOOST_FILENAME=boost_1_67_0
29 - export BOOST_ROOT=${HOME}/boost
30 - cd ${TRAVIS_BUILD_DIR}
31 - touch Jamroot.jam
32 - cd $HOME
33 - echo $USER_CONFIG > ~/user-config.jam
34 - cat ~/user-config.jam
35 - |
36 mkdir $HOME/download
37 mkdir $HOME/extract
38 cd $HOME/download
39 if [ "$TRAVIS_EVENT_TYPE" == "cron" ]
40 then
41 if [ "$TRAVIS_BRANCH" == "master" ]
42 then
43 snapshot_branch=master
44 else
45 snapshot_branch=develop
46 fi
47 download_url=$(curl https://api.bintray.com/packages/boostorg/$snapshot_branch/snapshot/files |
48 python -c "import os.path, sys, json; x = json.load(sys.stdin); print '\n'.join(a['path'] for a in x if os.path.splitext(a['path'])[1] == '.bz2')" |
49 head -n 1 |
50 sed "s/^/http:\/\/dl.bintray.com\/boostorg\/$snapshot_branch\//")
51 else
52 download_url=https://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/${BOOST_FILENAME}.tar.bz2/download
53 fi
54 echo "Downloading ${download_url}"
55 wget -O boost.tar.bz2 $download_url
56 cd $HOME/extract
57 tar -xjf $HOME/download/boost.tar.bz2
58 mv * ${BOOST_ROOT}
59 - rm ${BOOST_ROOT}/boost/functional.hpp
60 - find ${BOOST_ROOT}/boost/functional -type f | grep -v hash | xargs -r rm
61 - cd ${BOOST_ROOT}/tools/build
62 - mkdir ${HOME}/opt
63 - ./bootstrap.sh
64 - ./b2 install --prefix=$HOME/opt
65
66script:
67 - cd ${TRAVIS_BUILD_DIR}/test
68 - ${HOME}/opt/bin/b2 -j 3 cxxstd=$CXXSTD -q include=${BOOST_ROOT} include=${TRAVIS_BUILD_DIR}/include
69 - cd ${TRAVIS_BUILD_DIR}/forward/test
70 - ${HOME}/opt/bin/b2 -j 3 cxxstd=$CXXSTD -q include=${BOOST_ROOT} include=${TRAVIS_BUILD_DIR}/include
71 - cd ${TRAVIS_BUILD_DIR}/factory/test
72 - ${HOME}/opt/bin/b2 -j 3 cxxstd=$CXXSTD -q include=${BOOST_ROOT} include=${TRAVIS_BUILD_DIR}/include
73 - cd ${TRAVIS_BUILD_DIR}/overloaded_function/test
74 - ${HOME}/opt/bin/b2 -j 3 cxxstd=$CXXSTD -q include=${BOOST_ROOT} include=${TRAVIS_BUILD_DIR}/include