blob: 9617d2ce97e4f86d8f9a52a2e1a036da8e68b202 [file] [log] [blame]
onqtame85b1bb2016-06-26 16:41:09 +03001# this file is HEAVILY influenced by https://github.com/boostorg/hana/blob/master/.travis.yml
2
onqtame4c75fc2016-05-21 01:24:48 +03003sudo: false
4language: c++
5
6notifications:
onqtamf5169772016-09-09 18:33:13 +03007 email: false
onqtame4c75fc2016-05-21 01:24:48 +03008 # gitter
9 webhooks:
10 urls: https://webhooks.gitter.im/e/10941dd1c67e5e967706
11 on_success: change
12 on_failure: always
13git:
onqtam9f934f82016-08-02 12:42:19 +030014 depth: 500
onqtame4c75fc2016-05-21 01:24:48 +030015
16# both apt and ccache make the builds slower...
17#cache:
18# - apt
19# - ccache
20
21env:
22 global:
23# - USE_CCACHE=1
24# - CCACHE_SLOPPINESS=pch_defines,time_macros
25# - CCACHE_COMPRESS=1
26# - CCACHE_MAXSIZE=200M
27# - CCACHE_CPP2=1
28 - CMAKE_OPTIONS_GLOBAL="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
29 # Workaround for https://github.com/travis-ci/travis-ci/issues/4681
30 # "Defining the build matrix only with matrix.include leads to an additional, unwanted job"
31 matrix:
32 - TRAVIS_EMPTY_JOB_WORKAROUND=true
33
34addons:
35 coverity_scan:
36 # COVERITY_SCAN_TOKEN added as env var in travis project
37 project:
38 name: onqtam/doctest
39 notification_email: vik.kirilov@gmail.com
40 build_command_prepend: cd examples/hello_world && cmake .
41 build_command: make
42 branch_pattern: coverity_scan
43 # these apt sources will be referenced later (by using *name)
44 apt:
onqtam2c8036f2016-06-26 17:12:42 +030045 sources: &apt_sources
46 - ubuntu-toolchain-r-test
onqtam7e775f92016-11-15 02:41:10 +020047 - llvm-toolchain-precise
onqtamb382bd32016-08-01 20:53:56 +030048 - llvm-toolchain-precise-3.5
49 - llvm-toolchain-precise-3.6
50 - llvm-toolchain-precise-3.7
51 - llvm-toolchain-precise-3.8
onqtamfd62aa02016-11-15 03:00:44 +020052 - llvm-toolchain-precise-3.9
onqtam0d8997c2017-03-15 15:12:31 +020053 - llvm-toolchain-precise-4.0
onqtame4c75fc2016-05-21 01:24:48 +030054
55compiler: clang
56os: linux
57
58matrix:
59 exclude:
60 - env: TRAVIS_EMPTY_JOB_WORKAROUND=true
61
62 include:
onqtamd1737e42016-08-01 19:05:07 +030063 # coverage
64 - env: COMPILER=g++ COVERALLS_SERVICE_NAME=travis-ci
65 compiler: gcc
66 addons:
67 apt:
68 packages: ["lcov", "curl"]
69
onqtam529c92c2016-08-02 17:51:59 +030070 # GCC 4.4
71 - env: COMPILER=g++-4.4
72 compiler: gcc
73 addons: &gcc44
74 apt:
75 packages: ["g++-4.4", "valgrind", "g++-4.4-multilib", "libc6-dbg", "libc6-dbg:i386"]
76 sources: *apt_sources
77
78 # GCC 4.5
79 - env: COMPILER=g++-4.5
80 compiler: gcc
81 addons: &gcc45
82 apt:
83 packages: ["g++-4.5", "valgrind", "g++-4.5-multilib", "libc6-dbg", "libc6-dbg:i386"]
84 sources: *apt_sources
85
86 # GCC 4.6
87 - env: COMPILER=g++-4.6
88 compiler: gcc
89 addons: &gcc46
90 apt:
91 packages: [ "valgrind", "g++-4.6-multilib", "libc6-dbg", "libc6-dbg:i386"]
92 sources: *apt_sources
93
94 # GCC 4.7
95 - env: COMPILER=g++-4.7
96 compiler: gcc
97 addons: &gcc47
98 apt:
99 packages: ["g++-4.7", "valgrind", "g++-4.7-multilib", "libc6-dbg", "libc6-dbg:i386"]
100 sources: *apt_sources
101
102 # GCC 4.8
103 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
104 compiler: gcc
105 addons: &gcc48
106 apt:
107 packages: ["g++-4.8", "valgrind", "g++-4.8-multilib", "libc6-dbg", "libc6-dbg:i386"]
108 sources: *apt_sources
109
110 # GCC 4.9
onqtamb1a3de82016-10-10 22:22:00 +0300111 - env: COMPILER=g++-4.9 HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true # no ASAN_32 - errors when using ASAN_OPTIONS - probably g++ 4.9 bug
onqtam529c92c2016-08-02 17:51:59 +0300112 compiler: gcc
113 addons: &gcc49
114 apt:
115 packages: ["g++-4.9", "valgrind", "g++-4.9-multilib", "libc6-dbg", "libc6-dbg:i386"]
116 sources: *apt_sources
117
118 # GCC 5
119 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true ADDITIONAL_CXX_FLAGS=" -fuse-ld=gold"
120 compiler: gcc
121 addons: &gcc5
122 apt:
123 packages: ["g++-5", "valgrind", "g++-5-multilib", "libc6-dbg", "libc6-dbg:i386"]
124 sources: *apt_sources
125
126 # GCC 6
127 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true ADDITIONAL_CXX_FLAGS=" -fuse-ld=gold"
128 compiler: gcc
129 addons: &gcc6
130 apt:
131 packages: ["g++-6", "valgrind", "g++-6-multilib", "libc6-dbg", "libc6-dbg:i386"]
132 sources: *apt_sources
133
134 # Clang 3.4
onqtamc30ab662016-08-05 01:13:08 +0300135 - env: COMPILER=clang++ HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300136 addons: &clang
137 apt:
138 packages: [ "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
139 sources: *apt_sources
140
141 # Clang 3.5
onqtamc30ab662016-08-05 01:13:08 +0300142 - env: COMPILER=clang++-3.5 HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300143 addons: &clang35
144 apt:
145 packages: ["clang-3.5", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
146 sources: *apt_sources
147
148 # Clang 3.6
onqtamc30ab662016-08-05 01:13:08 +0300149 - env: COMPILER=clang++-3.6 HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300150 addons: &clang36
151 apt:
152 packages: ["clang-3.6", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
153 sources: *apt_sources
154
155 # Clang 3.7
onqtamc30ab662016-08-05 01:13:08 +0300156 - env: COMPILER=clang++-3.7
onqtam529c92c2016-08-02 17:51:59 +0300157 addons: &clang37
158 apt:
159 packages: ["clang-3.7", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
160 sources: *apt_sources
161
162 # Clang 3.8
onqtamc30ab662016-08-05 01:13:08 +0300163 - env: COMPILER=clang++-3.8 HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300164 addons: &clang38
165 apt:
166 packages: ["clang-3.8", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
167 sources: *apt_sources
168
onqtam44025452016-11-15 01:25:24 +0200169 # Clang 3.9
170 - env: COMPILER=clang++-3.9 HAS_ASAN_64=true HAS_UBSAN_64=true
171 addons: &clang39
172 apt:
173 packages: ["clang-3.9", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
174 sources: *apt_sources
175
onqtam0d8997c2017-03-15 15:12:31 +0200176 # Clang 4.0
177 - env: COMPILER=clang++-4.0 HAS_ASAN_64=true HAS_UBSAN_64=true
178 addons: &clang40
179 apt:
180 packages: ["clang-4.0", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
181 sources: *apt_sources
182
onqtam529c92c2016-08-02 17:51:59 +0300183 # Xcode 6.4 Clang
184 - env: COMPILER=clang++
185 osx_image: xcode6.4
186 os: osx
187
188 # Xcode 7 Clang
189 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
190 osx_image: xcode7
191 os: osx
192
193 # Xcode 7.1 Clang
194 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
195 osx_image: xcode7.1
196 os: osx
197
198 # Xcode 7.2 Clang
199 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
200 osx_image: xcode7.2
201 os: osx
202
203 # Xcode 7.3 Clang
204 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
205 osx_image: xcode7.3
206 os: osx
207
208 # Xcode 8 Clang
209 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
210 osx_image: xcode8
211 os: osx
212
onqtam3a6cb172016-11-16 16:35:30 +0200213 # Xcode 8.1 Clang
214 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
215 osx_image: xcode8.1
216 os: osx
217
onqtam14de6f52016-11-18 11:08:23 +0200218 # Xcode 8.2 Clang
219 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
220 osx_image: xcode8.2
221 os: osx
222
onqtam529c92c2016-08-02 17:51:59 +0300223 # OSX GCC 4.6
224 - env: COMPILER=g++-4.6
225 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300226 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300227 os: osx
228
229 # OSX GCC 4.7
230 - env: COMPILER=g++-4.7
231 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300232 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300233 os: osx
234
235 # OSX GCC 4.8
236 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
237 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300238 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300239 os: osx
240
241 # OSX GCC 4.9
onqtamb1a3de82016-10-10 22:22:00 +0300242 - env: COMPILER=g++-4.9 HAS_UBSAN_32=true HAS_UBSAN_64=true # no ASAN_32/ASAN_64 - errors when using ASAN_OPTIONS - probably g++ 4.9 bug
onqtam529c92c2016-08-02 17:51:59 +0300243 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300244 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300245 os: osx
246
247 # OSX GCC 5
248 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
249 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300250 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300251 os: osx
252
253 # OSX GCC 6
254 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
255 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300256 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300257 os: osx
258
259 # OSX LLVM-GCC
260 - env: COMPILER=g++
261 compiler: gcc
262 os: osx
onqtame4c75fc2016-05-21 01:24:48 +0300263
onqtam3ffb8872016-06-07 23:46:09 +0300264 allow_failures:
onqtamfd62aa02016-11-15 03:00:44 +0200265
onqtamb1a3de82016-10-10 22:22:00 +0300266 # for some reason some of these builds fail sometimes...
onqtam5cab8e92016-10-10 17:58:38 +0300267
onqtam5cab8e92016-10-10 17:58:38 +0300268 # OSX GCC 4.6
269 - env: COMPILER=g++-4.6
270 compiler: gcc
271 osx_image: beta-xcode6.3
272 os: osx
273
274 # OSX GCC 4.7
275 - env: COMPILER=g++-4.7
276 compiler: gcc
277 osx_image: beta-xcode6.3
278 os: osx
279
280 # OSX GCC 4.8
281 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
282 compiler: gcc
283 osx_image: beta-xcode6.3
onqtamc6555cf2016-09-20 15:07:28 +0300284 os: osx
onqtam3ffb8872016-06-07 23:46:09 +0300285
onqtamb1a3de82016-10-10 22:22:00 +0300286 # OSX GCC 4.9
287 - env: COMPILER=g++-4.9 HAS_UBSAN_32=true HAS_UBSAN_64=true # no ASAN_32/ASAN_64 - errors when using ASAN_OPTIONS - probably g++ 4.9 bug
288 compiler: gcc
289 osx_image: beta-xcode6.3
290 os: osx
291
292 # OSX GCC 5
293 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
294 compiler: gcc
295 osx_image: beta-xcode6.3
296 os: osx
297
298 # OSX GCC 6
299 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
300 compiler: gcc
301 osx_image: beta-xcode6.3
302 os: osx
303
onqtame4c75fc2016-05-21 01:24:48 +0300304before_install:
onqtam2c8036f2016-06-26 17:12:42 +0300305 - git submodule update --init --recursive
306
307install:
onqtam01158572016-06-28 14:29:32 +0300308 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300309 # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
310 ############################################################################
311
312 - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
313 - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
314
315 ############################################################################
316 # Install a recent CMake
317 ############################################################################
318
319 - |
320 if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
321 CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
322 mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
323 export PATH=${DEPS_DIR}/cmake/bin:${PATH}
324 fi
325
326 ############################################################################
327 # Go back to ${TRAVIS_BUILD_DIR}
328 ############################################################################
329
330 - cd ${TRAVIS_BUILD_DIR}
331
332 ############################################################################
onqtam01158572016-06-28 14:29:32 +0300333 # Install stuff with homebrew under OSX
334 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300335
onqtam23c6a342016-06-28 14:09:10 +0300336 - |
onqtame4c75fc2016-05-21 01:24:48 +0300337 if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
338 brew update
339 # brew install ccache
340 brew install valgrind
341 # cmake
342 if brew list -1 | grep -q "^cmake\$"; then
343 brew outdated cmake || brew upgrade cmake
344 else
345 brew install cmake
346 fi
347 # gcc
onqtame4c75fc2016-05-21 01:24:48 +0300348 if [[ "${COMPILER}" = "g++-4.6" ]]; then
349 brew install gcc46
350 fi
351 if [[ "${COMPILER}" = "g++-4.7" ]]; then
352 brew install gcc47
353 fi
354 if [[ "${COMPILER}" = "g++-4.8" ]]; then
onqtamb1a3de82016-10-10 22:22:00 +0300355 brew install gcc48
onqtame4c75fc2016-05-21 01:24:48 +0300356 fi
357 if [[ "${COMPILER}" = "g++-4.9" ]]; then
358 brew install gcc49
359 fi
360 if [[ "${COMPILER}" = "g++-5" ]]; then
361 brew install gcc5
362 fi
363 if [[ "${COMPILER}" = "g++-6" ]]; then
364 brew install gcc6
365 fi
366 fi
onqtame4c75fc2016-05-21 01:24:48 +0300367 - export CXX="${COMPILER}"
onqtam9f934f82016-08-02 12:42:19 +0300368# - export CXX="ccache ${COMPILER}"
onqtame4c75fc2016-05-21 01:24:48 +0300369# - ccache -s
onqtam7dec6aa2016-06-26 16:01:15 +0300370
371before_script:
372 - ${CXX} --version
onqtame4c75fc2016-05-21 01:24:48 +0300373
374script:
375 # coverage - do not continue with other build configurations after that
376 - |
377 if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then
378 cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug .
onqtam316fce22016-05-21 16:57:13 +0300379 make -k -j2 && make coveralls
onqtame4c75fc2016-05-21 01:24:48 +0300380 exit
381 fi
382
383 # initial run with options
onqtamcc350302016-06-28 14:36:28 +0300384 - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} .
onqtame4c75fc2016-05-21 01:24:48 +0300385
onqtam1586ea22016-05-21 18:02:26 +0300386 # debug x64
onqtamfa5a8522016-06-26 20:15:56 +0300387 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300388 - make clean && make -k -j2
onqtam8e44b182016-05-22 05:28:31 +0300389 # valgrind for 64bit under osx fails TOO
390 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam5cab8e92016-10-10 17:58:38 +0300391 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtam1586ea22016-05-21 18:02:26 +0300392 # release x64
onqtamfa5a8522016-06-26 20:15:56 +0300393 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300394 - make clean && make -k -j2
onqtam8e44b182016-05-22 05:28:31 +0300395 # valgrind for 64bit under osx fails TOO
396 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam5cab8e92016-10-10 17:58:38 +0300397 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300398 # debug x86
onqtamfa5a8522016-06-26 20:15:56 +0300399 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" .
onqtam316fce22016-05-21 16:57:13 +0300400 - make clean && make -k -j2
onqtame4c75fc2016-05-21 01:24:48 +0300401 # valgrind for 32bit under osx fails
402 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam1586ea22016-05-21 18:02:26 +0300403 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300404 # release x86
onqtamfa5a8522016-06-26 20:15:56 +0300405 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" .
onqtam316fce22016-05-21 16:57:13 +0300406 - make clean && make -k -j2
onqtame4c75fc2016-05-21 01:24:48 +0300407 # valgrind for 32bit under osx fails
408 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam1586ea22016-05-21 18:02:26 +0300409 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300410
411 # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers
onqtamfba7fb72016-08-22 14:18:24 +0300412 - cmake -DTEST_MODE=NORMAL .
onqtame4c75fc2016-05-21 01:24:48 +0300413 # on separate commands because when something fails I want to see which one exactly
onqtam84b19bc2016-08-26 12:40:31 +0300414 # TODO: when this http://stackoverflow.com/questions/39081183 gets resolved - add these to ASAN as well: check_initialization_order=true:strict_init_order=true
415 - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi
416 - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi
417 - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi
418 - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=address" . && make clean && make -k -j2 && ASAN_OPTIONS=verbosity=2:strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true ctest --output-on-failure ; fi
419 - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi
420 - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi
421 - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m64 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi
422 - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -g -fno-omit-frame-pointer -m32 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi
onqtame4c75fc2016-05-21 01:24:48 +0300423
onqtam5cab8e92016-10-10 17:58:38 +0300424 # test c++0x mode for warnings
425 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" -DWITH_CPP11=1 .
426 - make clean && make -k -j2
427
onqtamf63c5102017-02-25 20:00:52 +0200428 # test without rtti
429 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64 -fno-rtti" -DWITH_CPP11=0 .
430 - make clean && make -k -j2
431
onqtame4c75fc2016-05-21 01:24:48 +0300432# - ccache -s
433
onqtam2dd55282016-06-13 18:05:38 +0300434#after_script:
435# - cat compile_commands.json