-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
81 lines (69 loc) · 1.85 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
sudo: false
language: c++
notifications:
email: false
addons:
# these apt sources will be referenced later (by using *name)
apt:
sources: &apt_sources
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
- llvm-toolchain-trusty-5.0
compiler: clang
os: linux
matrix:
include:
# GCC 7
- env: COMPILER=g++-7
compiler: gcc
addons: &gcc7
apt:
packages: ["g++-7", "xorg-dev", "libx11-dev", "libgl1-mesa-dev"]
sources: *apt_sources
# Clang 5.0
- env: COMPILER=clang++-5.0
addons: &clang5
apt:
packages: ["clang-5.0", "g++-7", "xorg-dev", "libx11-dev", "libgl1-mesa-dev"]
sources: *apt_sources
- env: COMPILER=clang++
osx_image: xcode9.2
os: osx
allow_failures:
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
# setup newer cmake
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.2-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}
else
if brew list -1 | grep -q "^cmake\$"; then
brew outdated cmake || brew upgrade cmake
else
brew install cmake
fi
fi
- cd ${TRAVIS_BUILD_DIR}
- export CXX="${COMPILER}"
before_script:
- ${CXX} --version
- git submodule update --init --recursive
script:
# -g -fno-omit-frame-pointer -fsanitize=address,undefined
# debug
- mkdir build_debug
- cd build_debug
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build .
- ctest --output-on-failure
- cd ..
# release
- mkdir build_release
- cd build_release
- cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake --build .
- ctest --output-on-failure
- cd ..