blob: e94691de66da339f9f06b5a3834ed77a0198c9d9 [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
onqtam84015352017-03-15 20:11:07 +0200266 # https://travis-ci.org/onqtam/doctest/jobs/211341945 - Disallowing sources: llvm-toolchain-precise-4.0
267
268 # Clang 4.0
269 - env: COMPILER=clang++-4.0 HAS_ASAN_64=true HAS_UBSAN_64=true
270 addons: &clang40
271 apt:
272 packages: ["clang-4.0", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
273 sources: *apt_sources
274
onqtamb1a3de82016-10-10 22:22:00 +0300275 # for some reason some of these builds fail sometimes...
onqtam5cab8e92016-10-10 17:58:38 +0300276
onqtam5cab8e92016-10-10 17:58:38 +0300277 # OSX GCC 4.6
278 - env: COMPILER=g++-4.6
279 compiler: gcc
280 osx_image: beta-xcode6.3
281 os: osx
282
283 # OSX GCC 4.7
284 - env: COMPILER=g++-4.7
285 compiler: gcc
286 osx_image: beta-xcode6.3
287 os: osx
288
289 # OSX GCC 4.8
290 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
291 compiler: gcc
292 osx_image: beta-xcode6.3
onqtamc6555cf2016-09-20 15:07:28 +0300293 os: osx
onqtam3ffb8872016-06-07 23:46:09 +0300294
onqtamb1a3de82016-10-10 22:22:00 +0300295 # OSX GCC 4.9
296 - 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
297 compiler: gcc
298 osx_image: beta-xcode6.3
299 os: osx
300
301 # OSX GCC 5
302 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
303 compiler: gcc
304 osx_image: beta-xcode6.3
305 os: osx
306
307 # OSX GCC 6
308 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
309 compiler: gcc
310 osx_image: beta-xcode6.3
311 os: osx
312
onqtame4c75fc2016-05-21 01:24:48 +0300313before_install:
onqtam2c8036f2016-06-26 17:12:42 +0300314 - git submodule update --init --recursive
315
316install:
onqtam01158572016-06-28 14:29:32 +0300317 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300318 # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
319 ############################################################################
320
321 - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
322 - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
323
324 ############################################################################
325 # Install a recent CMake
326 ############################################################################
327
328 - |
329 if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
onqtam84015352017-03-15 20:11:07 +0200330 CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
onqtamc7aaa962016-09-10 02:16:57 +0300331 mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
332 export PATH=${DEPS_DIR}/cmake/bin:${PATH}
333 fi
334
335 ############################################################################
336 # Go back to ${TRAVIS_BUILD_DIR}
337 ############################################################################
338
339 - cd ${TRAVIS_BUILD_DIR}
340
341 ############################################################################
onqtam01158572016-06-28 14:29:32 +0300342 # Install stuff with homebrew under OSX
343 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300344
onqtam23c6a342016-06-28 14:09:10 +0300345 - |
onqtame4c75fc2016-05-21 01:24:48 +0300346 if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
347 brew update
348 # brew install ccache
349 brew install valgrind
350 # cmake
351 if brew list -1 | grep -q "^cmake\$"; then
352 brew outdated cmake || brew upgrade cmake
353 else
354 brew install cmake
355 fi
356 # gcc
onqtame4c75fc2016-05-21 01:24:48 +0300357 if [[ "${COMPILER}" = "g++-4.6" ]]; then
358 brew install gcc46
359 fi
360 if [[ "${COMPILER}" = "g++-4.7" ]]; then
361 brew install gcc47
362 fi
363 if [[ "${COMPILER}" = "g++-4.8" ]]; then
onqtamb1a3de82016-10-10 22:22:00 +0300364 brew install gcc48
onqtame4c75fc2016-05-21 01:24:48 +0300365 fi
366 if [[ "${COMPILER}" = "g++-4.9" ]]; then
367 brew install gcc49
368 fi
369 if [[ "${COMPILER}" = "g++-5" ]]; then
370 brew install gcc5
371 fi
372 if [[ "${COMPILER}" = "g++-6" ]]; then
373 brew install gcc6
374 fi
375 fi
onqtame4c75fc2016-05-21 01:24:48 +0300376 - export CXX="${COMPILER}"
onqtam9f934f82016-08-02 12:42:19 +0300377# - export CXX="ccache ${COMPILER}"
onqtame4c75fc2016-05-21 01:24:48 +0300378# - ccache -s
onqtam7dec6aa2016-06-26 16:01:15 +0300379
380before_script:
381 - ${CXX} --version
onqtame4c75fc2016-05-21 01:24:48 +0300382
383script:
384 # coverage - do not continue with other build configurations after that
385 - |
386 if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then
387 cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug .
onqtam316fce22016-05-21 16:57:13 +0300388 make -k -j2 && make coveralls
onqtame4c75fc2016-05-21 01:24:48 +0300389 exit
390 fi
391
392 # initial run with options
onqtamcc350302016-06-28 14:36:28 +0300393 - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} .
onqtame4c75fc2016-05-21 01:24:48 +0300394
onqtam1586ea22016-05-21 18:02:26 +0300395 # debug x64
onqtamfa5a8522016-06-26 20:15:56 +0300396 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300397 - make clean && make -k -j2
onqtam8e44b182016-05-22 05:28:31 +0300398 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam5cab8e92016-10-10 17:58:38 +0300399 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtam1586ea22016-05-21 18:02:26 +0300400 # release x64
onqtamfa5a8522016-06-26 20:15:56 +0300401 - cmake -DCMAKE_BUILD_TYPE=Release -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
onqtame4c75fc2016-05-21 01:24:48 +0300405 # debug x86
onqtamfa5a8522016-06-26 20:15:56 +0300406 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" .
onqtam316fce22016-05-21 16:57:13 +0300407 - make clean && make -k -j2
onqtame4c75fc2016-05-21 01:24:48 +0300408 - 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 # release x86
onqtamfa5a8522016-06-26 20:15:56 +0300411 - cmake -DCMAKE_BUILD_TYPE=Release -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
416 # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers
onqtamfba7fb72016-08-22 14:18:24 +0300417 - cmake -DTEST_MODE=NORMAL .
onqtame4c75fc2016-05-21 01:24:48 +0300418 # on separate commands because when something fails I want to see which one exactly
onqtam84b19bc2016-08-26 12:40:31 +0300419 # TODO: when this http://stackoverflow.com/questions/39081183 gets resolved - add these to ASAN as well: check_initialization_order=true:strict_init_order=true
420 - 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
421 - 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
422 - 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
423 - 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
424 - 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
425 - 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
426 - 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
427 - 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 +0300428
onqtam7a3ad262017-03-18 18:05:10 +0200429 # test in c++0x mode - just Debug/x64
onqtam5cab8e92016-10-10 17:58:38 +0300430 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" -DWITH_CPP11=1 .
431 - make clean && make -k -j2
onqtam7a3ad262017-03-18 18:05:10 +0200432 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtam5cab8e92016-10-10 17:58:38 +0300433
onqtam7a3ad262017-03-18 18:05:10 +0200434 # test without rtti - just Debug/x64
onqtamf63c5102017-02-25 20:00:52 +0200435 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64 -fno-rtti" -DWITH_CPP11=0 .
436 - make clean && make -k -j2
onqtam7a3ad262017-03-18 18:05:10 +0200437 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtamf63c5102017-02-25 20:00:52 +0200438
onqtam7a3ad262017-03-18 18:05:10 +0200439 # test only compilation without exceptions - just Debug/x64
onqtam2d93e042017-03-17 18:57:59 +0200440 - 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 .
441 - make clean && make -k -j2
442
onqtame4c75fc2016-05-21 01:24:48 +0300443# - ccache -s
444
onqtam2dd55282016-06-13 18:05:38 +0300445#after_script:
446# - cat compile_commands.json