-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
85 lines (74 loc) · 2.83 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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
# - Gabi Melman spdlog: https://github.com/gabime/spdlog
language: cpp
script: cmake
dist: trusty
sudo: false
# Test matrix:
# - Build matrix per compiler: C++14 + Debug/Release
# - Optionally: AddressSanitizer (ASAN)
# - gcc 4.8, 5, 6
#
matrix:
include:
# Test gcc-5: C++14, Build=Debug/Release, ASAN=Off
- env: GCC_VERSION=5 BUILD_TYPE=Debug CPP_VERSION=14 ASAN=Off LIBCXX=Off
os: linux
addons: &gcc5
apt:
packages:
- g++-5
- cmake
sources:
- ubuntu-toolchain-r-test
- george-edison55
- env: GCC_VERSION=5 BUILD_TYPE=Release CPP_VERSION=14 ASAN=Off LIBCXX=Off
os: linux
addons: *gcc5
# Test gcc-6: C++14, Build=Debug/Release, ASAN=Off
- env: GCC_VERSION=6 BUILD_TYPE=Debug CPP_VERSION=14 ASAN=Off LIBCXX=Off
os: linux
addons: &gcc6
apt:
packages:
- g++-6
- cmake
sources:
- ubuntu-toolchain-r-test
- george-edison55
- env: GCC_VERSION=6 BUILD_TYPE=Release CPP_VERSION=14 ASAN=Off LIBCXX=Off
os: linux
addons: *gcc6
# Install dependencies
before_install:
- export CHECKOUT_PATH=`pwd`;
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}"; fi
- if [ -n "$GCC_VERSION" ]; then export CC="gcc-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
- if [ "$CLANG_VERSION" == "3.4" ]; then export CXX="/usr/local/clang-3.4/bin/clang++" CC="/usr/local/clang-3.4/bin/clang"; fi
- which $CXX
- which $CC
- $CXX --version
- if [ -n "$CLANG_VERSION" ]; then sudo CXX=$CXX CC=$CC ./tests/install_libcxx.sh; fi
install:
- cd $CHECKOUT_PATH
- if [ ! -d build ]; then mkdir build && cd build; fi
- export CXX_FLAGS=""
- export CXX_LINKER_FLAGS=""
- if [ -z "$BUILD_TYPE" ]; then export BUILD_TYPE=Release; fi
- if [ "$ASAN" == "On"]; then export CXX_FLAGS="${CXX_FLAGS} -fsanitize=address,undefined,integer -fno-omit-frame-pointer -fno-sanitize=unsigned-integer-overflow"; fi
- if [ -n "$CLANG_VERSION" ]; then CXX_FLAGS="${CXX_FLAGS} -D__extern_always_inline=inline"; fi
- if [ "$LIBCXX" == "On" ]; then CXX_FLAGS="${CXX_FLAGS} -stdlib=libc++ -I/usr/include/c++/v1/"; fi
- if [ "$LIBCXX" == "On" ]; then CXX_LINKER_FLAGS="${CXX_FLAGS} -L/usr/lib/ -lc++"; fi
- CXX_FLAGS="${CXX_FLAGS} -std=c++${CPP_VERSION}"
# Build
- cmake --version
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}"
- make
script:
- ctest -VV
notifications:
email: false