forked from BoostGSoC17/static-views
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
257 lines (224 loc) · 7.45 KB
/
Copy path.travis.yml
File metadata and controls
257 lines (224 loc) · 7.45 KB
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# Copyright Tom Westerhout 2017.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
language: cpp
sudo: false
# We need Ubuntu 14.04 rather than 12.04 to get latest compilers
dist: trusty
python: "3.6"
os:
- linux
- osx
branches:
only:
- development
env:
global:
- BOOST_ROOT=${HOME}/boost-trunk
- SPHINX_ROOT=${HOME}/sphinx-trunk
- BREATHE_ROOT=${HOME}/breathe-trunk
# Workaround for https://github.com/travis-ci/travis-ci/issues/4681
matrix:
- TRAVIS_EMPTY_JOB_WORKAROUND=true
matrix:
exclude:
- env: TRAVIS_EMPTY_JOB_WORKAROUND=true
include:
############################################################################
# Builds with GCC
############################################################################
# - os: linux
# env: TOOLSET=gcc COMPILER=g++-6 CXXFLAGS="-std=c++14" BENCHMARK=true
# addons:
# apt:
# packages:
# - g++-6
# - gnuplot
# sources:
# - ubuntu-toolchain-r-test
# - os: linux
# env: TOOLSET=gcc COMPILER=g++-6 CXXFLAGS="-std=c++1z" BENCHMARK=false
# addons:
# apt:
# packages:
# - g++-6
# sources:
# - ubuntu-toolchain-r-test
# - os: linux
# env: TOOLSET=gcc COMPILER=g++-7 CXXFLAGS="-std=c++14" BENCHMARK=true
# addons:
# apt:
# packages:
# - g++-7
# - gnuplot
# sources:
# - ubuntu-toolchain-r-test
############################################################################
# Builds with Clang
############################################################################
- os: linux
env: TOOLSET=clang COMPILER=clang++-4.0 CXXFLAGS="-std=c++14" BENCHMARK=false
addons:
apt:
packages:
- clang-4.0
- g++-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
# Buggy build :(
# - os: linux
# env: TOOLSET=clang COMPILER=clang++-4.0 CXXFLAGS="-std=c++1z" BENCHMARK=false
# addons:
# apt:
# packages:
# - clang-4.0
# - g++-7
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-trusty-4.0
- os: linux
env: TOOLSET=clang COMPILER=clang++-5.0 CXXFLAGS="-std=c++14" BENCHMARK=false
addons:
apt:
packages:
- clang-5.0
- g++-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
- os: linux
env: TOOLSET=clang COMPILER=clang++-6.0 CXXFLAGS="-std=c++14" BENCHMARK=false
addons:
apt:
packages:
- clang-6.0
- g++-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- os: linux
env: TOOLSET=clang COMPILER=clang++-7 CXXFLAGS="-std=c++14" BENCHMARK=false
addons:
apt:
packages:
- clang-7
- g++-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
############################################################################
# Builds with XCode
############################################################################
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXFLAGS="-std=c++14" BENCHMARK=false
osx_image: xcode9
# - os: osx
# env: TOOLSET=clang COMPILER=clang++ CXXFLAGS="-std=c++1z" BENCHMARK=false
# osx_image: xcode9
# - os: osx
# env: TOOLSET=clang COMPILER=clang++ CXXFLAGS="-std=c++14" BENCHMARK=true
# osx_image: xcode8.3
# - os: osx
# env: TOOLSET=clang COMPILER=clang++ CXXFLAGS="-std=c++1z" BENCHMARK=false
# osx_image: xcode8.3
allow_failures:
- os: linux
env: COMPILER=clang++-3.9
- os: linux
env: TOOLSET=gcc COMPILER=g++-8 CXXFLAGS="-std=c++14" BENCHMARK=false
addons:
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
before_install:
- |
if [[ ${TRAVIS_OS_NAME} != "osx" ]]; then
python3 --version
pip install --user sphinx
apt-cache search llvm-
apt-cache search clang-
fi
# - >
# git clone --recursive -b stable
# https://github.com/sphinx-doc/sphinx ${SPHINX_ROOT}
# - cd ${SPHINX_ROOT}
# - python3 setup.py build
# - export PYTHONPATH="${SPHINX_ROOT}/build/lib:${PYTHONPATH}"
# - >
# - git clone --recursive -b master
# - https://github.com/michaeljones/breathe ${BREATHE_ROOT}
# - cd ${BREATHE_ROOT}
# - python3 setup.py build
# - export PYTHONPATH="${BREATHE_ROOT}/build/lib:${PYTHONPATH}"
- git clone --depth 1 https://github.com/boostorg/boost.git ${BOOST_ROOT}
- cd ${BOOST_ROOT}
# For now, let StaticViews explicitly depend on two libraries: Boost.Core
# and Boost.Config. We thus get the following dependency "tree"
#
# boost/config <--+-- boost/detail
# |-- boost/assert
# |-- boost/core
# +-- boost/type_traits
#
# boost/core <--+-- boost/assert
# |-- boost/config
# |-- boost/predef
# |-- boost/static_assert
# +-- boost/type_traits
# Hence
- git submodule update --init tools/build
- git submodule update --init libs/assert
- git submodule update --init libs/config
- git submodule update --init libs/core
- git submodule update --init libs/detail
- git submodule update --init libs/predef
- git submodule update --init libs/static_assert
- git submodule update --init libs/type_traits
install:
- |
# While StaticViews is not meant to be a complete Boost library, assume
# for a minute that it it.
cd ${BOOST_ROOT}
mkdir libs/static_views
cp -r ${TRAVIS_BUILD_DIR}/* libs/static_views/
- ./bootstrap.sh
- ./b2 headers
- git config --global user.name "Travis bot"
- git config --global user.email "<>"
script:
- |
echo "using ${TOOLSET} : : ${COMPILER} : <cxxflags>\"${CXXFLAGS}\" ;" \
> ~/user-config.jam
- rm -vf ${BOOST_ROOT}/libs/static_views/test/optimisation/results/*
- rm -vf ${BOOST_ROOT}/libs/static_views/test/benchmarks/results/*
- ./b2 libs/static_views/test toolset=$TOOLSET
- |
if [[ $BENCHMARK == "true" ]]; then
{ for i in {1..10}; do sleep 300; echo "No! Don't terminate me!"; done; } &
./b2 libs/static_views/test/benchmarks toolset=$TOOLSET
fi
after_script:
- |
[[ ${TRAVIS_OS_NAME} == "osx" ]] && exit 0
cd ${BOOST_ROOT}/libs/static_views
# Suppress output to avoid leaking the token when the command fails
git clone https://twesterhout:${GITHUB_TOKEN}@github.com/BoostGSoC17/static-views \
--branch=gh-pages gh_pages_repo &>/dev/null
if [[ "${BENCHMARK}" == "true" ]]; then
cp -v test/benchmarks/results/*.png gh_pages_repo/test/benchmarks/results/
fi
cp -v test/optimisation/results/*.xml gh_pages_repo/test/optimisation/results/
pushd gh_pages_repo/doc
make html
git add --all _build
popd
pushd gh_pages_repo/test
git add --all .
git commit --allow-empty -m "Update test results for ${COMPILER} to ${TRAVIS_COMMIT}"
# Suppress output to avoid leaking the token
travis_retry git push origin gh-pages &>/dev/null
popd