mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 10:31:34 +08:00
119 lines
2.8 KiB
YAML
119 lines
2.8 KiB
YAML
# 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
|
|
|
|
# gcc t
|
|
addons: &gcc48
|
|
apt:
|
|
packages:
|
|
- g++-4.8
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
|
|
# gcc 7.0
|
|
addons: &gcc7
|
|
apt:
|
|
packages:
|
|
- g++-7
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
|
|
# Clang 3.5
|
|
addons: &clang35
|
|
apt:
|
|
packages:
|
|
- clang-3.5
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
- llvm-toolchain-precise-3.5
|
|
|
|
|
|
addons: &clang10
|
|
apt:
|
|
packages:
|
|
- clang-10
|
|
- lldb-10
|
|
- lld-10
|
|
sources:
|
|
- sourceline: "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
|
|
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
|
|
|
|
|
|
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
|
|
# Test gcc-7: C++11, Build=Debug/Release
|
|
- 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
|
|
|
|
# osx
|
|
- env: BUILD_TYPE=Release CPP=11 ASAN=Off TSAN=Off
|
|
os: osx
|
|
|
|
# Test clang-10.0: C++11, Build=Debug/Release
|
|
- env: CLANG_VERSION=10 BUILD_TYPE=Debug CPP=11
|
|
os: linux
|
|
dist: bionic
|
|
addons: *clang10
|
|
|
|
- env: CLANG_VERSION=10 BUILD_TYPE=Release CPP=11 ASAN=On
|
|
os: linux
|
|
dist: bionic
|
|
addons: *clang10
|
|
|
|
# Test clang-10.0: C++17, Build=Debug/Release
|
|
- env: CLANG_VERSION=10 BUILD_TYPE=Release CPP=17 ASAN=Off
|
|
os: linux
|
|
dist: bionic
|
|
addons: *clang10
|
|
|
|
|
|
before_script:
|
|
- 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
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CXX="clang++" CC="clang"; fi
|
|
- which $CXX
|
|
- which $CC
|
|
- $CXX --version
|
|
- cmake --version
|
|
|
|
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 \
|
|
-DSPDLOG_BUILD_WARNINGS=ON \
|
|
-DSPDLOG_BUILD_BENCH=OFF \
|
|
-DSPDLOG_BUILD_TESTS=ON \
|
|
-DSPDLOG_BUILD_TESTS_HO=OFF \
|
|
-DSPDLOG_SANITIZE_ADDRESS=$ASAN
|
|
|
|
- make VERBOSE=1 -j2
|
|
- ctest -j2 --output-on-failure
|
|
|