1# 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 11addons: 12 apt: 13 packages: 14 - libxml2-utils 15 - g++-multilib 16 17matrix: 18 include: 19 - compiler: gcc 20 env: | 21 label="gcc C++03/11"; 22 user_config="using gcc : : g++-4.8 --coverage -fsanitize=address ;" 23 enable_coverage=1 24 CXXSTD=03,11 25 - compiler: gcc 26 env: | 27 label="gcc 32 bit C++11"; 28 user_config="using gcc : : g++-4.8 -m32 -fsanitize=address ;" 29 CXXSTD=11 30 - compiler: clang 31 env: | 32 label="clang C++11/17"; 33 user_config="using clang : : clang++ -fsanitize=address ;" 34 CXXSTD=11,17 35 # sanitized=address not available for 32-bit clang on travis. 36 - compiler: clang 37 env: | 38 label="clang 32 bit"; 39 user_config="using clang : : clang++ -m32 ;" 40 CXXSTD=03 41 42before_install: 43 - if [ -n $enable_coverage ]; then pip install --user cpp-coveralls; fi 44 45before_script: 46 - export BOOST_VERSION=1.67.0 47 - export BOOST_FILENAME=boost_1_67_0 48 - export BOOST_ROOT=${HOME}/boost 49 - cd ${TRAVIS_BUILD_DIR} 50 - touch Jamroot.jam 51 - cd $HOME 52 - echo $user_config > ~/user-config.jam 53 - cat ~/user-config.jam 54 - | 55 # Pick snapshot to use 56 if [ "$TRAVIS_EVENT_TYPE" == "cron" ] 57 then 58 if [ "$TRAVIS_BRANCH" == "master" ] 59 then 60 snapshot=master 61 else 62 snapshot=develop 63 fi 64 else 65 #snapshot=stable 66 snapshot=master 67 fi 68 69 # Download and extract snapshot 70 echo "Downloading ${download_url}" 71 mkdir $HOME/download 72 cd $HOME/download 73 python ${TRAVIS_BUILD_DIR}/ci/download-boost-snapshot.py $snapshot 74 mv * ${BOOST_ROOT} 75 - rm -r ${BOOST_ROOT}/boost/unordered 76 - cd ${BOOST_ROOT}/tools/build 77 - mkdir ${HOME}/opt 78 - bash bootstrap.sh 79 - ./b2 install --prefix=$HOME/opt 80 81after_success: 82 if [ -n $enable_coverage ]; then coveralls -r ${TRAVIS_BUILD_DIR} -b ${TRAVIS_BUILD_DIR}/test --gcov-options '\-lp' --include include/boost/unordered/ ; fi 83 84script: 85 - cd ${TRAVIS_BUILD_DIR}/test 86 - ${HOME}/opt/bin/b2 -j 3 cxxstd=$CXXSTD -q include=${BOOST_ROOT} include=${TRAVIS_BUILD_DIR}/include 87 - xmllint --noout ${TRAVIS_BUILD_DIR}/doc/ref.xml 88