1# Copyright 2016 Peter Dimov 2# Copyright 2017 - 2019 James E. King III 3# Distributed under the Boost Software License, Version 1.0. 4# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) 5 6# 7# Generic Travis CI build script for boostorg repositories 8# See: https://github.com/boostorg/boost-ci 9# 10# Instructions for customizing this script for your library: 11# 12# 1. Customize the compilers and language levels you want in the 'jobs'. 13# 2. If you have more than include/, src/, test/, example/, examples/, or 14# tools/ directories, modify your Travis CI project and add the environment 15# variable DEPINST. For example if your build uses code in "bench/" and 16# "fog/" directories, then set DEPINST to the following: 17# --include bench --include fog 18# 3. If you want to enable Coverity Scan, you need to provide the environment 19# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in 20# your github settings. 21# 4. Enable pull request builds in your boostorg/<library> account. 22# 23# That's it - the scripts will do everything else for you. 24 25dist: xenial 26language: cpp 27 28env: 29 global: 30 # see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties 31 # to use the default for a given environment, comment it out; recommend you build debug and release however.. 32 # - B2_ADDRESS_MODEL=address-model=64,32 33 # - B2_LINK=link=shared,static 34 # - B2_THREADING=threading=multi,single 35 - B2_VARIANT=variant=release,debug 36 37install: 38 - git clone https://github.com/boostorg/boost-ci.git boost-ci 39 - cp -pr boost-ci/ci boost-ci/.codecov.yml . 40 - source ci/travis/install.sh 41 42addons: 43 apt: 44 packages: 45 - binutils-gold 46 - gdb 47 - libc6-dbg 48 49branches: 50 only: 51 - master 52 - develop 53 - /bugfix\/.*/ 54 - /feature\/.*/ 55 - /fix\/.*/ 56 - /pr\/.*/ 57 58script: 59 - cd $BOOST_ROOT/libs/$SELF 60 - ci/travis/build.sh 61 62# 63# Default toolsets in Ubuntu 64# 65# trusty xenial bionic 66# 14.04 16.04 18.04 67# ------ ------ ------ 68# clang 3.4 3.8 6.0 69# gcc 4.8.2 5.3.1 7.3.0 70# 71 72anchors: 73 clang-38: &clang-38 { apt: { packages: [ "clang-3.8", 74 "libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-3.8", 75 "ubuntu-toolchain-r-test" ] } } 76 clang-4: &clang-4 { apt: { packages: [ "clang-4.0", 77 "libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-4.0", 78 "ubuntu-toolchain-r-test" ] } } 79 clang-5: &clang-5 { apt: { packages: [ "clang-5.0", 80 "libstdc++-7-dev" ], sources: [ "llvm-toolchain-xenial-5.0", 81 "ubuntu-toolchain-r-test" ] } } 82 clang-6: &clang-6 { apt: { packages: [ "clang-6.0", 83 "libc6-dbg", 84 "libc++-dev", 85 "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-6.0", 86 "ubuntu-toolchain-r-test" ] } } 87 clang-7: &clang-7 { apt: { packages: [ "clang-7", 88 "libc6-dbg", 89 "libc++-dev", 90 "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-7", 91 "ubuntu-toolchain-r-test" ] } } 92 clang-8: &clang-8 { apt: { packages: [ "clang-8", 93 "libc6-dbg", 94 "libc++-dev", 95 "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-8", 96 "ubuntu-toolchain-r-test" ] } } 97 gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ] } } 98 gcc-49: &gcc-49 { apt: { packages: [ "g++-4.9" ], sources: [ "ubuntu-toolchain-r-test" ] } } 99 gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ] } } 100 gcc-6: &gcc-6 { apt: { packages: [ "g++-6" ], sources: [ "ubuntu-toolchain-r-test" ] } } 101 gcc-7: &gcc-7 { apt: { packages: [ "g++-7" ], sources: [ "ubuntu-toolchain-r-test" ] } } 102 gcc-8: &gcc-8 { apt: { packages: [ "g++-8" ], sources: [ "ubuntu-toolchain-r-test" ] } } 103 104jobs: 105 allow_failures: 106 - env: 107 - COPY="all the environment settings from your job" 108 109 include: 110 # libstdc++ 111 - { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI 112 env: [ "B2_TOOLSET=gcc-4.8", "B2_CXXSTD=03,11" ], addons: *gcc-48 } 113 - { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI 114 env: [ "B2_TOOLSET=gcc-4.9", "B2_CXXSTD=03,11" ], addons: *gcc-49 } 115 - { os: "linux", env: [ "B2_TOOLSET=gcc-5", "B2_CXXSTD=11" ], addons: *gcc-5 } 116 - { os: "linux", env: [ "B2_TOOLSET=gcc-6", "B2_CXXSTD=11,14" ], addons: *gcc-6 } 117 - { os: "linux", env: [ "B2_TOOLSET=gcc-7", "B2_CXXSTD=11,14,17" ], addons: *gcc-7 } 118 - { os: "linux", env: [ "B2_TOOLSET=gcc-8", "B2_CXXSTD=14,17,2a" ], addons: *gcc-8 } 119 - { os: "linux", dist: "trusty", # xenial has libstdc++ from gcc 5.4.0 with newer ABI 120 env: [ "B2_TOOLSET=clang-3.8", "B2_CXXSTD=03,11,14" ], addons: *clang-38 } 121 - { os: "linux", env: [ "B2_TOOLSET=clang-4.0", "B2_CXXSTD=11,14" ], addons: *clang-4 } 122 - { os: "linux", env: [ "B2_TOOLSET=clang-5.0", "B2_CXXSTD=11,14,17" ], addons: *clang-5 } 123 - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17,2a" ], addons: *clang-6 } 124 - { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=14,17,2a" ], addons: *clang-7 } 125 - { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=14,17,2a" ], addons: *clang-8 } 126 127 # libc++ 128 - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=03,11,14,17,2a", 129 "B2_CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 } 130 - { os: "osx" , env: [ "B2_TOOLSET=clang", "B2_CXXSTD=03,11,17" ] } 131 132 # to enable Intel ICC define INTEL_ICC_SERIAL_NUMBER and the following: 133 # - { os: "linux", env: [ "B2_TOOLSET=intel-linux", "B2_CXXSTD=11,14,17" ], addons: *gcc-7, 134 # script: cd $BOOST_ROOT/libs/$SELF && ci/travis/intelicc.sh } 135 136 - os: linux 137 env: 138 - COMMENT=codecov.io 139 - B2_CXXSTD=03,11 140 - B2_TOOLSET=gcc-8 141 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 142 addons: *gcc-8 143 script: 144 - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd 145 - cd $BOOST_ROOT/libs/$SELF 146 - ci/travis/codecov.sh 147 148 - os: linux 149 env: 150 - COMMENT=cppcheck 151 script: 152 - cd $BOOST_ROOT/libs/$SELF 153 - ci/travis/cppcheck.sh 154 155 - os: linux 156 env: 157 - COMMENT=ubsan 158 - B2_VARIANT=variant=debug 159 - B2_TOOLSET=gcc-8 160 - B2_CXXSTD=03,11,14,17,2a 161 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 162 - B2_CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=all" 163 - B2_LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=all linkflags=-fuse-ld=gold" 164 - UBSAN_OPTIONS=print_stacktrace=1 165 addons: *gcc-8 166 167 - os: linux 168 env: 169 - COMMENT=valgrind 170 - B2_TOOLSET=clang-6.0 171 - B2_CXXSTD=03,11,14,17,2a 172 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 173 - B2_VARIANT=variant=debug 174 - B2_TESTFLAGS=testing.launcher=valgrind 175 - VALGRIND_OPTS=--error-exitcode=1 176 addons: *clang-6 177 script: 178 - cd $BOOST_ROOT/libs/$SELF 179 - ci/travis/valgrind.sh 180 181 - os: linux 182 env: 183 - COMMENT=cmake 184 script: 185 - cd $BOOST_ROOT 186 - mkdir __build__ && cd __build__ 187 - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=move .. 188 - ctest --output-on-failure -R boost_move 189 190 #################### Jobs to run on pushes to master, develop ################### 191 192 # Coverity Scan 193 - os: linux 194 if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push)) 195 env: 196 - COMMENT="Coverity Scan" 197 - B2_TOOLSET=clang 198 script: 199 - cd $BOOST_ROOT/libs/$SELF 200 - ci/travis/coverity.sh 201 202notifications: 203 email: 204 false 205