aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 37226d0287ad279a7956ed2a12aa1104dc28aeae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
sudo: required
dist: trusty
language: cpp

before_install:
    - "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then ./scripts/travis_ci_before_install_linux.sh; fi"
    - "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then ./scripts/travis_ci_before_install_osx.sh; fi"
install:
    - export CC="${MY_CC}"
    - export CXX="${MY_CXX}"
    - "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then ./scripts/travis_ci_install_linux.sh; fi"
    - "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then ./scripts/travis_ci_install_osx.sh; fi"
    - "echo CXX version: $($CXX --version)"
    - "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)"
    - "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))"

script: 
    - export CC="${MY_CC}"
    - export CXX="${MY_CXX}"
    - '[ "$NO_ASAN"     == 1 ] || ./scripts/postsubmit.sh DebugAsan'
    - '[ "$NO_VALGRIND" == 1 ] || ./scripts/postsubmit.sh DebugValgrind'
    - '[ "$NO_ASAN"     != 1 ] || [ "$NO_VALGRIND" != 1 ] || ./scripts/postsubmit.sh DebugPlain'
    - '[ "$NO_VALGRIND" != 1 ] || ./scripts/postsubmit.sh ReleasePlain'
    - '[ "$NO_VALGRIND" == 1 ] || ./scripts/postsubmit.sh ReleaseValgrind'

branches:
  only:
    - master

matrix:
  # Report an error as soon as the first matrix entry fails.
  fast_finish: true
  include:
    # GCC on Linux
    - os: linux
      compiler: gcc
      # ASAN (aka '-fsanitize=undefined,address') is not supported in GCC 4.8.
      env: MY_CC=gcc-4.8   MY_CXX=g++-4.8                   NO_ASAN=1
    - os: linux
      compiler: gcc
      env: MY_CC=gcc-4.9   MY_CXX=g++-4.9
    - os: linux
      compiler: gcc
      env: MY_CC=gcc-5     MY_CXX=g++-5
    # Clang on Linux with libstdc++
    - os: linux
      compiler: clang
      env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libstdc++
    - os: linux
      compiler: clang
      env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libstdc++
    - os: linux
      compiler: clang
      # ASAN is disabled because it would hit this error:
      # ld: cannot find [...]/libclang_rt.asan-x86_64.a
      # TODO: check again once the clang-3.7 packages include that file.
      env: MY_CC=clang-3.7 MY_CXX=clang++-3.7 STL=libstdc++ NO_ASAN=1
    - os: linux
      compiler: clang
      # ASAN is disabled because it would hit this error:
      # ld: cannot find [...]/libclang_rt.asan-x86_64.a
      # TODO: check again once the clang-3.8 packages include that file.
      env: MY_CC=clang-3.8 MY_CXX=clang++-3.8 STL=libstdc++ NO_ASAN=1
    # Clang on Linux with libc++
    - os: linux
      compiler: clang
      env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libc++
    - os: linux
      compiler: clang
      env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libc++
    - os: linux
      compiler: clang
      # ASAN is disabled because it would hit this error:
      # ld: cannot find [...]/libclang_rt.asan-x86_64.a
      # TODO: check again once the clang-3.7 packages include that file.
      env: MY_CC=clang-3.7 MY_CXX=clang++-3.7 STL=libc++ NO_ASAN=1
    - os: linux
      compiler: clang
      # ASAN is disabled because it would hit this error:
      # ld: cannot find [...]/libclang_rt.asan-x86_64.a
      # TODO: check again once the clang-3.8 packages include that file.
      env: MY_CC=clang-3.8 MY_CXX=clang++-3.8 STL=libc++ NO_ASAN=1
    # GCC on OS X
    - os: osx
      compiler: gcc
      # ASAN (aka '-fsanitize=undefined,address') is not supported in GCC 4.8.
      env: MY_CC=gcc-4.8   MY_CXX=g++-4.8 NO_ASAN=1
    - os: osx
      compiler: gcc
      env: MY_CC=gcc-4.9   MY_CXX=g++-4.9
    - os: osx
      compiler: gcc
      env: MY_CC=gcc-5     MY_CXX=g++-5
    # Clang on OS X (with libc++)
    - os: osx
      compiler: clang      
      # ASAN is disabled because it would hit this error:
      # ld: file not found: [...]/libclang_rt.ubsan_osx.a
      # Not sure if that's a limitation of Clang 3.6 on OS X or just of the brew-provided binaries.
      env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libc++ NO_ASAN=1
    - os: osx
      compiler: clang
      # ASAN is disabled because it would hit this error:
      # ld: file not found: [...]/libclang_rt.ubsan_osx.a
      # Not sure if that's a limitation of Clang 3.7 on OS X or just of the brew-provided binaries.
      env: MY_CC=clang-3.7 MY_CXX=clang++-3.7 STL=libc++ NO_ASAN=1
    # AppleClang on OS X (with libc++)
    - os: osx
      compiler: clang
      # OS X 10.10
      osx_image: xcode7.1
      # ASAN is disabled because AppleClang does not support -fsanitize=undefined.
      env: MY_CC=clang MY_CXX=clang++ STL=libc++ NO_ASAN=1
    - os: osx
      compiler: clang
      # OS X 10.11
      osx_image: xcode7.3
      # ASAN is disabled because AppleClang does not support -fsanitize=undefined.
      env: MY_CC=clang MY_CXX=clang++ STL=libc++ NO_ASAN=1

# Disabled combinations:
#
#    These fail with "'type_traits' file not found" (the <type_traits> header is missing).
#    - os: osx
#      compiler: gcc
#      env: MY_CC=gcc       MY_CXX=g++         STL=libstdc++
#    - os: osx
#      compiler: clang
#      env: MY_CC=clang     MY_CXX=clang++     STL=libstdc++
#    - os: osx
#      compiler: clang
#      env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libstdc++ NO_VALGRIND=1
#    - os: osx
#      compiler: clang
#      env: MY_CC=clang-3.6 MY_CXX=clang++-3.6 STL=libstdc++
#
#    The compiler complains that the 2-argument constructor of std::pair is ambiguous, even after
#    adding explicit casts to the exact types of the expected overload.
#    - os: osx
#      compiler: clang
#      env: MY_CC=clang     MY_CXX=clang++     STL=libc++ NO_ASAN=1
#
#    This triggers an assert error in the compiler, with the message:
#    "expected to get called on an inlined function!" [...] function isMSExternInline, file Decl.cpp, line 2647.
#    - os: osx
#      compiler: clang
#      env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 STL=libc++ NO_VALGRIND=1 NO_ASAN=1