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 - develop 52 - master 53 54script: 55 - cd $BOOST_ROOT/libs/$SELF 56 - ci/travis/build.sh 57 58# 59# Default toolsets in Ubuntu 60# 61# trusty xenial bionic 62# 14.04 16.04 18.04 63# ------ ------ ------ 64# clang 3.4 3.8 6.0 65# gcc 4.8.2 5.3.1 7.3.0 66# 67 68anchors: 69 clang-38: &clang-38 { apt: { packages: [ "clang-3.8", 70 "libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-3.8", 71 "ubuntu-toolchain-r-test" ] } } 72 clang-4: &clang-4 { apt: { packages: [ "clang-4.0", 73 "libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-4.0", 74 "ubuntu-toolchain-r-test" ] } } 75 clang-5: &clang-5 { apt: { packages: [ "clang-5.0", 76 "libstdc++-7-dev" ], sources: [ "llvm-toolchain-xenial-5.0", 77 "ubuntu-toolchain-r-test" ] } } 78 clang-6: &clang-6 { apt: { packages: [ "clang-6.0", 79 "libc6-dbg", 80 "libc++-dev", 81 "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-6.0", 82 "ubuntu-toolchain-r-test" ] } } 83 clang-7: &clang-7 { apt: { packages: [ "clang-7", 84 "libc6-dbg", 85 "libc++-dev", 86 "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-7", 87 "ubuntu-toolchain-r-test" ] } } 88 clang-8: &clang-8 { apt: { packages: [ "clang-8", 89 "libc6-dbg", 90 "libc++-dev", 91 "libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-8", 92 "ubuntu-toolchain-r-test" ] } } 93 gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ] } } 94 gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ] } } 95 gcc-6: &gcc-6 { apt: { packages: [ "g++-6" ], sources: [ "ubuntu-toolchain-r-test" ] } } 96 gcc-7: &gcc-7 { apt: { packages: [ "g++-7" ], sources: [ "ubuntu-toolchain-r-test" ] } } 97 gcc-8: &gcc-8 { apt: { packages: [ "g++-8" ], sources: [ "ubuntu-toolchain-r-test" ] } } 98 99jobs: 100 allow_failures: 101 - env: 102 - COPY="all the environment settings from your job" 103 104 include: 105 # libstdc++ 106 - { os: "linux", env: [ "B2_TOOLSET=gcc-4.8", "B2_CXXSTD=03,11" ], addons: *gcc-48 } 107 - { os: "linux", env: [ "B2_TOOLSET=gcc-5", "B2_CXXSTD=11" ], addons: *gcc-5 } 108 - { os: "linux", env: [ "B2_TOOLSET=gcc-6", "B2_CXXSTD=11,14" ], addons: *gcc-6 } 109 - { os: "linux", env: [ "B2_TOOLSET=gcc-7", "B2_CXXSTD=11,14,17" ], addons: *gcc-7 } 110 - { os: "linux", env: [ "B2_TOOLSET=gcc-8", "B2_CXXSTD=14,17,2a" ], addons: *gcc-8 } 111 112 # clang lacks the necessary rounding support 113 # - { os: "linux", env: [ "B2_TOOLSET=clang-3.8", "B2_CXXSTD=03,11,14" ], addons: *clang-38 } 114 # - { os: "linux", env: [ "B2_TOOLSET=clang-4.0", "B2_CXXSTD=11,14" ], addons: *clang-4 } 115 # - { os: "linux", env: [ "B2_TOOLSET=clang-5.0", "B2_CXXSTD=11,14,17" ], addons: *clang-5 } 116 # - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17,2a" ], addons: *clang-6 } 117 # - { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=14,17,2a" ], addons: *clang-7 } 118 # - { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=14,17,2a" ], addons: *clang-8 } 119 120 # libc++ 121 # - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=03,11,14,17,2a", 122 # "B2_CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 } 123 # - { os: "osx" , env: [ "B2_TOOLSET=clang", "B2_CXXSTD=03,11,17" ] } 124 125 # to enable Intel ICC define INTEL_ICC_SERIAL_NUMBER and the following: 126 # - { os: "linux", env: [ "B2_TOOLSET=intel-linux", "B2_CXXSTD=11,14,17" ], addons: *gcc-7, 127 # script: cd $BOOST_ROOT/libs/$SELF && ci/travis/intelicc.sh } 128 129 - os: linux 130 env: 131 - COMMENT=codecov.io 132 - B2_CXXSTD=03,11 133 - B2_TOOLSET=gcc-8 134 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 135 addons: *gcc-8 136 script: 137 - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd 138 - cd $BOOST_ROOT/libs/$SELF 139 - ci/travis/codecov.sh 140 141 - os: linux 142 env: 143 - COMMENT=cppcheck 144 script: 145 - cd $BOOST_ROOT/libs/$SELF 146 - ci/travis/cppcheck.sh 147 148 - os: linux 149 env: 150 - COMMENT=ubsan 151 - B2_VARIANT=variant=debug 152 - B2_TOOLSET=gcc-8 153 - B2_CXXSTD=03,11,14,17,2a 154 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 155 - B2_CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined" 156 - B2_LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold" 157 - UBSAN_OPTIONS=print_stacktrace=1 158 addons: *gcc-8 159 160 # Valgrind is a documented fail case - lacks rounding support - no need to run it 161 # - os: linux 162 # - env: 163 # - - COMMENT=valgrind 164 # - - B2_TOOLSET=clang-6.0 165 # - - B2_CXXSTD=03,11,14,17,2a 166 # - - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 167 # - - B2_VARIANT=variant=debug 168 # - - B2_TESTFLAGS=testing.launcher=valgrind 169 # - - VALGRIND_OPTS=--error-exitcode=1 170 # - addons: *clang-6 171 # - script: 172 # - - cd $BOOST_ROOT/libs/$SELF 173 # - - ci/travis/valgrind.sh 174 175 #################### Jobs to run on pushes to master, develop ################### 176 177 # Coverity Scan 178 - os: linux 179 if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push)) 180 env: 181 - COMMENT="Coverity Scan" 182 - B2_TOOLSET=gcc 183 script: 184 - cd $BOOST_ROOT/libs/$SELF 185 - ci/travis/coverity.sh 186 187notifications: 188 email: 189 false 190