forked from CaseyCarter/cmcstl2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (63 loc) · 1.96 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
# Copyright Casey Carter 2015-2017
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
dist: xenial
language: cpp
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/cmake
matrix:
include:
- env: GCC_VERSION=7 BUILD_TYPE=Debug
os: linux
addons: &gcc7
apt:
packages:
- g++-7
- ninja-build
sources:
- ubuntu-toolchain-r-test
- env: GCC_VERSION=7 BUILD_TYPE=Release
os: linux
addons: *gcc7
- env: GCC_VERSION=8 BUILD_TYPE=Debug
os: linux
addons: &gcc8
apt:
packages:
- g++-8
- ninja-build
sources:
- ubuntu-toolchain-r-test
- env: GCC_VERSION=8 BUILD_TYPE=Release
os: linux
addons: *gcc8
before_install:
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- which $CC
- which $CXX
- $CXX --version
- ninja --version
- JOBS=2
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p "${DEPS_DIR}" && cd "${DEPS_DIR}"
############################################################################
# Install a recent CMake (unless already installed on OS X)
############################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
if [[ -z "$(ls -A ${DEPS_DIR}/cmake/bin)" ]]; then
CMAKE_URL="https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz"
mkdir -p cmake && travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake
fi
export PATH="${DEPS_DIR}/cmake/bin:${PATH}"
fi
before_script:
- cd "${TRAVIS_BUILD_DIR}"
- mkdir -p build
- cd build
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="${CXX_FLAGS}"
- ninja -v
script:
- ctest -j${JOBS} --output-on-failure