2
2
# Distributed under the Boost Software License, Version 1.0.
3
3
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
4
4
5
- language : c++
5
+ language : cpp
6
+ os : linux # Use Linux unless specified otherwise
7
+ dist : precise # Use precise unless specified otherwise
6
8
sudo : false
7
9
8
10
# Do not build branches of the form "pr/*". By prefixing pull requests coming
19
21
- secure : " gB1wvjk565j3O4UBGjyN44Vd8IGqcNHzkbvRdFNHp7C+C+JG2vhAeLlpiK0Zd483gdTjq9gPjIDwpwyG2UJ+yjT1kMTJvD1YNWpGcK6vOHYl1yMOwv/LBdnKn+J7i/FnoeULGRCCI2Fpp1qILhxeZgLxTxsdQaYXlAkkR0i8cgQ="
20
22
21
23
22
- addons :
23
- apt :
24
- packages :
25
- - valgrind
26
- - g++-6
27
- sources : &sources
28
- - ubuntu-toolchain-r-test
29
-
30
-
31
24
cache :
32
25
directories :
33
- - ${TRAVIS_BUILD_DIR}/deps/llvm-3.6.2
34
- - ${TRAVIS_BUILD_DIR}/deps/llvm-3.7.1
35
- - ${TRAVIS_BUILD_DIR}/deps/llvm-3.8.0
36
- - ${TRAVIS_BUILD_DIR}/deps/llvm-3.9.0
37
26
- ${TRAVIS_BUILD_DIR}/deps/boost-1.59.0
38
27
- ${TRAVIS_BUILD_DIR}/deps/boost-1.60.0
39
28
- ${TRAVIS_BUILD_DIR}/deps/boost-1.61.0
40
29
- ${TRAVIS_BUILD_DIR}/deps/boost-1.62.0
41
30
- ${TRAVIS_BUILD_DIR}/deps/boost-1.63.0
31
+ - ${TRAVIS_BUILD_DIR}/deps/boost-1.64.0
42
32
43
33
44
34
matrix :
@@ -48,7 +38,7 @@ matrix:
48
38
# #########################################################################
49
39
- os : osx
50
40
env : CHECK_FORMATTING=true
51
- osx_image : xcode8
41
+ osx_image : xcode9.1
52
42
53
43
# #########################################################################
54
44
# Build with the main configuration on all the supported compilers
@@ -57,145 +47,143 @@ matrix:
57
47
# speed up Travis builds.
58
48
# #########################################################################
59
49
# Clang 3.5
60
- # TODO: Find out why this fails to compile the test suite.
61
- # - env: UNIT_TESTS=true LLVM_VERSION= 3.5.2 BOOST_VERSION=default ENABLE_MEMCHECK=true
50
+ - env : UNIT_TESTS=true COMPILER=clang++-3.5 BOOST_VERSION=default ENABLE_MEMCHECK=true
51
+ addons : { apt: { packages: ["clang- 3.5", "valgrind"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.5"] } }
62
52
63
53
# Clang 3.6
64
- - os : linux
65
- env : UNIT_TESTS=true LLVM_VERSION=3.6.2 BOOST_VERSION=default ENABLE_MEMCHECK=true
66
- compiler : clang
54
+ - env : UNIT_TESTS=true COMPILER=clang++-3.6 BOOST_VERSION=default ENABLE_MEMCHECK=true
55
+ addons : { apt: { packages: ["clang-3.6", "valgrind"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.6"] } }
67
56
68
57
# Clang 3.7
69
- - os : linux
70
- env : UNIT_TESTS=true LLVM_VERSION=3.7.1 BOOST_VERSION=default ENABLE_MEMCHECK=true
71
- compiler : clang
58
+ - env : UNIT_TESTS=true COMPILER=clang++-3.7 BOOST_VERSION=default ENABLE_MEMCHECK=true
59
+ addons : { apt: { packages: ["clang-3.7", "valgrind"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.7"] } }
72
60
73
61
# Clang 3.8
74
- - os : linux
75
- env : UNIT_TESTS=true LLVM_VERSION=3.8.0 BOOST_VERSION=default ENABLE_MEMCHECK=true
76
- compiler : clang
62
+ - env : UNIT_TESTS=true COMPILER=clang++-3.8 BOOST_VERSION=default ENABLE_MEMCHECK=true
63
+ addons : { apt: { packages: ["clang-3.8", "valgrind"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"] } }
77
64
78
65
# Clang 3.9
79
- - os : linux
80
- env : UNIT_TESTS=true LLVM_VERSION=3.9.0 BOOST_VERSION=default ENABLE_MEMCHECK=true
81
- compiler : clang
66
+ - env : UNIT_TESTS=true COMPILER=clang++-3.9 BOOST_VERSION=default ENABLE_MEMCHECK=true
67
+ addons : { apt: { packages: ["clang-3.9", "valgrind"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.9"] } }
68
+
69
+ # Clang 4.0
70
+ - env : UNIT_TESTS=true COMPILER=clang++-4.0 BOOST_VERSION=default ENABLE_MEMCHECK=true
71
+ addons : &defaults { apt: { packages: ["clang-4.0", "valgrind"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-4.0"] } }
82
72
83
73
# GCC 6
84
- - os : linux
85
- env : UNIT_TESTS=true COMPILER=g++-6 BOOST_VERSION=default ENABLE_MEMCHECK=true
86
- compiler : gcc
74
+ - env : UNIT_TESTS=true COMPILER=g++-6 BOOST_VERSION=default ENABLE_MEMCHECK=true
75
+ addons : { apt: { packages: ["g++-6", "valgrind"], sources: ["ubuntu-toolchain-r-test"] } }
76
+
77
+ # GCC 7
78
+ - env : UNIT_TESTS=true COMPILER=g++-7 BOOST_VERSION=default ENABLE_MEMCHECK=true
79
+ addons : { apt: { packages: ["g++-7", "valgrind"], sources: ["ubuntu-toolchain-r-test"] } }
80
+ dist : trusty
87
81
88
82
# Xcode 6.4
89
83
- os : osx
90
84
env : UNIT_TESTS=true BOOST_VERSION=default
91
85
osx_image : xcode6.4
92
86
93
87
# Xcode 7.3
88
+ # - os: osx
89
+ # env: UNIT_TESTS=true BOOST_VERSION=default
90
+ # osx_image: xcode7.3
91
+
92
+ # Xcode 8.3
94
93
- os : osx
95
94
env : UNIT_TESTS=true BOOST_VERSION=default
96
- osx_image : xcode7 .3
95
+ osx_image : xcode8 .3
97
96
98
- # Xcode 8
97
+ # Xcode 9.1
99
98
- os : osx
100
99
env : UNIT_TESTS=true BOOST_VERSION=default
101
- osx_image : xcode8
100
+ osx_image : xcode9.1
102
101
103
102
# #########################################################################
104
103
# Build with variations in the configuration
105
104
# #########################################################################
105
+ # With C++17 instead of C++14, on Clang
106
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_CPP17=ON"
107
+ addons : *defaults
108
+
109
+ # With C++17 instead of C++14, on GCC
110
+ - env : UNIT_TESTS=true COMPILER=g++-6 BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_CPP17=ON"
111
+ addons : { apt: { packages: ["g++-6", "valgrind"], sources: ["ubuntu-toolchain-r-test"] } }
112
+
106
113
# Without concept checks
107
- - os : linux
108
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_CONCEPT_CHECKS=OFF"
109
- compiler : clang
114
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_CONCEPT_CHECKS=OFF"
115
+ addons : *defaults
110
116
111
117
# With debug mode
112
- - os : linux
113
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_DEBUG_MODE=ON"
114
- compiler : clang
118
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_DEBUG_MODE=ON"
119
+ addons : *defaults
115
120
116
121
# Without exceptions
117
- - os : linux
118
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF"
119
- compiler : clang
122
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF"
123
+ addons : *defaults
120
124
121
125
# Without exceptions on OS X
122
126
- os : osx
123
127
env : UNIT_TESTS=true BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF"
124
- osx_image : xcode8
128
+ osx_image : xcode9.1
125
129
126
130
# With Boost 1.59
127
- - os : linux
128
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=1.59.0
129
- compiler : clang
131
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=1.59.0
132
+ addons : *defaults
130
133
131
134
# With Boost 1.60
132
- - os : linux
133
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=1.60.0
134
- compiler : clang
135
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=1.60.0
136
+ addons : *defaults
135
137
136
138
# With Boost 1.61
137
- - os : linux
138
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=1.61.0
139
- compiler : clang
139
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=1.61.0
140
+ addons : *defaults
140
141
141
142
# With Boost 1.62
142
- - os : linux
143
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=1.62.0
144
- compiler : clang
143
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=1.62.0
144
+ addons : *defaults
145
+
146
+ # With Boost 1.63
147
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=1.63.0
148
+ addons : *defaults
145
149
146
150
# Without Boost (make sure we don't depend on it)
147
- - os : linux
148
- env : UNIT_TESTS=true LLVM_VERSION=default
149
- compiler : clang
151
+ - env : UNIT_TESTS=true COMPILER=default
152
+ addons : *defaults
150
153
151
154
# With Boost.Build instead of CMake (on Linux)
152
- - os : linux
153
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=default BOOST_BUILD=true
154
- compiler : clang
155
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=default BOOST_BUILD=true
156
+ addons : *defaults
155
157
156
158
# With Boost.Build instead of CMake (on OS X)
157
159
- os : osx
158
160
env : UNIT_TESTS=true BOOST_VERSION=default BOOST_BUILD=true
159
- osx_image : xcode8
160
-
161
+ osx_image : xcode9.1
161
162
162
163
# #########################################################################
163
164
# Generate the documentation
164
165
# #########################################################################
165
- - os : linux
166
- env : DOCUMENTATION=true LLVM_VERSION=default BOOST_VERSION=default
167
- compiler : clang
168
- - os : linux
169
- env : DOCUMENTATION=true LLVM_VERSION=default BOOST_VERSION=default BOOST_BUILD=true
170
- compiler : clang
171
-
166
+ - env : DOCUMENTATION=true COMPILER=default BOOST_VERSION=default
167
+ addons : *defaults
168
+ - env : DOCUMENTATION=true COMPILER=default BOOST_VERSION=default BOOST_BUILD=true
169
+ addons : *defaults
172
170
173
171
# #########################################################################
174
172
# Benchmarks
175
173
# #########################################################################
176
- - os : linux
177
- env : BENCHMARKS=true LLVM_VERSION=3.8.0 BOOST_VERSION=default CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release"
178
- compiler : clang
179
-
174
+ - env : BENCHMARKS=true COMPILER=default BOOST_VERSION=default CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release"
175
+ addons : *defaults
180
176
181
177
# #########################################################################
182
178
# Jobs that are allowed to fail
183
179
# #########################################################################
184
- # Clang trunk
185
- # TODO: Find a way to download pre-built Clang trunk and enable this
186
- # - os: linux
187
- # env: UNIT_TESTS=true LLVM_VERSION=trunk BOOST_VERSION=default
188
- # compiler: clang
189
-
190
180
# Boost trunk
191
- - os : linux
192
- env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=trunk
193
- compiler : clang
181
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=trunk
182
+ addons : *defaults
194
183
195
184
196
185
allow_failures :
197
- # - env: UNIT_TESTS=true LLVM_VERSION=trunk BOOST_VERSION=default
198
- - env : UNIT_TESTS=true LLVM_VERSION=default BOOST_VERSION=trunk
186
+ - env : UNIT_TESTS=true COMPILER=default BOOST_VERSION=trunk
199
187
200
188
201
189
install :
@@ -206,12 +194,13 @@ install:
206
194
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
207
195
208
196
# ###########################################################################
209
- # Setup default versions and override compiler if needed
197
+ # Setup default versions and override CXX set by Travis if needed
210
198
# ###########################################################################
211
- - if [[ "${LLVM_VERSION }" == "default" ]]; then LLVM_VERSION=3.9 .0; fi
212
- - if [[ "${BOOST_VERSION}" == "default" ]]; then BOOST_VERSION=1.63 .0; fi
199
+ - if [[ "${COMPILER }" == "default" ]]; then COMPILER=clang++-4 .0; fi
200
+ - if [[ "${BOOST_VERSION}" == "default" ]]; then BOOST_VERSION=1.64 .0; fi
213
201
214
202
- if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
203
+ - ${CXX} --version
215
204
216
205
# ###########################################################################
217
206
# Install Boost headers
@@ -258,33 +247,34 @@ install:
258
247
fi
259
248
260
249
# ###########################################################################
261
- # Install Clang, libc++ and libc++abi
250
+ # Install libc++ and libc++abi if needed
262
251
# ###########################################################################
263
252
- |
264
- if [[ "${LLVM_VERSION}" != "" ]]; then
265
- LLVM_DIR=${DEPS_DIR}/llvm-${LLVM_VERSION}
266
- if [[ -z "$(ls -A ${LLVM_DIR})" ]]; then
267
- LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
268
- LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
269
- LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
270
- CLANG_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
271
-
272
- mkdir -p ${LLVM_DIR} ${LLVM_DIR}/build ${LLVM_DIR}/projects/libcxx ${LLVM_DIR}/projects/libcxxabi ${LLVM_DIR}/clang
273
- travis_retry wget --quiet -O - ${LLVM_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}
274
- travis_retry wget --quiet -O - ${LIBCXX_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxx
275
- travis_retry wget --quiet -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/projects/libcxxabi
276
- travis_retry wget --quiet -O - ${CLANG_URL} | tar --strip-components=1 -xJ -C ${LLVM_DIR}/clang
277
- (cd ${LLVM_DIR}/build && cmake .. -DCMAKE_INSTALL_PREFIX=${LLVM_DIR}/install -DCMAKE_CXX_COMPILER=clang++)
278
- (cd ${LLVM_DIR}/build/projects/libcxx && make install -j2)
279
- (cd ${LLVM_DIR}/build/projects/libcxxabi && make install -j2)
253
+ if [[ "${CXX%%+*}" == "clang" ]]; then
254
+ if [[ "${CXX}" == "clang++-3.5" ]]; then LLVM_VERSION="3.5.2";
255
+ elif [[ "${CXX}" == "clang++-3.6" ]]; then LLVM_VERSION="3.6.2";
256
+ elif [[ "${CXX}" == "clang++-3.7" ]]; then LLVM_VERSION="3.7.1";
257
+ elif [[ "${CXX}" == "clang++-3.8" ]]; then LLVM_VERSION="3.8.1";
258
+ elif [[ "${CXX}" == "clang++-3.9" ]]; then LLVM_VERSION="3.9.1";
259
+ elif [[ "${CXX}" == "clang++-4.0" ]]; then LLVM_VERSION="4.0.0";
280
260
fi
281
261
282
- export CXXFLAGS="-nostdinc++ -isystem ${LLVM_DIR}/install/include/c++/v1"
283
- export LDFLAGS="-L ${LLVM_DIR}/install/lib -l c++ -l c++abi"
284
- export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${LLVM_DIR}/install/lib"
285
- export PATH="${LLVM_DIR}/clang/bin:${PATH}"
262
+ LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
263
+ LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
264
+ LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
265
+
266
+ mkdir -p llvm llvm/build llvm/projects/libcxx llvm/projects/libcxxabi
267
+ travis_retry wget -O - ${LLVM_URL} | tar --strip-components=1 -xJ -C llvm
268
+ travis_retry wget -O - ${LIBCXX_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxx
269
+ travis_retry wget -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxxabi
270
+ (cd llvm/build && cmake .. -DCMAKE_INSTALL_PREFIX=${DEPS_DIR}/llvm/install)
271
+ (cd llvm/build/projects/libcxx && make install -j2)
272
+ (cd llvm/build/projects/libcxxabi && make install -j2)
273
+
274
+ export CXXFLAGS="-isystem ${DEPS_DIR}/llvm/install/include/c++/v1"
275
+ export LDFLAGS="-L ${DEPS_DIR}/llvm/install/lib -l c++ -l c++abi"
276
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DEPS_DIR}/llvm/install/lib"
286
277
fi
287
- - ${CXX} --version
288
278
289
279
# ###########################################################################
290
280
# Install a recent Doxygen
0 commit comments