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 - { os: "linux", env: [ "B2_TOOLSET=clang-3.8", "B2_CXXSTD=03,11,14" ], addons: *clang-38 } 112 - { os: "linux", env: [ "B2_TOOLSET=clang-4.0", "B2_CXXSTD=11,14" ], addons: *clang-4 } 113 - { os: "linux", env: [ "B2_TOOLSET=clang-5.0", "B2_CXXSTD=11,14,17" ], addons: *clang-5 } 114 - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=14,17,2a" ], addons: *clang-6 } 115 - { os: "linux", env: [ "B2_TOOLSET=clang-7", "B2_CXXSTD=14,17,2a" ], addons: *clang-7 } 116 - { os: "linux", env: [ "B2_TOOLSET=clang-8", "B2_CXXSTD=14,17,2a" ], addons: *clang-8 } 117 118 # libc++ 119 - { os: "linux", env: [ "B2_TOOLSET=clang-6.0", "B2_CXXSTD=03,11,14,17,2a", 120 "B2_CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 } 121 - { os: "osx" , env: [ "B2_TOOLSET=clang", "B2_CXXSTD=03,11,17" ] } 122 123 # to enable Intel ICC define INTEL_ICC_SERIAL_NUMBER and the following: 124 # - { os: "linux", env: [ "B2_TOOLSET=intel-linux", "B2_CXXSTD=11,14,17" ], addons: *gcc-7, 125 # script: cd $BOOST_ROOT/libs/$SELF && ci/travis/intelicc.sh } 126 127 - os: linux 128 env: 129 - COMMENT=codecov.io 130 - B2_TOOLSET=gcc-8 131 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 132 addons: *gcc-8 133 script: 134 - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd 135 - cd $BOOST_ROOT/libs/$SELF 136 - ci/travis/codecov.sh 137 138 - os: linux 139 env: 140 - COMMENT=cppcheck 141 script: 142 - cd $BOOST_ROOT/libs/$SELF 143 - ci/travis/cppcheck.sh 144 145 - os: linux 146 env: 147 - COMMENT=ubsan 148 - B2_VARIANT=variant=debug 149 - B2_TOOLSET=gcc-8 150 - B2_CXXSTD=03,11,14,17,2a 151 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 152 - B2_CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined" 153 - B2_LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold" 154 - UBSAN_OPTIONS=print_stacktrace=1 155 addons: *gcc-8 156 157 - os: linux 158 env: 159 - COMMENT=valgrind 160 - B2_TOOLSET=clang-6.0 161 - B2_CXXSTD=03,11,14,17,2a 162 - B2_DEFINES="define=BOOST_NO_STRESS_TEST=1" 163 - B2_VARIANT=variant=debug 164 - B2_TESTFLAGS=testing.launcher=valgrind 165 - VALGRIND_OPTS=--error-exitcode=1 166 addons: *clang-6 167 script: 168 - cd $BOOST_ROOT/libs/$SELF 169 - ci/travis/valgrind.sh 170 171 #################### Jobs to run on pushes to master, develop ################### 172 173 # Coverity Scan 174 - os: linux 175 if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push)) 176 env: 177 - COMMENT="Coverity Scan" 178 - B2_TOOLSET=clang 179 script: 180 - cd $BOOST_ROOT/libs/$SELF 181 - ci/travis/coverity.sh 182 183notifications: 184 email: 185 false 186