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