spdlog/.travis.yml

118 lines
2.7 KiB
YAML
Raw Normal View History

# 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
sudo: required
language: cpp
2019-09-21 19:46:09 +08:00
# gcc 4.8
addons: &gcc48
apt:
packages:
- g++-4.8
sources:
- ubuntu-toolchain-r-test
2019-09-21 19:46:09 +08:00
# gcc 7.0
addons: &gcc7
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
2019-09-21 19:46:09 +08:00
# Clang 3.5
addons: &clang35
apt:
packages:
- clang-3.5
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
2019-09-21 19:46:09 +08:00
2020-04-15 06:05:09 +08:00
2020-04-17 22:23:39 +08:00
addons: &clang10
apt:
packages:
- clang-10
- lldb-10
- lld-10
sources:
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
2020-04-18 09:48:26 +08:00
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
2020-04-17 22:23:39 +08:00
2018-08-17 20:58:53 +08:00
matrix:
include:
# Test gcc-4.8: C++11, Build=Debug/Release
2019-07-02 14:58:23 +08:00
- env: GCC_VERSION=4.8 BUILD_TYPE=Debug CPP=11
os: linux
addons: *gcc48
2019-07-02 14:58:23 +08:00
- env: GCC_VERSION=4.8 BUILD_TYPE=Release CPP=11
os: linux
addons: *gcc48
2019-05-24 13:47:29 +08: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-17 20:58:53 +08:00
# osx
2018-08-17 22:30:33 +08:00
- env: BUILD_TYPE=Release CPP=11 ASAN=Off TSAN=Off
2018-08-17 21:00:14 +08:00
os: osx
2019-05-24 13:47:29 +08:00
2020-04-17 22:23:39 +08:00
# Test clang-10.0: C++11, Build=Debug/Release
2020-04-18 18:22:07 +08:00
- env: CLANG_VERSION=10 BUILD_TYPE=Debug CPP=11
2020-04-17 22:23:39 +08:00
os: linux
dist: bionic
addons: *clang10
2020-04-18 19:04:46 +08:00
- env: CLANG_VERSION=10 BUILD_TYPE=Release CPP=11 ASAN=On
2020-04-17 22:23:39 +08:00
os: linux
dist: bionic
addons: *clang10
2021-06-27 02:46:49 +08:00
- env: CLANG_VERSION=10 BUILD_TYPE=Release CPP=17 ASAN=On
os: linux
dist: bionic
addons: *clang10
2018-08-17 22:30:33 +08:00
2018-08-17 20:58:53 +08:00
2018-08-14 06:19:29 +08:00
before_script:
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
2019-09-21 20:35:22 +08:00
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
2018-08-17 21:15:02 +08:00
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CXX="clang++" CC="clang"; fi
2018-08-14 06:19:29 +08:00
- which $CXX
- which $CC
- $CXX --version
- cmake --version
2018-08-14 06:19:29 +08:00
script:
- cd ${TRAVIS_BUILD_DIR}
- mkdir -p build && cd build
- |
cmake .. \
--warn-uninitialized \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_CXX_STANDARD=$CPP \
-DSPDLOG_BUILD_EXAMPLE=ON \
-DSPDLOG_BUILD_EXAMPLE_HO=ON \
2020-06-08 23:03:43 +08:00
-DSPDLOG_BUILD_WARNINGS=ON \
2018-08-13 06:44:10 +08:00
-DSPDLOG_BUILD_BENCH=OFF \
2018-12-02 21:25:03 +08:00
-DSPDLOG_BUILD_TESTS=ON \
2020-06-08 23:03:55 +08:00
-DSPDLOG_BUILD_TESTS_HO=OFF \
2019-07-02 04:51:05 +08:00
-DSPDLOG_SANITIZE_ADDRESS=$ASAN
2018-08-14 06:19:29 +08:00
- make VERBOSE=1 -j2
- ctest -j2 --output-on-failure
2020-05-02 14:16:54 +08:00