blob: 4cdc709c811c271024ac60c7c510b7ae64aeee50 [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
onqtam01e89542017-03-28 17:48:59 +0300223 # Xcode 8.3 Clang
224 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
225 osx_image: xcode8.3
226 os: osx
227
onqtam529c92c2016-08-02 17:51:59 +0300228 # OSX GCC 4.6
229 - env: COMPILER=g++-4.6
230 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300231 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300232 os: osx
233
234 # OSX GCC 4.7
235 - env: COMPILER=g++-4.7
236 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300237 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300238 os: osx
239
240 # OSX GCC 4.8
241 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
242 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300243 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300244 os: osx
245
246 # OSX GCC 4.9
onqtamb1a3de82016-10-10 22:22:00 +0300247 - 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 +0300248 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300249 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300250 os: osx
251
252 # OSX GCC 5
253 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
254 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300255 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300256 os: osx
257
258 # OSX GCC 6
259 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
260 compiler: gcc
onqtam5cab8e92016-10-10 17:58:38 +0300261 osx_image: beta-xcode6.3
onqtam529c92c2016-08-02 17:51:59 +0300262 os: osx
263
264 # OSX LLVM-GCC
265 - env: COMPILER=g++
266 compiler: gcc
267 os: osx
onqtame4c75fc2016-05-21 01:24:48 +0300268
onqtam3ffb8872016-06-07 23:46:09 +0300269 allow_failures:
onqtamfd62aa02016-11-15 03:00:44 +0200270
onqtam84015352017-03-15 20:11:07 +0200271 # https://travis-ci.org/onqtam/doctest/jobs/211341945 - Disallowing sources: llvm-toolchain-precise-4.0
272
273 # Clang 4.0
274 - env: COMPILER=clang++-4.0 HAS_ASAN_64=true HAS_UBSAN_64=true
275 addons: &clang40
276 apt:
277 packages: ["clang-4.0", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
278 sources: *apt_sources
279
onqtamb1a3de82016-10-10 22:22:00 +0300280 # for some reason some of these builds fail sometimes...
onqtam5cab8e92016-10-10 17:58:38 +0300281
onqtam5cab8e92016-10-10 17:58:38 +0300282 # OSX GCC 4.6
283 - env: COMPILER=g++-4.6
284 compiler: gcc
285 osx_image: beta-xcode6.3
286 os: osx
287
288 # OSX GCC 4.7
289 - env: COMPILER=g++-4.7
290 compiler: gcc
291 osx_image: beta-xcode6.3
292 os: osx
293
294 # OSX GCC 4.8
295 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
296 compiler: gcc
297 osx_image: beta-xcode6.3
onqtamc6555cf2016-09-20 15:07:28 +0300298 os: osx
onqtam3ffb8872016-06-07 23:46:09 +0300299
onqtamb1a3de82016-10-10 22:22:00 +0300300 # OSX GCC 4.9
301 - 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
302 compiler: gcc
303 osx_image: beta-xcode6.3
304 os: osx
305
306 # OSX GCC 5
307 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
308 compiler: gcc
309 osx_image: beta-xcode6.3
310 os: osx
311
312 # OSX GCC 6
313 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
314 compiler: gcc
315 osx_image: beta-xcode6.3
316 os: osx
317
onqtame4c75fc2016-05-21 01:24:48 +0300318before_install:
onqtam2c8036f2016-06-26 17:12:42 +0300319 - git submodule update --init --recursive
320
321install:
onqtam01158572016-06-28 14:29:32 +0300322 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300323 # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
324 ############################################################################
325
326 - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
327 - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
328
329 ############################################################################
330 # Install a recent CMake
331 ############################################################################
332
333 - |
334 if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
onqtam84015352017-03-15 20:11:07 +0200335 CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
onqtamc7aaa962016-09-10 02:16:57 +0300336 mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
337 export PATH=${DEPS_DIR}/cmake/bin:${PATH}
338 fi
339
340 ############################################################################
341 # Go back to ${TRAVIS_BUILD_DIR}
342 ############################################################################
343
344 - cd ${TRAVIS_BUILD_DIR}
345
346 ############################################################################
onqtam01158572016-06-28 14:29:32 +0300347 # Install stuff with homebrew under OSX
348 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300349
onqtam23c6a342016-06-28 14:09:10 +0300350 - |
onqtame4c75fc2016-05-21 01:24:48 +0300351 if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
352 brew update
353 # brew install ccache
354 brew install valgrind
355 # cmake
356 if brew list -1 | grep -q "^cmake\$"; then
357 brew outdated cmake || brew upgrade cmake
358 else
359 brew install cmake
360 fi
361 # gcc
onqtame4c75fc2016-05-21 01:24:48 +0300362 if [[ "${COMPILER}" = "g++-4.6" ]]; then
363 brew install gcc46
364 fi
365 if [[ "${COMPILER}" = "g++-4.7" ]]; then
366 brew install gcc47
367 fi
368 if [[ "${COMPILER}" = "g++-4.8" ]]; then
onqtamb1a3de82016-10-10 22:22:00 +0300369 brew install gcc48
onqtame4c75fc2016-05-21 01:24:48 +0300370 fi
371 if [[ "${COMPILER}" = "g++-4.9" ]]; then
372 brew install gcc49
373 fi
374 if [[ "${COMPILER}" = "g++-5" ]]; then
375 brew install gcc5
376 fi
377 if [[ "${COMPILER}" = "g++-6" ]]; then
378 brew install gcc6
379 fi
380 fi
onqtame4c75fc2016-05-21 01:24:48 +0300381 - export CXX="${COMPILER}"
onqtam9f934f82016-08-02 12:42:19 +0300382# - export CXX="ccache ${COMPILER}"
onqtame4c75fc2016-05-21 01:24:48 +0300383# - ccache -s
onqtam7dec6aa2016-06-26 16:01:15 +0300384
385before_script:
386 - ${CXX} --version
onqtame4c75fc2016-05-21 01:24:48 +0300387
388script:
389 # coverage - do not continue with other build configurations after that
390 - |
391 if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then
392 cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug .
onqtam316fce22016-05-21 16:57:13 +0300393 make -k -j2 && make coveralls
onqtame4c75fc2016-05-21 01:24:48 +0300394 exit
395 fi
396
397 # initial run with options
onqtamcc350302016-06-28 14:36:28 +0300398 - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} .
onqtame4c75fc2016-05-21 01:24:48 +0300399
onqtam1586ea22016-05-21 18:02:26 +0300400 # debug x64
onqtamfa5a8522016-06-26 20:15:56 +0300401 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300402 - make clean && make -k -j2
onqtam8e44b182016-05-22 05:28:31 +0300403 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam5cab8e92016-10-10 17:58:38 +0300404 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtam1586ea22016-05-21 18:02:26 +0300405 # release x64
onqtamfa5a8522016-06-26 20:15:56 +0300406 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300407 - make clean && make -k -j2
onqtam8e44b182016-05-22 05:28:31 +0300408 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam5cab8e92016-10-10 17:58:38 +0300409 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300410 # debug x86
onqtamfa5a8522016-06-26 20:15:56 +0300411 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" .
onqtam316fce22016-05-21 16:57:13 +0300412 - make clean && make -k -j2
onqtame4c75fc2016-05-21 01:24:48 +0300413 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam1586ea22016-05-21 18:02:26 +0300414 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300415 # release x86
onqtamfa5a8522016-06-26 20:15:56 +0300416 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" .
onqtam316fce22016-05-21 16:57:13 +0300417 - make clean && make -k -j2
onqtame4c75fc2016-05-21 01:24:48 +0300418 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam1586ea22016-05-21 18:02:26 +0300419 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300420
421 # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers
onqtamfba7fb72016-08-22 14:18:24 +0300422 - cmake -DTEST_MODE=NORMAL .
onqtame4c75fc2016-05-21 01:24:48 +0300423 # on separate commands because when something fails I want to see which one exactly
onqtam84b19bc2016-08-26 12:40:31 +0300424 # TODO: when this http://stackoverflow.com/questions/39081183 gets resolved - add these to ASAN as well: check_initialization_order=true:strict_init_order=true
425 - 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
426 - 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
427 - 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
428 - 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
429 - 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
430 - 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
431 - 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
432 - 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 +0300433
onqtam7a3ad262017-03-18 18:05:10 +0200434 # test in c++0x mode - just Debug/x64
onqtam5cab8e92016-10-10 17:58:38 +0300435 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" -DWITH_CPP11=1 .
436 - make clean && make -k -j2
onqtam7a3ad262017-03-18 18:05:10 +0200437 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtam5cab8e92016-10-10 17:58:38 +0300438
onqtam7a3ad262017-03-18 18:05:10 +0200439 # test without rtti - just Debug/x64
onqtamf63c5102017-02-25 20:00:52 +0200440 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64 -fno-rtti" -DWITH_CPP11=0 .
441 - make clean && make -k -j2
onqtam7a3ad262017-03-18 18:05:10 +0200442 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtamf63c5102017-02-25 20:00:52 +0200443
onqtam7a3ad262017-03-18 18:05:10 +0200444 # test only compilation without exceptions - just Debug/x64
onqtam2d93e042017-03-17 18:57:59 +0200445 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64 -fno-exceptions -DDOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS" -DWITH_CPP11=0 .
446 - make clean && make -k -j2
447
onqtame4c75fc2016-05-21 01:24:48 +0300448# - ccache -s
449
onqtam2dd55282016-06-13 18:05:38 +0300450#after_script:
451# - cat compile_commands.json