blob: 7b41cfbd76694e220e0dd8ac11d41d9878e232fe [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
onqtam3bf83c42017-04-23 15:30:23 +030053 - llvm-toolchain-trusty
54 - llvm-toolchain-trusty-4.0
onqtame4c75fc2016-05-21 01:24:48 +030055
56compiler: clang
57os: linux
58
59matrix:
60 exclude:
61 - env: TRAVIS_EMPTY_JOB_WORKAROUND=true
62
63 include:
onqtamd1737e42016-08-01 19:05:07 +030064 # coverage
65 - env: COMPILER=g++ COVERALLS_SERVICE_NAME=travis-ci
66 compiler: gcc
67 addons:
68 apt:
69 packages: ["lcov", "curl"]
70
onqtam529c92c2016-08-02 17:51:59 +030071 # GCC 4.4
72 - env: COMPILER=g++-4.4
73 compiler: gcc
74 addons: &gcc44
75 apt:
76 packages: ["g++-4.4", "valgrind", "g++-4.4-multilib", "libc6-dbg", "libc6-dbg:i386"]
77 sources: *apt_sources
78
79 # GCC 4.5
80 - env: COMPILER=g++-4.5
81 compiler: gcc
82 addons: &gcc45
83 apt:
84 packages: ["g++-4.5", "valgrind", "g++-4.5-multilib", "libc6-dbg", "libc6-dbg:i386"]
85 sources: *apt_sources
86
87 # GCC 4.6
88 - env: COMPILER=g++-4.6
89 compiler: gcc
90 addons: &gcc46
91 apt:
92 packages: [ "valgrind", "g++-4.6-multilib", "libc6-dbg", "libc6-dbg:i386"]
93 sources: *apt_sources
94
95 # GCC 4.7
96 - env: COMPILER=g++-4.7
97 compiler: gcc
98 addons: &gcc47
99 apt:
100 packages: ["g++-4.7", "valgrind", "g++-4.7-multilib", "libc6-dbg", "libc6-dbg:i386"]
101 sources: *apt_sources
102
103 # GCC 4.8
104 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
105 compiler: gcc
106 addons: &gcc48
107 apt:
108 packages: ["g++-4.8", "valgrind", "g++-4.8-multilib", "libc6-dbg", "libc6-dbg:i386"]
109 sources: *apt_sources
110
111 # GCC 4.9
onqtamb1a3de82016-10-10 22:22:00 +0300112 - 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 +0300113 compiler: gcc
114 addons: &gcc49
115 apt:
116 packages: ["g++-4.9", "valgrind", "g++-4.9-multilib", "libc6-dbg", "libc6-dbg:i386"]
117 sources: *apt_sources
118
119 # GCC 5
120 - 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"
121 compiler: gcc
122 addons: &gcc5
123 apt:
124 packages: ["g++-5", "valgrind", "g++-5-multilib", "libc6-dbg", "libc6-dbg:i386"]
125 sources: *apt_sources
126
127 # GCC 6
128 - 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"
129 compiler: gcc
130 addons: &gcc6
131 apt:
132 packages: ["g++-6", "valgrind", "g++-6-multilib", "libc6-dbg", "libc6-dbg:i386"]
133 sources: *apt_sources
134
135 # Clang 3.4
onqtam3bf83c42017-04-23 15:30:23 +0300136 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300137 addons: &clang
138 apt:
139 packages: [ "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
140 sources: *apt_sources
141
142 # Clang 3.5
onqtamc30ab662016-08-05 01:13:08 +0300143 - env: COMPILER=clang++-3.5 HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300144 addons: &clang35
145 apt:
146 packages: ["clang-3.5", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
147 sources: *apt_sources
148
149 # Clang 3.6
onqtamc30ab662016-08-05 01:13:08 +0300150 - env: COMPILER=clang++-3.6 HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300151 addons: &clang36
152 apt:
153 packages: ["clang-3.6", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
154 sources: *apt_sources
155
156 # Clang 3.7
onqtamc30ab662016-08-05 01:13:08 +0300157 - env: COMPILER=clang++-3.7
onqtam529c92c2016-08-02 17:51:59 +0300158 addons: &clang37
159 apt:
160 packages: ["clang-3.7", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
161 sources: *apt_sources
162
163 # Clang 3.8
onqtamc30ab662016-08-05 01:13:08 +0300164 - env: COMPILER=clang++-3.8 HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300165 addons: &clang38
166 apt:
167 packages: ["clang-3.8", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
168 sources: *apt_sources
169
onqtam44025452016-11-15 01:25:24 +0200170 # Clang 3.9
171 - env: COMPILER=clang++-3.9 HAS_ASAN_64=true HAS_UBSAN_64=true
172 addons: &clang39
173 apt:
174 packages: ["clang-3.9", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
175 sources: *apt_sources
176
onqtam0d8997c2017-03-15 15:12:31 +0200177 # Clang 4.0
onqtam3bf83c42017-04-23 15:30:23 +0300178 - env: COMPILER=clang++-4.0 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
179 dist: trusty
onqtam0d8997c2017-03-15 15:12:31 +0200180 addons: &clang40
181 apt:
182 packages: ["clang-4.0", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386", "g++-6"]
183 sources: *apt_sources
184
onqtam529c92c2016-08-02 17:51:59 +0300185 # Xcode 6.4 Clang
186 - env: COMPILER=clang++
187 osx_image: xcode6.4
188 os: osx
189
onqtam529c92c2016-08-02 17:51:59 +0300190 # Xcode 7.3 Clang
191 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
192 osx_image: xcode7.3
193 os: osx
194
195 # Xcode 8 Clang
196 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
197 osx_image: xcode8
198 os: osx
199
onqtam3a6cb172016-11-16 16:35:30 +0200200 # Xcode 8.1 Clang
201 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
202 osx_image: xcode8.1
203 os: osx
204
onqtam14de6f52016-11-18 11:08:23 +0200205 # Xcode 8.2 Clang
206 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
207 osx_image: xcode8.2
208 os: osx
209
onqtam01e89542017-03-28 17:48:59 +0300210 # Xcode 8.3 Clang
onqtam3bf83c42017-04-23 15:30:23 +0300211 - env: COMPILER=clang++ HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
onqtam01e89542017-03-28 17:48:59 +0300212 osx_image: xcode8.3
213 os: osx
214
onqtam529c92c2016-08-02 17:51:59 +0300215 # OSX GCC 4.6
216 - env: COMPILER=g++-4.6
217 compiler: gcc
onqtam3bf83c42017-04-23 15:30:23 +0300218 osx_image: xcode6.4
onqtam529c92c2016-08-02 17:51:59 +0300219 os: osx
220
221 # OSX GCC 4.7
222 - env: COMPILER=g++-4.7
223 compiler: gcc
onqtam3bf83c42017-04-23 15:30:23 +0300224 osx_image: xcode6.4
onqtam529c92c2016-08-02 17:51:59 +0300225 os: osx
226
227 # OSX GCC 4.8
228 - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
229 compiler: gcc
onqtam3bf83c42017-04-23 15:30:23 +0300230 osx_image: xcode6.4
onqtam529c92c2016-08-02 17:51:59 +0300231 os: osx
232
233 # OSX GCC 4.9
onqtam3bf83c42017-04-23 15:30:23 +0300234 - 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 +0300235 compiler: gcc
onqtam3bf83c42017-04-23 15:30:23 +0300236 osx_image: xcode6.4
onqtam529c92c2016-08-02 17:51:59 +0300237 os: osx
238
239 # OSX GCC 5
240 - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
241 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300242 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300243 os: osx
244
245 # OSX GCC 6
246 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
247 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300248 osx_image: xcode7.3
onqtam529c92c2016-08-02 17:51:59 +0300249 os: osx
250
251 # OSX LLVM-GCC
onqtam3bf83c42017-04-23 15:30:23 +0300252 - env: COMPILER=g++ HAS_ASAN_32=true HAS_ASAN_64=true
onqtam529c92c2016-08-02 17:51:59 +0300253 compiler: gcc
254 os: osx
onqtame4c75fc2016-05-21 01:24:48 +0300255
onqtam3ffb8872016-06-07 23:46:09 +0300256 allow_failures:
onqtamfd62aa02016-11-15 03:00:44 +0200257
onqtamb1a3de82016-10-10 22:22:00 +0300258 # for some reason some of these builds fail sometimes...
onqtam5cab8e92016-10-10 17:58:38 +0300259
onqtamb1a3de82016-10-10 22:22:00 +0300260 # OSX GCC 6
261 - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
262 compiler: gcc
onqtam27a8c082017-04-04 17:42:41 +0300263 osx_image: xcode7.3
onqtamb1a3de82016-10-10 22:22:00 +0300264 os: osx
265
onqtame4c75fc2016-05-21 01:24:48 +0300266before_install:
onqtam2c8036f2016-06-26 17:12:42 +0300267 - git submodule update --init --recursive
268
269install:
onqtam01158572016-06-28 14:29:32 +0300270 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300271 # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/
272 ############################################################################
273
274 - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
275 - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
276
277 ############################################################################
278 # Install a recent CMake
279 ############################################################################
280
281 - |
282 if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
onqtam84015352017-03-15 20:11:07 +0200283 CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz"
onqtamc7aaa962016-09-10 02:16:57 +0300284 mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
285 export PATH=${DEPS_DIR}/cmake/bin:${PATH}
286 fi
287
288 ############################################################################
289 # Go back to ${TRAVIS_BUILD_DIR}
290 ############################################################################
291
292 - cd ${TRAVIS_BUILD_DIR}
293
294 ############################################################################
onqtam01158572016-06-28 14:29:32 +0300295 # Install stuff with homebrew under OSX
296 ############################################################################
onqtamc7aaa962016-09-10 02:16:57 +0300297
onqtam23c6a342016-06-28 14:09:10 +0300298 - |
onqtame4c75fc2016-05-21 01:24:48 +0300299 if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
300 brew update
301 # brew install ccache
onqtam27a8c082017-04-04 17:42:41 +0300302 # brew install valgrind
onqtame4c75fc2016-05-21 01:24:48 +0300303 # cmake
304 if brew list -1 | grep -q "^cmake\$"; then
305 brew outdated cmake || brew upgrade cmake
306 else
307 brew install cmake
308 fi
309 # gcc
onqtame4c75fc2016-05-21 01:24:48 +0300310 if [[ "${COMPILER}" = "g++-4.6" ]]; then
311 brew install gcc46
312 fi
313 if [[ "${COMPILER}" = "g++-4.7" ]]; then
314 brew install gcc47
315 fi
316 if [[ "${COMPILER}" = "g++-4.8" ]]; then
onqtamb1a3de82016-10-10 22:22:00 +0300317 brew install gcc48
onqtame4c75fc2016-05-21 01:24:48 +0300318 fi
319 if [[ "${COMPILER}" = "g++-4.9" ]]; then
320 brew install gcc49
321 fi
322 if [[ "${COMPILER}" = "g++-5" ]]; then
323 brew install gcc5
324 fi
325 if [[ "${COMPILER}" = "g++-6" ]]; then
326 brew install gcc6
327 fi
328 fi
onqtame4c75fc2016-05-21 01:24:48 +0300329 - export CXX="${COMPILER}"
onqtam9f934f82016-08-02 12:42:19 +0300330# - export CXX="ccache ${COMPILER}"
onqtame4c75fc2016-05-21 01:24:48 +0300331# - ccache -s
onqtam7dec6aa2016-06-26 16:01:15 +0300332
333before_script:
334 - ${CXX} --version
onqtame4c75fc2016-05-21 01:24:48 +0300335
336script:
337 # coverage - do not continue with other build configurations after that
338 - |
339 if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then
340 cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug .
onqtam316fce22016-05-21 16:57:13 +0300341 make -k -j2 && make coveralls
onqtame4c75fc2016-05-21 01:24:48 +0300342 exit
343 fi
344
345 # initial run with options
onqtamcc350302016-06-28 14:36:28 +0300346 - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} .
onqtame4c75fc2016-05-21 01:24:48 +0300347
onqtam1586ea22016-05-21 18:02:26 +0300348 # debug x64
onqtam56d91702017-04-16 21:03:58 +0300349 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300350 - make clean && make -k -j2
onqtam56d91702017-04-16 21:03:58 +0300351 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DDOCTEST_TEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
352 - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest --output-on-failure
onqtam1586ea22016-05-21 18:02:26 +0300353 # release x64
onqtam56d91702017-04-16 21:03:58 +0300354 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -m64" .
onqtam1586ea22016-05-21 18:02:26 +0300355 - make clean && make -k -j2
onqtam56d91702017-04-16 21:03:58 +0300356 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DDOCTEST_TEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
357 - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300358 # debug x86
onqtam56d91702017-04-16 21:03:58 +0300359 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -m32" .
onqtam316fce22016-05-21 16:57:13 +0300360 - make clean && make -k -j2
onqtam56d91702017-04-16 21:03:58 +0300361 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DDOCTEST_TEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
362 - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300363 # release x86
onqtam56d91702017-04-16 21:03:58 +0300364 - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -m32" .
onqtam316fce22016-05-21 16:57:13 +0300365 - make clean && make -k -j2
onqtam56d91702017-04-16 21:03:58 +0300366 - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DDOCTEST_TEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
367 - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest --output-on-failure
onqtame4c75fc2016-05-21 01:24:48 +0300368
369 # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers
onqtam56d91702017-04-16 21:03:58 +0300370 - cmake -DDOCTEST_TEST_MODE=NORMAL .
onqtame4c75fc2016-05-21 01:24:48 +0300371 # on separate commands because when something fails I want to see which one exactly
onqtam84b19bc2016-08-26 12:40:31 +0300372 # TODO: when this http://stackoverflow.com/questions/39081183 gets resolved - add these to ASAN as well: check_initialization_order=true:strict_init_order=true
onqtam56d91702017-04-16 21:03:58 +0300373 - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -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
374 - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -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
375 - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -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
376 - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -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
377 - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -g -fno-omit-frame-pointer -m64 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi
378 - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -g -fno-omit-frame-pointer -m32 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi
379 - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -g -fno-omit-frame-pointer -m64 -fsanitize=undefined" . && make clean && make -k -j2 && UBSAN_OPTIONS=verbosity=2 ctest --output-on-failure ; fi
380 - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -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 +0300381
onqtam7a3ad262017-03-18 18:05:10 +0200382 # test in c++0x mode - just Debug/x64
onqtam56d91702017-04-16 21:03:58 +0300383 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++0x -m64" .
onqtam5cab8e92016-10-10 17:58:38 +0300384 - make clean && make -k -j2
onqtam56d91702017-04-16 21:03:58 +0300385 - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest --output-on-failure
onqtam5cab8e92016-10-10 17:58:38 +0300386
onqtam7a3ad262017-03-18 18:05:10 +0200387 # test without rtti - just Debug/x64
onqtam56d91702017-04-16 21:03:58 +0300388 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -m64 -fno-rtti" .
onqtamf63c5102017-02-25 20:00:52 +0200389 - make clean && make -k -j2
onqtam56d91702017-04-16 21:03:58 +0300390 - cmake -DDOCTEST_TEST_MODE=COMPARE . && ctest --output-on-failure
onqtamf63c5102017-02-25 20:00:52 +0200391
onqtam7a3ad262017-03-18 18:05:10 +0200392 # test only compilation without exceptions - just Debug/x64
onqtam56d91702017-04-16 21:03:58 +0300393 - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${ADDITIONAL_CXX_FLAGS} -std=c++98 -m64 -fno-exceptions -DDOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS" .
onqtam2d93e042017-03-17 18:57:59 +0200394 - make clean && make -k -j2
395
onqtame4c75fc2016-05-21 01:24:48 +0300396# - ccache -s
397
onqtam2dd55282016-06-13 18:05:38 +0300398#after_script:
399# - cat compile_commands.json