22# Distributed under the Boost Software License, Version 1.0.
33# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
44
5- language : c++
5+ language : cpp
6+ os : linux # Use Linux unless specified otherwise
7+ dist : precise # Use precise unless specified otherwise
68sudo : false
79
810# Do not build branches of the form "pr/*". By prefixing pull requests coming
1921 - secure : " gB1wvjk565j3O4UBGjyN44Vd8IGqcNHzkbvRdFNHp7C+C+JG2vhAeLlpiK0Zd483gdTjq9gPjIDwpwyG2UJ+yjT1kMTJvD1YNWpGcK6vOHYl1yMOwv/LBdnKn+J7i/FnoeULGRCCI2Fpp1qILhxeZgLxTxsdQaYXlAkkR0i8cgQ="
2022
2123
22- addons :
23- apt :
24- packages :
25- - valgrind
26- - g++-6
27- sources : &sources
28- - ubuntu-toolchain-r-test
29-
30-
3124cache :
3225 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
3726 - ${TRAVIS_BUILD_DIR}/deps/boost-1.59.0
3827 - ${TRAVIS_BUILD_DIR}/deps/boost-1.60.0
3928 - ${TRAVIS_BUILD_DIR}/deps/boost-1.61.0
4029 - ${TRAVIS_BUILD_DIR}/deps/boost-1.62.0
4130 - ${TRAVIS_BUILD_DIR}/deps/boost-1.63.0
31+ - ${TRAVIS_BUILD_DIR}/deps/boost-1.64.0
4232
4333
4434matrix :
@@ -48,7 +38,7 @@ matrix:
4838 # #########################################################################
4939 - os : osx
5040 env : CHECK_FORMATTING=true
51- osx_image : xcode8
41+ osx_image : xcode9.1
5242
5343 # #########################################################################
5444 # Build with the main configuration on all the supported compilers
@@ -57,145 +47,143 @@ matrix:
5747 # speed up Travis builds.
5848 # #########################################################################
5949 # 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"] } }
6252
6353 # 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"] } }
6756
6857 # 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"] } }
7260
7361 # 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"] } }
7764
7865 # 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"] } }
8272
8373 # 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
8781
8882 # Xcode 6.4
8983 - os : osx
9084 env : UNIT_TESTS=true BOOST_VERSION=default
9185 osx_image : xcode6.4
9286
9387 # Xcode 7.3
88+ # - os: osx
89+ # env: UNIT_TESTS=true BOOST_VERSION=default
90+ # osx_image: xcode7.3
91+
92+ # Xcode 8.3
9493 - os : osx
9594 env : UNIT_TESTS=true BOOST_VERSION=default
96- osx_image : xcode7 .3
95+ osx_image : xcode8 .3
9796
98- # Xcode 8
97+ # Xcode 9.1
9998 - os : osx
10099 env : UNIT_TESTS=true BOOST_VERSION=default
101- osx_image : xcode8
100+ osx_image : xcode9.1
102101
103102 # #########################################################################
104103 # Build with variations in the configuration
105104 # #########################################################################
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+
106113 # 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
110116
111117 # 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
115120
116121 # 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
120124
121125 # Without exceptions on OS X
122126 - os : osx
123127 env : UNIT_TESTS=true BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF"
124- osx_image : xcode8
128+ osx_image : xcode9.1
125129
126130 # 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
130133
131134 # 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
135137
136138 # 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
140141
141142 # 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
145149
146150 # 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
150153
151154 # 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
155157
156158 # With Boost.Build instead of CMake (on OS X)
157159 - os : osx
158160 env : UNIT_TESTS=true BOOST_VERSION=default BOOST_BUILD=true
159- osx_image : xcode8
160-
161+ osx_image : xcode9.1
161162
162163 # #########################################################################
163164 # Generate the documentation
164165 # #########################################################################
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
172170
173171 # #########################################################################
174172 # Benchmarks
175173 # #########################################################################
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
180176
181177 # #########################################################################
182178 # Jobs that are allowed to fail
183179 # #########################################################################
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-
190180 # 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
194183
195184
196185 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
199187
200188
201189install :
@@ -206,12 +194,13 @@ install:
206194 - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
207195
208196 # ###########################################################################
209- # Setup default versions and override compiler if needed
197+ # Setup default versions and override CXX set by Travis if needed
210198 # ###########################################################################
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
213201
214202 - if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
203+ - ${CXX} --version
215204
216205 # ###########################################################################
217206 # Install Boost headers
@@ -258,33 +247,34 @@ install:
258247 fi
259248
260249 # ###########################################################################
261- # Install Clang, libc++ and libc++abi
250+ # Install libc++ and libc++abi if needed
262251 # ###########################################################################
263252 - |
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";
280260 fi
281261
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"
286277 fi
287- - ${CXX} --version
288278
289279 # ###########################################################################
290280 # Install a recent Doxygen
0 commit comments