-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
179 lines (151 loc) · 5.14 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
sudo: true
language: generic
os: linux
dist: trusty
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/cmake
- ${TRAVIS_BUILD_DIR}/deps/boost
matrix:
include:
##======================
## Linux
##======================
##===============
## GCC
##===============
- env: BUILD_TYPE=Debug COMPILER_NAME=gcc CXX=g++-7 CC=gcc-7
addons: &gcc7
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- env: BUILD_TYPE=Release COMPILER_NAME=gcc CXX=g++-7 CC=gcc-7
addons: *gcc7
- env: BUILD_TYPE=Debug COMPILER_NAME=gcc CXX=g++-6 CC=gcc-6
addons: &gcc6
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- env: BUILD_TYPE=Release COMPILER_NAME=gcc CXX=g++-6 CC=gcc-6
addons: *gcc6
- env: BUILD_TYPE=Debug COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5
addons: &gcc5
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- env: BUILD_TYPE=Release COMPILER_NAME=gcc CXX=g++-5 CC=gcc-5
addons: *gcc5
##===============
## Clang
##===============
- env: BUILD_TYPE=Debug COMPILER_NAME=clang CXX=clang++-5.0 CC=clang-5.0
addons: &clang50
apt:
sources:
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
packages:
- clang-5.0
- env: BUILD_TYPE=Release COMPILER_NAME=clang CXX=clang++-5.0 CC=clang-5.0
addons: *clang50
- env: BUILD_TYPE=Debug COMPILER_NAME=clang CXX=clang++-4.0 CC=clang-4.0
addons: &clang40
apt:
sources:
- llvm-toolchain-trusty-4.0
- ubuntu-toolchain-r-test
packages:
- clang-4.0
- env: BUILD_TYPE=Release COMPILER_NAME=clang CXX=clang++-4.0 CC=clang-4.0
addons: *clang40
- env: BUILD_TYPE=Debug COMPILER_NAME=clang CXX=clang++-3.9 CC=clang-3.9
addons: &clang39
apt:
sources:
- llvm-toolchain-trusty-3.9
- ubuntu-toolchain-r-test
packages:
- clang-3.9
- env: BUILD_TYPE=Release COMPILER_NAME=clang CXX=clang++-3.9 CC=clang-3.9
addons: *clang39
- env: BUILD_TYPE=Debug COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
addons: &clang38
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- clang-3.8
- env: BUILD_TYPE=Release COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
addons: *clang38
- env: BUILD_TYPE=Debug COMPILER_NAME=clang CXX=clang++-3.7 CC=clang-3.7
addons: &clang37
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- clang-3.7
- env: BUILD_TYPE=Release COMPILER_NAME=clang CXX=clang++-3.7 CC=clang-3.7
addons: *clang37
- env: BUILD_TYPE=Debug COMPILER_NAME=clang CXX=clang++-3.6 CC=clang-3.6
addons: &clang36
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- clang-3.6
- env: BUILD_TYPE=Release COMPILER_NAME=clang CXX=clang++-3.6 CC=clang-3.6
addons: *clang36
- env: BUILD_TYPE=Debug COMPILER_NAME=clang CXX=clang++-3.5 CC=clang-3.5
addons: &clang35
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- clang-3.5
- env: BUILD_TYPE=Release COMPILER_NAME=clang CXX=clang++-3.5 CC=clang-3.5
addons: *clang35
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -pv "${DEPS_DIR}" && cd "${DEPS_DIR}"
## Update the ancient version of CMake installed on Travis...
## Version 3,5 has been chosen since it is the version that ships with
## Ubuntu 16.04 LTS and could, therefore, be considered te minimum supported
## version of CMake.
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
mkdir -p cmake
travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar -xz --strip-components=1 -C cmake
export PATH="${DEPS_DIR}/cmake/bin:${PATH}"
fi
- cmake --version
## Travis also has an older version of Boost (1.55.0) that does not contain
## boost::optional::value. This came about in 1.56.0... We grab a copy of
## version 1.58.0 which is what ships with Ubuntu 16.04 LTS and could, therefore
## be considered the minimum supported version of Boost.
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
BOOST_URL="http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz"
mkdir -p boost/boost_1_58_0
travis_retry wget -O - "${BOOST_URL}" | tar -xz --strip-components=1 -C boost/boost_1_58_0
export BOOST_ROOT="${DEPS_DIR}/boost/boost_1_58_0"
fi
- cd "${TRAVIS_BUILD_DIR}"
- echo "${BOOST_ROOT}"
before_script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DDLIBXX_ENABLE_TESTS=ON -DBOOST_ROOT="${BOOST_ROOT}" ..
script:
- cmake --build .
- ctest --output-on-failure