blob: 7571a1aa98953cd93763e0787b0f0e6058f6b09a [file] [log] [blame]
Marco Poletti27c6f072015-11-29 18:43:58 +00001sudo: required
2dist: trusty
Marco Poletti0843ee42015-02-21 09:40:29 +00003language: cpp
4
Marco Poletti33aed1b2015-02-21 11:56:01 +00005before_install:
Marco Polettiee84bc92016-03-26 13:37:02 +00006 - "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then ./scripts/travis_ci_before_install_linux.sh; fi"
7 - "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then ./scripts/travis_ci_before_install_osx.sh; fi"
Marco Poletti33aed1b2015-02-21 11:56:01 +00008install:
Marco Poletti3bd47252015-12-07 18:57:33 +00009 - export CC="${MY_CC}"
10 - export CXX="${MY_CXX}"
Marco Polettiee84bc92016-03-26 13:37:02 +000011 - "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then ./scripts/travis_ci_install_linux.sh; fi"
12 - "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then ./scripts/travis_ci_install_osx.sh; fi"
Marco Polettid5fa2272016-02-14 09:12:32 +000013 - "echo CXX version: $($CXX --version)"
14 - "echo C++ Standard library location: $(echo '#include <vector>' | g++ -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1)"
15 - "echo Normalized C++ Standard library location: $(readlink -f $(echo '#include <vector>' | g++ -x c++ -E - | grep 'vector\"' | awk '{print $3}' | sed 's@/vector@@;s@\"@@g' | head -n 1))"
Marco Poletti33aed1b2015-02-21 11:56:01 +000016
Marco Poletti3bd47252015-12-07 18:57:33 +000017script:
18 - export CC="${MY_CC}"
19 - export CXX="${MY_CXX}"
Marco Polettiee84bc92016-03-26 13:37:02 +000020 - '[ "$NO_ASAN" == 1 ] || ./scripts/postsubmit.sh DebugAsan'
21 - '[ "$NO_VALGRIND" == 1 ] || ./scripts/postsubmit.sh DebugValgrind'
22 - '[ "$NO_ASAN" != 1 ] || [ "$NO_VALGRIND" != 1 ] || ./scripts/postsubmit.sh DebugPlain'
23 - '[ "$NO_VALGRIND" != 1 ] || ./scripts/postsubmit.sh ReleasePlain'
24 - '[ "$NO_VALGRIND" == 1 ] || ./scripts/postsubmit.sh ReleaseValgrind'
Marco Poletti0843ee42015-02-21 09:40:29 +000025
26branches:
27 only:
28 - master
Marco Polettiec4b6db2015-12-01 19:11:06 +010029
Marco Poletticd13b202015-05-31 16:44:55 +010030matrix:
Marco Poletti3ed306a2016-02-07 17:52:29 +000031 # Report an error as soon as the first matrix entry fails.
32 fast_finish: true
Marco Poletticd13b202015-05-31 16:44:55 +010033 include:
Marco Poletti1c4395b2016-02-21 10:20:09 +000034 # GCC on Linux
Marco Poletti70bf24d2015-12-01 22:56:47 +010035 - os: linux
36 compiler: gcc
Marco Poletti3ed306a2016-02-07 17:52:29 +000037 # ASAN (aka '-fsanitize=undefined,address') is not supported in GCC 4.8.
Marco Polettib35cb272016-02-14 09:56:48 +000038 env: MY_CC=gcc-4.8 MY_CXX=g++-4.8 NO_ASAN=1
Marco Poletti70bf24d2015-12-01 22:56:47 +010039 - os: linux
40 compiler: gcc
Marco Polettib35cb272016-02-14 09:56:48 +000041 env: MY_CC=gcc-4.9 MY_CXX=g++-4.9
Marco Poletti70bf24d2015-12-01 22:56:47 +010042 - os: linux
43 compiler: gcc
Marco Polettib35cb272016-02-14 09:56:48 +000044 env: MY_CC=gcc-5 MY_CXX=g++-5
Marco Poletti1c4395b2016-02-21 10:20:09 +000045 # Clang on Linux with libstdc++
Marco Poletti70bf24d2015-12-01 22:56:47 +010046 - os: linux
47 compiler: clang
Marco Poletti8bb168b2016-02-14 09:41:11 +000048 env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libstdc++
Marco Poletti70bf24d2015-12-01 22:56:47 +010049 - os: linux
50 compiler: clang
Marco Poletti8bb168b2016-02-14 09:41:11 +000051 env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libstdc++
Marco Poletti70bf24d2015-12-01 22:56:47 +010052 - os: linux
53 compiler: clang
Marco Poletti9c18e0a2016-02-21 10:05:34 +000054 # ASAN is disabled because it would hit this error:
55 # ld: cannot find [...]/libclang_rt.asan-x86_64.a
Marco Poletti9c18e0a2016-02-21 10:05:34 +000056 env: MY_CC=clang-3.7 MY_CXX=clang++-3.7 STL=libstdc++ NO_ASAN=1
Marco Polettic359c982016-03-26 13:41:35 +000057 - os: linux
58 compiler: clang
Marco Poletti7c3cd602016-04-05 10:26:30 +020059 env: MY_CC=clang-3.8 MY_CXX=clang++-3.8 STL=libstdc++
Marco Poletti1c4395b2016-02-21 10:20:09 +000060 # Clang on Linux with libc++
Marco Poletti8bb168b2016-02-14 09:41:11 +000061 - os: linux
62 compiler: clang
63 env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libc++
64 - os: linux
65 compiler: clang
66 env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libc++
67 - os: linux
68 compiler: clang
Marco Poletti9c18e0a2016-02-21 10:05:34 +000069 # ASAN is disabled because it would hit this error:
70 # ld: cannot find [...]/libclang_rt.asan-x86_64.a
Marco Poletti9c18e0a2016-02-21 10:05:34 +000071 env: MY_CC=clang-3.7 MY_CXX=clang++-3.7 STL=libc++ NO_ASAN=1
Marco Polettic359c982016-03-26 13:41:35 +000072 - os: linux
73 compiler: clang
Marco Poletti7c3cd602016-04-05 10:26:30 +020074 env: MY_CC=clang-3.8 MY_CXX=clang++-3.8 STL=libc++
Marco Poletti1c4395b2016-02-21 10:20:09 +000075 # GCC on OS X
Marco Poletti65025022016-02-14 12:51:03 +000076 - os: osx
77 compiler: gcc
Marco Poletti8bb168b2016-02-14 09:41:11 +000078 # ASAN (aka '-fsanitize=undefined,address') is not supported in GCC 4.8.
Marco Poletti9c18e0a2016-02-21 10:05:34 +000079 env: MY_CC=gcc-4.8 MY_CXX=g++-4.8 NO_ASAN=1
Marco Polettif4a43ea2015-12-01 18:54:48 +010080 - os: osx
81 compiler: gcc
Marco Poletti9c18e0a2016-02-21 10:05:34 +000082 env: MY_CC=gcc-4.9 MY_CXX=g++-4.9
Marco Polettif4a43ea2015-12-01 18:54:48 +010083 - os: osx
Marco Poletti9160e792016-02-21 10:08:49 +000084 compiler: gcc
Marco Poletti426ee1d2016-02-21 15:01:30 +000085 env: MY_CC=gcc-5 MY_CXX=g++-5
Marco Poletti1c4395b2016-02-21 10:20:09 +000086 # Clang on OS X (with libc++)
Marco Poletti9160e792016-02-21 10:08:49 +000087 - os: osx
Marco Poletti9c18e0a2016-02-21 10:05:34 +000088 compiler: clang
Marco Poletti2a1d5c72016-02-20 15:57:56 +000089 # ASAN is disabled because it would hit this error:
90 # ld: file not found: [...]/libclang_rt.ubsan_osx.a
Marco Poletti9e383d22016-02-21 12:22:22 +000091 # Not sure if that's a limitation of Clang 3.6 on OS X or just of the brew-provided binaries.
Marco Poletti9c18e0a2016-02-21 10:05:34 +000092 env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libc++ NO_ASAN=1
Marco Poletti3ed306a2016-02-07 17:52:29 +000093 - os: osx
Marco Poletti9c18e0a2016-02-21 10:05:34 +000094 compiler: clang
Marco Poletti9e383d22016-02-21 12:22:22 +000095 # ASAN is disabled because it would hit this error:
96 # ld: file not found: [...]/libclang_rt.ubsan_osx.a
97 # Not sure if that's a limitation of Clang 3.7 on OS X or just of the brew-provided binaries.
98 env: MY_CC=clang-3.7 MY_CXX=clang++-3.7 STL=libc++ NO_ASAN=1
Marco Poletti1c4395b2016-02-21 10:20:09 +000099 # AppleClang on OS X (with libc++)
100 - os: osx
101 compiler: clang
102 # OS X 10.10
103 osx_image: xcode7.1
Marco Poletti5d152692016-02-21 13:44:15 +0000104 # ASAN is disabled because AppleClang does not support -fsanitize=undefined.
105 env: MY_CC=clang MY_CXX=clang++ STL=libc++ NO_ASAN=1
Marco Poletti1c4395b2016-02-21 10:20:09 +0000106 - os: osx
107 compiler: clang
108 # OS X 10.11
109 osx_image: xcode7.3
Marco Poletti5d152692016-02-21 13:44:15 +0000110 # ASAN is disabled because AppleClang does not support -fsanitize=undefined.
111 env: MY_CC=clang MY_CXX=clang++ STL=libc++ NO_ASAN=1
Marco Poletti3ed306a2016-02-07 17:52:29 +0000112
Marco Poletti227bef12016-02-14 18:00:12 +0000113# Disabled combinations:
114#
115# These fail with "'type_traits' file not found" (the <type_traits> header is missing).
116# - os: osx
117# compiler: gcc
118# env: MY_CC=gcc MY_CXX=g++ STL=libstdc++
119# - os: osx
120# compiler: clang
121# env: MY_CC=clang MY_CXX=clang++ STL=libstdc++
122# - os: osx
123# compiler: clang
124# env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libstdc++ NO_VALGRIND=1
125# - os: osx
126# compiler: clang
127# env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libstdc++
Marco Polettib5ae7852016-02-20 17:52:48 +0000128#
129# The compiler complains that the 2-argument constructor of std::pair is ambiguous, even after
130# adding explicit casts to the exact types of the expected overload.
131# - os: osx
132# compiler: clang
133# env: MY_CC=clang MY_CXX=clang++ STL=libc++ NO_ASAN=1
134#
135# This triggers an assert error in the compiler, with the message:
136# "expected to get called on an inlined function!" [...] function isMSExternInline, file Decl.cpp, line 2647.
137# - os: osx
138# compiler: clang
139# env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libc++ NO_VALGRIND=1 NO_ASAN=1