blob: 20cb2289b0a3cf29cec795ee0abbce1c404d6357 [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
onqtam529c92c2016-08-02 17:51:59 +0300188 # Xcode 7.3 Clang
189 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
190 osx_image: xcode7.3
191 os: osx
192
193 # Xcode 8 Clang
194 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
195 osx_image: xcode8
196 os: osx
197
onqtam3a6cb172016-11-16 16:35:30 +0200198 # Xcode 8.1 Clang
199 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
200 osx_image: xcode8.1
201 os: osx
202
onqtam14de6f52016-11-18 11:08:23 +0200203 # Xcode 8.2 Clang
204 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
205 osx_image: xcode8.2
206 os: osx
207
onqtam01e89542017-03-28 17:48:59 +0300208 # Xcode 8.3 Clang
209 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
210 osx_image: xcode8.3
211 os: osx
212
onqtam529c92c2016-08-02 17:51:59 +0300213 # OSX GCC 4.6
214 - env: COMPILER=g++-4.6
215 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300216 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300217 os: osx
218
219 # OSX GCC 4.7
220 - env: COMPILER=g++-4.7
221 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300222 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300223 os: osx
224
225 # OSX GCC 4.8
226 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
227 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300228 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300229 os: osx
230
231 # OSX GCC 4.9
onqtamb1a3de82016-10-10 22:22:00 +0300232 - 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 +0300233 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300234 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300235 os: osx
236
237 # OSX GCC 5
238 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
239 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300240 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300241 os: osx
242
243 # OSX GCC 6
244 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
245 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300246 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300247 os: osx
248
249 # OSX LLVM-GCC
250 - env: COMPILER=g++
251 compiler: gcc
252 os: osx
onqtame4c75fc2016-05-21 01:24:48 +0300253
onqtam3ffb8872016-06-07 23:46:09 +0300254 allow_failures:
onqtamfd62aa02016-11-15 03:00:44 +0200255
onqtam84015352017-03-15 20:11:07 +0200256 # https://travis-ci.org/onqtam/doctest/jobs/211341945 - Disallowing sources: llvm-toolchain-precise-4.0
257
258 # Clang 4.0
259 - env: COMPILER=clang++-4.0 HAS_ASAN_64=true HAS_UBSAN_64=true
260 addons: &clang40
261 apt:
262 packages: ["clang-4.0", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
263 sources: *apt_sources
264
onqtamb1a3de82016-10-10 22:22:00 +0300265 # for some reason some of these builds fail sometimes...
onqtam5cab8e92016-10-10 17:58:38 +0300266
onqtam5cab8e92016-10-10 17:58:38 +0300267 # OSX GCC 4.6
268 - env: COMPILER=g++-4.6
269 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300270 osx_image: xcode7.3
onqtam5cab8e92016-10-10 17:58:38 +0300271 os: osx
272
273 # OSX GCC 4.7
274 - env: COMPILER=g++-4.7
275 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300276 osx_image: xcode7.3
onqtam5cab8e92016-10-10 17:58:38 +0300277 os: osx
278
279 # OSX GCC 4.8
280 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
281 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300282 osx_image: xcode7.3
onqtamc6555cf2016-09-20 15:07:28 +0300283 os: osx
onqtam3ffb8872016-06-07 23:46:09 +0300284
onqtamb1a3de82016-10-10 22:22:00 +0300285 # OSX GCC 4.9
286 - 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
287 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300288 osx_image: xcode7.3
onqtamb1a3de82016-10-10 22:22:00 +0300289 os: osx
290
291 # OSX GCC 5
292 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
293 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300294 osx_image: xcode7.3
onqtamb1a3de82016-10-10 22:22:00 +0300295 os: osx
296
297 # OSX GCC 6
298 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
299 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300300 osx_image: xcode7.3
onqtamb1a3de82016-10-10 22:22:00 +0300301 os: osx
302
onqtame4c75fc2016-05-21 01:24:48 +0300303before_install:
onqtam2c8036f2016-06-26 17:12:42 +0300304 - git submodule update --init --recursive
305
306install:
onqtam01158572016-06-28 14:29:32 +0300307 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300308 # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
309 ############################################################################
310
311 - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
312 - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
313
314 ############################################################################
315 # Install a recent CMake
316 ############################################################################
317
318 - |
319 if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
onqtam84015352017-03-15 20:11:07 +0200320 CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
onqtamc7aaa962016-09-10 02:16:57 +0300321 mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
322 export PATH=${DEPS_DIR}/cmake/bin:${PATH}
323 fi
324
325 ############################################################################
326 # Go back to ${TRAVIS_BUILD_DIR}
327 ############################################################################
328
329 - cd ${TRAVIS_BUILD_DIR}
330
331 ############################################################################
onqtam01158572016-06-28 14:29:32 +0300332 # Install stuff with homebrew under OSX
333 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300334
onqtam23c6a342016-06-28 14:09:10 +0300335 - |
onqtame4c75fc2016-05-21 01:24:48 +0300336 if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
337 brew update
338 # brew install ccache
onqtam27a8c082017-04-04 17:42:41 +0300339 # brew install valgrind
onqtame4c75fc2016-05-21 01:24:48 +0300340 # cmake
341 if brew list -1 | grep -q "^cmake\$"; then
342 brew outdated cmake || brew upgrade cmake
343 else
344 brew install cmake
345 fi
346 # gcc
onqtame4c75fc2016-05-21 01:24:48 +0300347 if [[ "${COMPILER}" = "g++-4.6" ]]; then
348 brew install gcc46
349 fi
350 if [[ "${COMPILER}" = "g++-4.7" ]]; then
351 brew install gcc47
352 fi
353 if [[ "${COMPILER}" = "g++-4.8" ]]; then
onqtamb1a3de82016-10-10 22:22:00 +0300354 brew install gcc48
onqtame4c75fc2016-05-21 01:24:48 +0300355 fi
356 if [[ "${COMPILER}" = "g++-4.9" ]]; then
357 brew install gcc49
358 fi
359 if [[ "${COMPILER}" = "g++-5" ]]; then
360 brew install gcc5
361 fi
362 if [[ "${COMPILER}" = "g++-6" ]]; then
363 brew install gcc6
364 fi
365 fi
onqtame4c75fc2016-05-21 01:24:48 +0300366 - export CXX="${COMPILER}"
onqtam9f934f82016-08-02 12:42:19 +0300367# - export CXX="ccache ${COMPILER}"
onqtame4c75fc2016-05-21 01:24:48 +0300368# - ccache -s
onqtam7dec6aa2016-06-26 16:01:15 +0300369
370before_script:
371 - ${CXX} --version
onqtame4c75fc2016-05-21 01:24:48 +0300372
373script:
374 # coverage - do not continue with other build configurations after that
375 - |
376 if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then
377 cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug .
onqtam316fce22016-05-21 16:57:13 +0300378 make -k -j2 && make coveralls
onqtame4c75fc2016-05-21 01:24:48 +0300379 exit
380 fi
381
382 # initial run with options
onqtamcc350302016-06-28 14:36:28 +0300383 - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} .
onqtame4c75fc2016-05-21 01:24:48 +0300384
onqtam1586ea22016-05-21 18:02:26 +0300385 # debug x64
onqtamfa5a8522016-06-26 20:15:56 +0300386 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300387 - make clean && make -k -j2
onqtam8e44b182016-05-22 05:28:31 +0300388 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam5cab8e92016-10-10 17:58:38 +0300389 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtam1586ea22016-05-21 18:02:26 +0300390 # release x64
onqtamfa5a8522016-06-26 20:15:56 +0300391 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300392 - make clean && make -k -j2
onqtam8e44b182016-05-22 05:28:31 +0300393 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam5cab8e92016-10-10 17:58:38 +0300394 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300395 # debug x86
onqtamfa5a8522016-06-26 20:15:56 +0300396 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" .
onqtam316fce22016-05-21 16:57:13 +0300397 - make clean && make -k -j2
onqtame4c75fc2016-05-21 01:24:48 +0300398 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam1586ea22016-05-21 18:02:26 +0300399 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300400 # release x86
onqtamfa5a8522016-06-26 20:15:56 +0300401 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m32" .
onqtam316fce22016-05-21 16:57:13 +0300402 - make clean && make -k -j2
onqtame4c75fc2016-05-21 01:24:48 +0300403 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
onqtam1586ea22016-05-21 18:02:26 +0300404 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300405
406 # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers
onqtamfba7fb72016-08-22 14:18:24 +0300407 - cmake -DTEST_MODE=NORMAL .
onqtame4c75fc2016-05-21 01:24:48 +0300408 # on separate commands because when something fails I want to see which one exactly
onqtam84b19bc2016-08-26 12:40:31 +0300409 # TODO: when this http://stackoverflow.com/questions/39081183 gets resolved - add these to ASAN as well: check_initialization_order=true:strict_init_order=true
410 - 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
411 - 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
412 - 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
413 - 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
414 - 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
415 - 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
416 - 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
417 - 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 +0300418
onqtam7a3ad262017-03-18 18:05:10 +0200419 # test in c++0x mode - just Debug/x64
onqtam5cab8e92016-10-10 17:58:38 +0300420 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64" -DWITH_CPP11=1 .
421 - make clean && make -k -j2
onqtam7a3ad262017-03-18 18:05:10 +0200422 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtam5cab8e92016-10-10 17:58:38 +0300423
onqtam7a3ad262017-03-18 18:05:10 +0200424 # test without rtti - just Debug/x64
onqtamf63c5102017-02-25 20:00:52 +0200425 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -m64 -fno-rtti" -DWITH_CPP11=0 .
426 - make clean && make -k -j2
onqtam7a3ad262017-03-18 18:05:10 +0200427 - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
onqtamf63c5102017-02-25 20:00:52 +0200428
onqtam7a3ad262017-03-18 18:05:10 +0200429 # test only compilation without exceptions - just Debug/x64
onqtam2d93e042017-03-17 18:57:59 +0200430 - 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 .
431 - make clean && make -k -j2
432
onqtame4c75fc2016-05-21 01:24:48 +0300433# - ccache -s
434
onqtam2dd55282016-06-13 18:05:38 +0300435#after_script:
436# - cat compile_commands.json