5
5
6
6
#
7
7
# Generic Travis CI build script for boostorg repositories
8
+ # See: https://github.com/boostorg/boost-ci
8
9
#
9
10
# Instructions for customizing this script for your library:
10
11
#
11
- # 1. Copy the ci/ directory from the same source into your project:
12
- # ci/build.sh runs the build
13
- # ci/codecov.sh is used to run a profiling build and upload results to codecov.io
14
- # ci/coverity.sh is used to run a coverity build and upload results coverity scan
15
- # 2. Customize the compilers and language levels you want. Default is C++03.
16
- # 3. Update the global B2 environment settings to your liking.
17
- # 4. If you have more than include/, src/, and test/ directories then
18
- # add them to the depinst.py line as "--include tools" for tools/ (you
19
- # can put multiple --include on the command line).
20
- # 5. If you want to enable Coverity Scan, you need to provide the environment
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
21
19
# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
22
20
# your github settings.
23
- # 6. Enable pull request builds in your boostorg/<library> account.
24
- # 7. Change the default C++ version in ci/*.sh (search for CXXSTD)
21
+ # 4. Enable pull request builds in your boostorg/<library> account.
25
22
#
26
23
# That's it - the scripts will do everything else for you.
27
24
28
- sudo : false
29
- dist : trusty
25
+ dist : xenial
30
26
language : cpp
31
27
32
28
env :
39
35
- B2_VARIANT=variant=release,debug
40
36
41
37
install :
42
- - export SELF=`basename $TRAVIS_BUILD_DIR`
43
- - cd ..
44
- - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
45
- - cd boost-root
46
- - git submodule update -q --init tools/boostdep
47
- - git submodule update -q --init tools/build
48
- - git submodule update -q --init tools/inspect
49
- - cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
50
- - export BOOST_ROOT="`pwd`"
51
- - export PATH="`pwd`":$PATH
52
- - python tools/boostdep/depinst/depinst.py $SELF --include example
53
- - ./bootstrap.sh
54
- - ./b2 headers
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
55
41
56
42
addons :
57
43
apt :
@@ -66,81 +52,131 @@ branches:
66
52
- master
67
53
68
54
script :
69
- - cd libs/$SELF
70
- - ci/build.sh
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
+
68
+ anchors :
69
+ clang-34 : &clang-34 { apt: { packages: [ "clang-3.4" ], sources: [ "llvm-toolchain-xenial-3.4" ] } }
70
+ clang-38 : &clang-38 { apt: { packages: [ "clang-3.8",
71
+ " libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-3.8",
72
+ " ubuntu-toolchain-r-test" ] } }
73
+ clang-4 : &clang-4 { apt: { packages: [ "clang-4.0",
74
+ " libstdc++-6-dev" ], sources: [ "llvm-toolchain-xenial-4.0",
75
+ " ubuntu-toolchain-r-test" ] } }
76
+ clang-5 : &clang-5 { apt: { packages: [ "clang-5.0",
77
+ " libstdc++-7-dev" ], sources: [ "llvm-toolchain-xenial-5.0",
78
+ " ubuntu-toolchain-r-test" ] } }
79
+ clang-6 : &clang-6 { apt: { packages: [ "clang-6.0",
80
+ " libc6-dbg" ,
81
+ " libc++-dev" ,
82
+ " libstdc++-8-dev" ], sources: [ "llvm-toolchain-xenial-6.0",
83
+ " ubuntu-toolchain-r-test" ] } }
84
+ gcc-44 : &gcc-44 { apt: { packages: [ "g++-4.4" ], sources: [ "ubuntu-toolchain-r-test" ] } }
85
+ gcc-46 : &gcc-46 { apt: { packages: [ "g++-4.6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
86
+ gcc-48 : &gcc-48 { apt: { packages: [ "g++-4.8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
87
+ gcc-5 : &gcc-5 { apt: { packages: [ "g++-5" ], sources: [ "ubuntu-toolchain-r-test" ] } }
88
+ gcc-6 : &gcc-6 { apt: { packages: [ "g++-6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
89
+ gcc-7 : &gcc-7 { apt: { packages: [ "g++-7" ], sources: [ "ubuntu-toolchain-r-test" ] } }
90
+ gcc-8 : &gcc-8 { apt: { packages: [ "g++-8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
71
91
72
92
jobs :
93
+ allow_failures :
94
+ - env :
95
+ - COPY="all the environment settings from your job"
96
+
73
97
include :
98
+ # libstdc++
99
+ - { os: "linux", env: [ "TOOLSET=gcc-4.4", "CXXSTD=98,0x" ], addons: *gcc-44 }
100
+ - { os: "linux", env: [ "TOOLSET=gcc-4.6", "CXXSTD=03,0x" ], addons: *gcc-46 }
101
+ - { os: "linux", env: [ "TOOLSET=gcc-4.8", "CXXSTD=03,11" ], addons: *gcc-48 }
102
+ - { os: "linux", env: [ "TOOLSET=gcc-5", "CXXSTD=03,11" ], addons: *gcc-5 }
103
+ - { os: "linux", env: [ "TOOLSET=gcc-6", "CXXSTD=03,11,14" ], addons: *gcc-6 }
104
+ - { os: "linux", env: [ "TOOLSET=gcc-7", "CXXSTD=03,11,14,17" ], addons: *gcc-7 }
105
+ - { os: "linux", env: [ "TOOLSET=gcc-8", "CXXSTD=03,11,14,17,2a" ], addons: *gcc-8 }
106
+ - { os: "linux", env: [ "TOOLSET=clang-3.4", "CXXSTD=03,11" ], addons: *clang-34 }
107
+ - { os: "linux", env: [ "TOOLSET=clang-3.8", "CXXSTD=03,11,14" ], addons: *clang-38 }
108
+ - { os: "linux", env: [ "TOOLSET=clang-4.0", "CXXSTD=03,11,14" ], addons: *clang-4 }
109
+ - { os: "linux", env: [ "TOOLSET=clang-5.0", "CXXSTD=03,11,14,17" ], addons: *clang-5 }
110
+ - { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a" ], addons: *clang-6 }
111
+
112
+ # to enable Intel ICC define INTEL_ICC_SERIAL_NUMBER and disable the following:
113
+ # - { os: "linux", env: [ "TOOLSET=intel-linux", "CXXSTD=11,14,17" ], addons: *gcc-7,
114
+ # script: cd $BOOST_ROOT/libs/$SELF && ci/travis/intelicc.sh }
115
+
116
+ # libc++
117
+ - { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a",
118
+ " CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 }
119
+ # the rvm environment on osx is taking over basic commands like "cd" and breaking things!
120
+ # - { os: "osx" , env: [ "COMMENT=libc++",
121
+ # "TOOLSET=clang", "CXXSTD=03,11,14" ] }
122
+
74
123
- os : linux
75
124
env :
76
- - COMMENT="C++03"
77
- - TOOLSET=gcc,gcc-7
78
- addons :
79
- apt :
80
- packages :
81
- - g++-7
82
- sources :
83
- - ubuntu-toolchain-r-test
125
+ - COMMENT=codecov.io
126
+ - TOOLSET=gcc-7
127
+ - DEFINES="define=BOOST_NO_STRESS_TEST=1"
128
+ addons : *gcc-7
129
+ script :
130
+ - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd
131
+ - cd $BOOST_ROOT/libs/$SELF
132
+ - ci/travis/codecov.sh
133
+
84
134
- os : linux
85
- env :
86
- - COMMENT="C++11"
87
- - TOOLSET=clang
88
- - CXXSTD=11
89
- addons :
90
- apt :
91
- packages :
92
- - g++-7
93
- sources :
94
- - ubuntu-toolchain-r-test
135
+ env :
136
+ - COMMENT=cppcheck
137
+ script :
138
+ - cd $BOOST_ROOT/libs/$SELF
139
+ - ci/travis/cppcheck.sh
140
+
95
141
- os : linux
96
- env :
97
- - COMMENT=valgrind
98
- - TOOLSET=clang
142
+ env :
143
+ - COMMENT=ubsan
99
144
- B2_VARIANT=variant=debug
100
- - TESTFLAGS=testing.launcher=valgrind
101
- addons :
102
- apt :
103
- packages :
104
- - clang-5.0
105
- - libstdc++-7-dev
106
- - valgrind
107
- sources :
108
- - llvm-toolchain-trusty-5.0
109
- - ubuntu-toolchain-r-test
145
+ - TOOLSET=gcc-8
146
+ - CXXSTD=03,11,14,17,2a
147
+ - DEFINES="define=BOOST_NO_STRESS_TEST=1"
148
+ - CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
149
+ - LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold"
150
+ - UBSAN_OPTIONS=print_stacktrace=1
151
+ addons : *gcc-8
110
152
111
153
- os : linux
112
154
env :
113
- - COMMENT=cppcheck
155
+ - COMMENT=valgrind
156
+ - TOOLSET=clang-6.0
157
+ - CXXSTD=03,11,14,17,2a
158
+ - DEFINES="define=BOOST_NO_STRESS_TEST=1"
159
+ - B2_VARIANT=variant=debug
160
+ - TESTFLAGS=testing.launcher=valgrind
161
+ - VALGRIND_OPTS=--error-exitcode=1
162
+ addons : *clang-6
114
163
script :
115
- - libs/$SELF/ci/cppcheck.sh
164
+ - cd $BOOST_ROOT/libs/$SELF
165
+ - ci/travis/valgrind.sh
166
+
167
+ # ################### Jobs to run on pushes to master, develop ###################
116
168
169
+ # Coverity Scan
117
170
- os : linux
118
- env :
119
- - COMMENT=CodeCov
171
+ if : (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
172
+ env :
173
+ - COMMENT="Coverity Scan"
120
174
- TOOLSET=gcc-7
121
- addons :
122
- apt :
123
- packages :
124
- - gcc-7
125
- - g++-7
126
- sources :
127
- - ubuntu-toolchain-r-test
175
+ addons : *gcc-7
128
176
script :
129
- - pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && cd lcov && sudo make install && which lcov && lcov --version && popd
130
- - cd libs/$SELF
131
- - ci/codecov.sh
132
-
133
- # ################### Jobs to run on every pull request ####################
134
- # osx was disabled because it is very slow to start (can delay builds by 30 minutes)
135
- # - os: osx
136
- # osx_image: xcode9
137
- # env:
138
- # - TOOLSET=clang
139
- # - CXXSTD=03,11
140
-
141
- # ################### Jobs to run on pushes to master, develop ###################
177
+ - cd $BOOST_ROOT/libs/$SELF
178
+ - ci/travis/coverity.sh
142
179
143
180
notifications :
144
181
email :
145
182
false
146
-
0 commit comments