-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (86 loc) · 2.59 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#https://github.com/Microsoft/GSL/blob/master/.travis.yml
branches:
except:
- /dev-appveyor.+/
language: cpp
os: linux
dist: trusty
git:
depth: 150
common_sources: &all_sources
- ubuntu-toolchain-r-test
matrix:
include:
# 1/ Linux Clang Builds
# Clang 7.0
- env: COMPILER=clang++-7
addons: &clang70
apt:
packages:
- clang-7
- g++-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
# Clang 6.0
- env: COMPILER=clang++-6.0
addons: &clang60
apt:
packages:
- clang-6.0
- g++-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# Clang 5.0
# - env: COMPILER=clang++-5.0
# addons: &clang50
# apt:
# packages:
# - clang-5.0
# - g++-8
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-trusty-5.0
# - sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
# key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# 2/ Linux GCC Builds
- os: linux
compiler: gcc
addons: &gcc8
apt:
sources: *all_sources
packages: ['g++-8']
env: COMPILER='g++-8'
- os: linux
compiler: gcc
addons: *gcc8
env: COMPILER='g++-8'
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
which cmake || brew install cmake;
fi
before_script:
- export CXX=${COMPILER}
- cd ${TRAVIS_BUILD_DIR}
# Use Debug builds for collecting coverage
- cmake -H. -BBuild-Debug -DCMAKE_BUILD_TYPE=Debug
# Don't bother with release build for coverage build
- cmake -H. -BBuild-Release -DCMAKE_BUILD_TYPE=Release
script:
- cd Build-Debug
- cmake --build .
- CTEST_OUTPUT_ON_FAILURE=1 ctest --exclude-regex "CheckedCmdTests" -j 2
# Go to release build
- cd ../Build-Release
- cmake --build .
- CTEST_OUTPUT_ON_FAILURE=1 ctest --exclude-regex "CheckedCmdTests" -j 2