2016-09-03 14:42:01 +02:00
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
2016-01-29 11:47:40 +01:00
|
|
|
language: cpp
|
|
|
|
|
2016-09-03 14:42:01 +02:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- /usr/local/bin:$PATH
|
|
|
|
|
2016-01-29 11:47:40 +01:00
|
|
|
# NOTE: The COMPILER variable is unused. It simply makes the display on
|
|
|
|
# travis-ci.org more readable.
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- compiler: gcc
|
2016-09-03 14:42:01 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- lcov
|
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Coverage
|
2016-01-29 11:47:40 +01:00
|
|
|
- compiler: gcc
|
2016-09-03 14:42:01 +02:00
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Debug
|
2016-01-29 11:47:40 +01:00
|
|
|
- compiler: gcc
|
2016-09-03 14:42:01 +02:00
|
|
|
env: COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Release
|
2016-01-29 11:47:40 +01:00
|
|
|
- compiler: gcc
|
2016-09-03 14:42:01 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-6
|
|
|
|
env:
|
|
|
|
- COMPILER=g++-6 C_COMPILER=gcc-6 BUILD_TYPE=Debug
|
|
|
|
- EXTRA_FLAGS="-fno-omit-frame-pointer -g -O2 -fsanitize=undefined,address -fuse-ld=gold"
|
|
|
|
- compiler: clang
|
|
|
|
env: COMPILER=clang++ C_COMPILER=clang BUILD_TYPE=Debug
|
|
|
|
- compiler: clang
|
|
|
|
env: COMPILER=clang++ C_COMPILER=clang BUILD_TYPE=Release
|
|
|
|
# Clang w/ libc++
|
|
|
|
- compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
|
|
|
|
- LIBCXX_BUILD=1
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++"
|
|
|
|
# Clang w/ libc++, ASAN, UBSAN
|
2016-01-29 11:47:40 +01:00
|
|
|
- compiler: clang
|
2016-09-03 14:42:01 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
|
|
|
|
- LIBCXX_BUILD=1 LIBCXX_SANITIZER="Undefined;Address"
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++ -fno-omit-frame-pointer -g -O2 -fsanitize=undefined,address -fno-sanitize-recover=all"
|
|
|
|
- UBSAN_OPTIONS=print_stacktrace=1
|
|
|
|
# Clang w/ libc++ and MSAN
|
2016-01-29 11:47:40 +01:00
|
|
|
- compiler: clang
|
2016-09-03 14:42:01 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
clang-3.8
|
|
|
|
env:
|
|
|
|
- COMPILER=clang++-3.8 C_COMPILER=clang-3.8 BUILD_TYPE=Debug
|
|
|
|
- LIBCXX_BUILD=1 LIBCXX_SANITIZER=MemoryWithOrigins
|
|
|
|
- EXTRA_FLAGS="-stdlib=libc++ -g -O2 -fno-omit-frame-pointer -fsanitize=memory -fsanitize-memory-track-origins"
|
2016-01-29 11:47:40 +01:00
|
|
|
|
|
|
|
before_script:
|
2016-09-03 14:42:01 +02:00
|
|
|
- if [ -n "${LIBCXX_BUILD}" ]; then
|
|
|
|
source .travis-libcxx-setup.sh;
|
|
|
|
fi
|
2016-01-29 11:47:40 +01:00
|
|
|
- mkdir build && cd build
|
|
|
|
|
|
|
|
install:
|
|
|
|
- if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
|
|
|
|
PATH=~/.local/bin:${PATH};
|
|
|
|
pip install --user --upgrade pip;
|
|
|
|
pip install --user cpp-coveralls;
|
|
|
|
fi
|
|
|
|
|
|
|
|
script:
|
2016-09-03 14:42:01 +02:00
|
|
|
- cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="${EXTRA_FLAGS}" ..
|
2016-01-29 11:47:40 +01:00
|
|
|
- make
|
|
|
|
- make CTEST_OUTPUT_ON_FAILURE=1 test
|
|
|
|
|
|
|
|
after_success:
|
|
|
|
- if [ "${BUILD_TYPE}" == "Coverage" -a "${TRAVIS_OS_NAME}" == "linux" ]; then
|
|
|
|
coveralls --include src --include include --gcov-options '\-lp' --root .. --build-root .;
|
|
|
|
fi
|
2016-05-12 08:42:02 +02:00
|
|
|
|
|
|
|
sudo: required
|