-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
248 lines (217 loc) · 7.08 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# Travis-CI build script for tlx
language: cpp
sudo: false
matrix:
include:
# gcc 4.7, Debug only
- env: CMAKE_CC="gcc-4.7" CMAKE_CXX="g++-4.7" BUILD_TYPE="Debug"
os: linux
addons: &gcc48
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- g++-4.7
# gcc 4.8, Debug only
- env: CMAKE_CC="gcc-4.8" CMAKE_CXX="g++-4.8" BUILD_TYPE="Debug"
os: linux
addons: &gcc48
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- g++-4.8
# gcc 4.9 with AddressSanitizer, Debug only
- env: CMAKE_CC="gcc-4.9" CMAKE_CXX="g++-4.9" BUILD_TYPE="Debug" COMPILER_FLAGS="-fsanitize=address"
os: linux
addons: &gcc49
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- g++-4.9
# gcc 5.x, Debug & Release
- env: CMAKE_CC="gcc-5" CMAKE_CXX="g++-5" BUILD_TYPE="Debug"
dist: trusty
os: linux
addons: &gcc5
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- g++-5
- doxygen
- lcov
- env: CMAKE_CC="gcc-5" CMAKE_CXX="g++-5" BUILD_TYPE="Release" BUILD_DOXYGEN="1"
os: linux
addons: *gcc5
- env: CMAKE_CC="gcc-5" CMAKE_CXX="g++-5" BUILD_TYPE="Release" BUILD_COVERAGE="1"
os: linux
addons: *gcc5
# 32-bit builds with gcc 5.x
- env: CMAKE_CC="gcc-5" CMAKE_CXX="g++-5" BUILD_TYPE="Debug" COMPILER_FLAGS="-m32"
os: linux
addons: &gcc5_32
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- g++-5-multilib
- linux-libc-dev:i386
- cmake
- cmake-data
- env: CMAKE_CC="gcc-5" CMAKE_CXX="g++-5" BUILD_TYPE="Release" COMPILER_FLAGS="-m32"
os: linux
addons: *gcc5_32
# gcc 6.x, Debug & Release, Debug with UndefinedBehaviorSanitizer
- env: CMAKE_CC="gcc-6" CMAKE_CXX="g++-6" BUILD_TYPE="Debug" COMPILER_FLAGS="-fopenmp"
os: linux
addons: &gcc6
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- g++-6
- doxygen
- env: CMAKE_CC="gcc-6" CMAKE_CXX="g++-6" BUILD_TYPE="Release" COMPILER_FLAGS="-fopenmp"
os: linux
addons: *gcc6
# gcc 7.x, Debug & Release, Debug with UndefinedBehaviorSanitizer
- env: CMAKE_CC="gcc-7" CMAKE_CXX="g++-7" BUILD_TYPE="Debug"
os: linux
addons: &gcc7
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- g++-7
- doxygen
- env: CMAKE_CC="gcc-7" CMAKE_CXX="g++-7" BUILD_TYPE="Release" CMAKE_ARGS="-DTLX_BUILD_SHARED_LIBS=ON -DTLX_BUILD_STATIC_LIBS=OFF"
os: linux
addons: *gcc7
# gcc 8.x, Debug & Release, Release with STL bounds checking
- env: CMAKE_CC="gcc-8" CMAKE_CXX="g++-8" BUILD_TYPE="Debug"
os: linux
addons: &gcc8
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- g++-8
- doxygen
- env: CMAKE_CC="gcc-8" CMAKE_CXX="g++-8" BUILD_TYPE="Release" COMPILER_FLAGS="-D_GLIBCXX_DEBUG"
os: linux
addons: *gcc8
# clang 3.7 without AddressSanitizer, Debug & Release
- env: CMAKE_CC="clang-3.7" CMAKE_CXX="clang++-3.7" BUILD_TYPE="Debug"
os: linux
addons: &clang37
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- george-edison55-precise-backports # cmake 3.2.3
packages:
- cmake
- cmake-data
- clang-3.7
# clang 3.7 without AddressSanitizer (there are some system-dependent LeakSanitizer errors)
- env: CMAKE_CC="clang-3.7" CMAKE_CXX="clang++-3.7" BUILD_TYPE="Release"
os: linux
addons: *clang37
# clang 4.0 without AddressSanitizer, Debug & Release
- env: CMAKE_CC="clang-4.0" CMAKE_CXX="clang++-4.0" BUILD_TYPE="Debug"
os: linux
dist: trusty
addons: &clang40
apt:
update: true
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- cmake
- cmake-data
- clang-4.0
# clang 4.0 without AddressSanitizer (there are some system-dependent LeakSanitizer errors)
- env: CMAKE_CC="clang-4.0" CMAKE_CXX="clang++-4.0" BUILD_TYPE="Release"
os: linux
dist: trusty
addons: *clang40
# clang 3.7 on MacOSX without AddressSanitizer, Debug & Release, not FULL_BUILD
- env: CMAKE_CC="clang" CMAKE_CXX="clang++" BUILD_TYPE="Debug"
os: osx
- env: CMAKE_CC="clang" CMAKE_CXX="clang++" BUILD_TYPE="Release"
os: osx
env:
global:
# LeakSanitizer suppressions
- LSAN_OPTIONS="suppressions=$PWD/misc/leak_sanitizer.supp"
# die on ThreadSanitizer errors
- TSAN_OPTIONS="halt_on_error=1"
before_script:
# print out some version numbers
- $CMAKE_CXX --version
- cmake --version
# enable -Werror on all ci builds
- COMPILER_FLAGS="$COMPILER_FLAGS -Werror"
# gcov coverage
- if [ -n "$BUILD_COVERAGE" -a -n "$COVERALLS_REPO_TOKEN" ]; then
pip install --user cpp-coveralls;
CMAKE_ARGS="$CMAKE_ARGS -DTLX_USE_GCOV=ON";
fi
# more tests in Release mode
- MORE_TESTS=OFF
- if [[ "$BUILD_TYPE" == "Release" ]]; then MORE_TESTS=ON; fi
# configure
- mkdir build
- cd build
- cmake
-DCMAKE_BUILD_TYPE="$BUILD_TYPE"
-DCMAKE_C_COMPILER="$CMAKE_CC" -DCMAKE_CXX_COMPILER="$CMAKE_CXX"
-DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS"
-DTLX_BUILD_TESTS=ON -DTLX_TRY_COMPILE_HEADERS=ON
-DTLX_MORE_TESTS="$MORE_TESTS"
$CMAKE_ARGS ..
script:
- make -j2 && ctest -V
# Generate and deploy documentation
after_success:
- cd $TRAVIS_BUILD_DIR
- if [ -n "$BUILD_DOXYGEN" -a "$TRAVIS_REPO_SLUG" == "tlx/tlx" -a "$TRAVIS_BRANCH" == "master" ]; then
./misc/mk-doxygen-travis.sh;
fi
- if [ -n "$BUILD_COVERAGE" -a -n "$COVERALLS_REPO_TOKEN" ]; then
coveralls --exclude tests --gcov-options '\-lp';
fi