blob: f08da442c1d41bd703752ad5dfbaa4224418bcb7 [file] [log] [blame]
onqtama539bb42016-05-20 02:47:56 +03001#sudo: false
2#language: c++
3#
4#notifications:
5# email:
6# on_success: change
7# on_failure: always
8# # gitter
9# webhooks:
10# urls: https://webhooks.gitter.im/e/10941dd1c67e5e967706
11# on_success: change
12# on_failure: always
13#git:
14# depth: 5
15#
16## both apt and ccache make the builds slower...
17##cache:
18## - apt
19## - ccache
20#
21#env:
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#
34#addons:
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:
45# sources: &apt_sources
46# - ubuntu-toolchain-r-test
47# - llvm-toolchain-precise-3.5
48# - llvm-toolchain-precise-3.6
49# - llvm-toolchain-precise-3.7
50# - llvm-toolchain-precise-3.8
51# - llvm-toolchain-precise
52#
53#compiler: clang
54#os: linux
55#
56#matrix:
57# exclude:
58# - env: TRAVIS_EMPTY_JOB_WORKAROUND=true
59#
60# include:
61# # coverage
62# - env: COMPILER=g++ COVERALLS_SERVICE_NAME=travis-ci
onqtam695fded2016-04-30 15:14:08 +030063# compiler: gcc
onqtama539bb42016-05-20 02:47:56 +030064# addons:
onqtam695fded2016-04-30 15:14:08 +030065# apt:
onqtama539bb42016-05-20 02:47:56 +030066# packages: ["lcov", "curl"]
67#
68# # GCC 4.4
69# - env: COMPILER=g++-4.4
70# compiler: gcc
71# addons: &gcc44
72# apt:
73# packages: ["g++-4.4", "valgrind", "g++-4.4-multilib", "libc6-dbg", "libc6-dbg:i386"]
onqtam695fded2016-04-30 15:14:08 +030074# sources: *apt_sources
onqtama539bb42016-05-20 02:47:56 +030075#
76# # GCC 4.5
77# - env: COMPILER=g++-4.5
78# compiler: gcc
79# addons: &gcc45
80# apt:
81# packages: ["g++-4.5", "valgrind", "g++-4.5-multilib", "libc6-dbg", "libc6-dbg:i386"]
82# sources: *apt_sources
83#
84# # GCC 4.6
85# - env: COMPILER=g++-4.6
86# compiler: gcc
87# addons: &gcc46
88# apt:
89# packages: [ "valgrind", "g++-4.6-multilib", "libc6-dbg", "libc6-dbg:i386"]
90# sources: *apt_sources
91#
92# # GCC 4.7
93# - env: COMPILER=g++-4.7
94# compiler: gcc
95# addons: &gcc47
96# apt:
97# packages: ["g++-4.7", "valgrind", "g++-4.7-multilib", "libc6-dbg", "libc6-dbg:i386"]
98# sources: *apt_sources
99#
100# # GCC 4.8
101# - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
102# compiler: gcc
103# addons: &gcc48
104# apt:
105# packages: ["g++-4.8", "valgrind", "g++-4.8-multilib", "libc6-dbg", "libc6-dbg:i386"]
106# sources: *apt_sources
107#
108# # GCC 4.9
109# - env: COMPILER=g++-4.9 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
110# compiler: gcc
111# addons: &gcc49
112# apt:
113# packages: ["g++-4.9", "valgrind", "g++-4.9-multilib", "libc6-dbg", "libc6-dbg:i386"]
114# sources: *apt_sources
115#
116# # GCC 5
117# - env: COMPILER=g++-5 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
118# compiler: gcc
119# addons: &gcc5
120# apt:
121# packages: ["g++-5", "valgrind", "g++-5-multilib", "libc6-dbg", "libc6-dbg:i386"]
122# sources: *apt_sources
123#
124## # GCC 6
125## # released on 2016.04.27
126## # wait for it to enter the whitelist - https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
127## # also with homebrew under OSX!!!
128## - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
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
136# - env: COMPILER=clang++ HAS_ASAN_64=true HAS_UBSAN_64=true
137# addons: &clang
138# apt:
139# packages: [ "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386"]
140# sources: *apt_sources
141#
142# # Clang 3.5
143# - env: COMPILER=clang++-3.5 HAS_ASAN_64=true HAS_UBSAN_64=true
144# addons: &clang35
145# apt:
146# packages: ["clang-3.5", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386"]
147# sources: *apt_sources
148#
149# # Clang 3.6
150# - env: COMPILER=clang++-3.6 HAS_ASAN_64=true HAS_UBSAN_64=true
151# addons: &clang36
152# apt:
153# packages: ["clang-3.6", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386"]
154# sources: *apt_sources
155#
156# # Clang 3.7
157# - env: COMPILER=clang++-3.7 # no sanitizers - not even for 64 bit - https://llvm.org/bugs/show_bug.cgi?id=22757
158# addons: &clang37
159# apt:
160# packages: ["clang-3.7", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386"]
161# sources: *apt_sources
162#
163# # Clang 3.8
164# - env: COMPILER=clang++-3.8 # no sanitizers - not even for 64 bit - https://llvm.org/bugs/show_bug.cgi?id=22757
165# addons: &clang38
166# apt:
167# packages: ["clang-3.8", "valgrind", "g++-multilib", "libc6-dbg", "libc6-dbg:i386"]
168# sources: *apt_sources
169#
170# # Xcode 6.1 Clang
171# - env: COMPILER=clang++
172# os: osx
173#
174# # Xcode 6.2 Clang
175# - env: COMPILER=clang++
176# osx_image: beta-xcode6.2
177# os: osx
178#
179# # Xcode 6.3 Clang
180# - env: COMPILER=clang++
181# osx_image: beta-xcode6.3
182# os: osx
183#
184# # Xcode 6.4 Clang
185# - env: COMPILER=clang++
186# osx_image: xcode6.4
187# os: osx
188#
189# # Xcode 7 Clang
190# - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
191# osx_image: xcode7
192# os: osx
193#
194# # Xcode 7.1 Clang
195# - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
196# osx_image: xcode7.1
197# os: osx
198#
199# # Xcode 7.2 Clang
200# - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
201# osx_image: xcode7.2
202# os: osx
203#
204# # Xcode 7.3 Clang
205# - env: COMPILER=clang++ HAS_ASAN_32=true HAS_ASAN_64=true
206# osx_image: xcode7.3
207# os: osx
208#
209# # OSX GCC 4.4
210# - env: COMPILER=g++-4.4
onqtam695fded2016-04-30 15:14:08 +0300211# compiler: gcc
212# os: osx
onqtama539bb42016-05-20 02:47:56 +0300213#
214# # OSX GCC 4.5
215# - env: COMPILER=g++-4.5
216# compiler: gcc
217# os: osx
218#
219# # OSX GCC 4.6
220# - env: COMPILER=g++-4.6
221# compiler: gcc
222# os: osx
223#
224# # OSX GCC 4.7
225# - env: COMPILER=g++-4.7
226# compiler: gcc
227# os: osx
228#
229# # OSX GCC 4.8
230# - env: COMPILER=g++-4.8 HAS_ASAN_32=true HAS_ASAN_64=true
231# compiler: gcc
232# os: osx
233#
234# # OSX GCC 4.9
235# - env: COMPILER=g++-4.9 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
236# compiler: gcc
237# 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
242# os: osx
243#
244## # OSX GCC 6
245## - env: COMPILER=g++-6 HAS_ASAN_32=true HAS_UBSAN_32=true HAS_ASAN_64=true HAS_UBSAN_64=true
246## compiler: gcc
247## os: osx
248#
249# # OSX LLVM-GCC
250# - env: COMPILER=g++
251# compiler: gcc
252# os: osx
253#
254#before_install:
255# - |
256# if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
257# brew update
258# # brew install ccache
259# brew install valgrind
260# # cmake
261# if brew list -1 | grep -q "^cmake\$"; then
262# brew outdated cmake || brew upgrade cmake
263# else
264# brew install cmake
265# fi
266# # gcc
267# if [[ "${COMPILER}" = "g++-4.4" ]]; then
268# brew install gcc44
269# fi
270# if [[ "${COMPILER}" = "g++-4.5" ]]; then
271# brew install gcc45
272# fi
273# if [[ "${COMPILER}" = "g++-4.6" ]]; then
274# brew install gcc46
275# fi
276# if [[ "${COMPILER}" = "g++-4.7" ]]; then
277# brew install gcc47
278# fi
279# if [[ "${COMPILER}" = "g++-4.8" ]]; then
280# brew outdated gcc48 || brew upgrade gcc48
281# fi
282# if [[ "${COMPILER}" = "g++-4.9" ]]; then
283# brew install gcc49
284# fi
285# if [[ "${COMPILER}" = "g++-5" ]]; then
286# brew install gcc5
287# fi
288# if [[ "${COMPILER}" = "g++-6" ]]; then
289# brew install gcc6
290# fi
291# fi
292# - git submodule update --init --recursive
293#
294#install:
295# - ${CXX} --version
296## - export CXX="ccache ${COMPILER}"
297# - export CXX="${COMPILER}"
298# - ${CXX} --version
299## - ccache -s
300#
301#script:
302# # coverage - do not continue with other build configurations after that
303# - |
304# if [[ "${COVERALLS_SERVICE_NAME}" = "travis-ci" ]]; then
305# cmake ${CMAKE_OPTIONS_GLOBAL} -DCMAKE_BUILD_TYPE=Debug .
306# make -j2 && make coveralls
307# exit
308# fi
309#
310# # initial run with options
311# - cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} .
312#
313# # debug x86
314# - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m32" .
315# - make clean && make -j2
316# # valgrind for 32bit under osx fails
317# - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
318## - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
319# # debug x64
320# - cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m64" .
321# - make clean && make -j2
322# - cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure
323## - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
324# # release x86
325# - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m32" .
326# - make clean && make -j2
327# # valgrind for 32bit under osx fails
328# - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure ; fi
329## - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
330# # release x64
331# - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m64" .
332# - make clean && make -j2
333# - cmake -DTEST_MODE=VALGRIND . && ctest --output-on-failure
334## - cmake -DTEST_MODE=COMPARE . && ctest --output-on-failure
335#
336# # sanitizers - again 32/64 bit Debug/Release configs through address/undefined sanitizers
337# - cmake -DTEST_MODE=NORMAL .
338## - cmake -DTEST_MODE=COMPARE .
339# # on separate commands because when something fails I want to see which one exactly
340# - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m64 -fsanitize=address" . && make clean && make -j2 && ctest --output-on-failure ; fi
341# - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m32 -fsanitize=address" . && make clean && make -j2 && ctest --output-on-failure ; fi
342# - if [[ "${HAS_ASAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m64 -fsanitize=address" . && make clean && make -j2 && ctest --output-on-failure ; fi
343# - if [[ "${HAS_ASAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m32 -fsanitize=address" . && make clean && make -j2 && ctest --output-on-failure ; fi
344# - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m64 -fsanitize=undefined" . && make clean && make -j2 && ctest --output-on-failure ; fi
345# - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-m32 -fsanitize=undefined" . && make clean && make -j2 && ctest --output-on-failure ; fi
346# - if [[ "${HAS_UBSAN_64}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m64 -fsanitize=undefined" . && make clean && make -j2 && ctest --output-on-failure ; fi
347# - if [[ "${HAS_UBSAN_32}" = "true" ]]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-m32 -fsanitize=undefined" . && make clean && make -j2 && ctest --output-on-failure ; fi
348#
349## - ccache -s
350#
351#after_script:
352# - cat compile_commands.json
353#