2018-08-10 16:20:52 -04:00
|
|
|
# Adapted from various sources, including:
|
|
|
|
# - Louis Dionne's Hana: https://github.com/ldionne/hana
|
|
|
|
# - Paul Fultz II's FIT: https://github.com/pfultz2/Fit
|
|
|
|
# - Eric Niebler's range-v3: https://github.com/ericniebler/range-v3
|
2018-08-12 08:32:07 -04:00
|
|
|
sudo: required
|
2018-08-10 16:20:52 -04:00
|
|
|
language: cpp
|
|
|
|
|
|
|
|
addons: &gcc48
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- g++-4.8
|
|
|
|
- valgrind
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
|
|
|
|
addons: &gcc7
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- g++-7
|
|
|
|
- valgrind
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
|
|
|
|
addons: &clang35
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- clang-3.5
|
|
|
|
- valgrind
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
- llvm-toolchain-precise-3.5
|
|
|
|
|
2018-08-12 12:41:39 -04:00
|
|
|
addons: &clang6
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- clang-6.0
|
2018-08-12 12:51:34 -04:00
|
|
|
- valgrind
|
2018-08-12 12:41:39 -04:00
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
- llvm-toolchain-trusty-6.0
|
|
|
|
|
2018-08-10 16:20:52 -04:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# Test gcc-4.8: C++11, Build=Debug/Release
|
|
|
|
- env: GCC_VERSION=4.8 BUILD_TYPE=Debug CPP=11
|
|
|
|
os: linux
|
|
|
|
addons: *gcc48
|
|
|
|
|
|
|
|
- env: GCC_VERSION=4.8 BUILD_TYPE=Release CPP=11
|
|
|
|
os: linux
|
|
|
|
addons: *gcc48
|
2018-08-12 18:59:49 -04:00
|
|
|
|
2018-08-10 16:20:52 -04:00
|
|
|
- env: GCC_VERSION=7 BUILD_TYPE=Release CPP=11
|
|
|
|
os: linux
|
|
|
|
addons: *gcc7
|
|
|
|
|
|
|
|
# Test clang-3.5: C++11, Build=Debug/Release
|
|
|
|
- env: CLANG_VERSION=3.5 BUILD_TYPE=Debug CPP=11
|
|
|
|
os: linux
|
|
|
|
addons: *clang35
|
|
|
|
|
|
|
|
- env: CLANG_VERSION=3.5 BUILD_TYPE=Release CPP=11
|
|
|
|
os: linux
|
|
|
|
addons: *clang35
|
|
|
|
|
2018-08-12 12:41:39 -04:00
|
|
|
# Test clang-6.0: C++11, Build=Debug, ASAN=On
|
|
|
|
- env: CLANG_VERSION=6.0 BUILD_TYPE=Debug CPP=11 ASAN=On
|
2018-08-10 16:20:52 -04:00
|
|
|
os: linux
|
2018-08-12 12:41:39 -04:00
|
|
|
addons: *clang6
|
2018-08-12 19:02:17 -04:00
|
|
|
|
|
|
|
- env: CLANG_VERSION=6.0 BUILD_TYPE=Release CPP=11 ASAN=On
|
|
|
|
os: linux
|
|
|
|
addons: *clang6
|
2018-08-10 16:20:52 -04:00
|
|
|
|
|
|
|
before_install:
|
|
|
|
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
|
|
|
|
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
|
|
|
|
|
|
|
|
install:
|
|
|
|
- cd ${TRAVIS_BUILD_DIR}
|
|
|
|
- mkdir -p build && cd build
|
2018-08-12 08:32:07 -04:00
|
|
|
- |
|
|
|
|
cmake .. \
|
|
|
|
--warn-uninitialized \
|
|
|
|
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
|
|
|
-DCMAKE_CXX_STANDARD=$CPP \
|
|
|
|
-DSPDLOG_BUILD_EXAMPLES=ON \
|
2018-08-12 18:44:10 -04:00
|
|
|
-DSPDLOG_BUILD_BENCH=OFF \
|
2018-08-12 08:32:07 -04:00
|
|
|
-DSPDLOG_SANITIZE_ADDRESS=$ASAN
|
2018-08-12 18:44:10 -04:00
|
|
|
- make VERBOSE=1 -j2
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- which $CXX
|
|
|
|
- which $CC
|
|
|
|
- which valgrind
|
|
|
|
- $CXX --version
|
|
|
|
- cmake --version
|
|
|
|
- valgrind --version
|
2018-08-10 16:20:52 -04:00
|
|
|
|
2018-08-12 18:44:10 -04:00
|
|
|
script:
|
|
|
|
- ctest -j2 --output-on-failure
|
2018-08-10 16:20:52 -04:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
email: false
|