| sudo: required |
| dist: trusty |
| language: cpp |
| |
| before_install: |
| - "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then ./travis_ci_before_install_linux.sh; fi" |
| - "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then ./travis_ci_before_install_osx.sh; fi" |
| install: |
| - export CC="${MY_CC}" |
| - export CXX="${MY_CXX}" |
| - "if [ ${TRAVIS_OS_NAME} = 'linux' ]; then ./travis_ci_install_linux.sh; fi" |
| - "if [ ${TRAVIS_OS_NAME} = 'osx' ]; then ./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 ] || ./postsubmit.sh DebugAsan' |
| - '[ "$NO_VALGRIND" == 1 ] || ./postsubmit.sh DebugValgrind' |
| - '[ "$NO_ASAN" != 1 ] || [ "$NO_VALGRIND" != 1 ] || ./postsubmit.sh DebugPlain' |
| - '[ "$NO_VALGRIND" != 1 ] || ./postsubmit.sh ReleasePlain' |
| - '[ "$NO_VALGRIND" == 1 ] || ./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 |
| # 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 |
| # 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 |