forked from boost-ext/di
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
297 lines (255 loc) · 9.37 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
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
#
# Copyright (c) 2012-2020 Kris Jusiak (kris at jusiak dot net)
#
# 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)
#
env:
global:
- secure: "eWDDsd5M1F8/LMYKdeDDSyfIB9kR1MoRPEg1Cml2PbN3c7T1cHczHH/DKeOrsWD0Ti6tjltczfW4VRYgv+pDSt9TsEsXMQmI5GY2a/lR3QcI/IIuQyQJ05VcmwNRIwZgHtUGukj7uHUzrNlQkATpfmGII7HG5ZXDoG9lfXzxITA=" # GH_TOKEN
git:
depth: 1
sudo: false
branches:
except:
- gh-pages
- benchmarks
matrix:
fast_finish: true
include:
#
# Documentation
#
- os: linux
env: DOCUMENTATION=ON
#
# Style
#
- os: linux
dist: trusty
env: CHECK=ON CLANG_FORMAT=clang-format-4.0 CLANG_TIDY=clang-tidy-4.0
addons: { apt: { packages: ["clang-format-4.0", "clang-tidy-4.0"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-4.0"] } }
#
# CMake
#
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-3.6
addons: { apt: { packages: ["clang-3.6", "libstdc++-5-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.6"] } }
dist: trusty
- os: linux
env: BS=cmake CXX=clang++-3.7
addons: { apt: { packages: ["clang-3.7", "libstdc++-5-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.7"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-3.8
addons: { apt: { packages: ["clang-3.8", "libstdc++-6-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-precise-3.8"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-3.9
addons: { apt: { packages: ["clang-3.9", "libstdc++-6-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-3.9"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-4.0
addons: { apt: { packages: ["clang-4.0", "libstdc++-6-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-4.0"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-5.0
addons: { apt: { packages: ["clang-5.0", "libstdc++-6-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-6.0
addons: { apt: { packages: ["clang-6.0", "libstdc++-6-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-6.0"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-7
addons: { apt: { packages: ["clang-7", "libstdc++-7-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-7"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=clang++-8
addons: { apt: { packages: ["clang-8", "libstdc++-8-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-8"] } }
- os: linux
dist: xenial
env: BS=cmake CXX=clang++-9
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- libstdc++-9-dev
- gdb
- os: linux
dist: xenial
env: BS=cmake CXX=clang++-9 LBCXX=ON
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- libstdc++-9-dev
- gdb
- os: linux
dist: bionic
env: BS=cmake CXX=clang++-10 LBCXX=ON
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-10
- libstdc++-10-dev
- valgrind
- os: linux
dist: trusty
env: BS=cmake CXX=g++-5
addons: { apt: { packages: ["g++-5", "libstdc++-5-dev", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=g++-6
addons: { apt: { packages: ["g++-6", "libstdc++-6-dev", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=g++-7
addons: { apt: { packages: ["g++-7", "libstdc++-7-dev", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=g++-8
addons: { apt: { packages: ["g++-8", "libstdc++-8-dev", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
- os: linux
dist: trusty
env: BS=cmake CXX=g++-9
addons: { apt: { packages: ["g++-9", "libstdc++-9-dev", "valgrind"], sources: ["ubuntu-toolchain-r-test"] } }
- os: linux
dist: bionic
env: BS=cmake CXX=g++-10
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-10
- valgrind
- libstdc++-10-dev
- os: osx
osx_image: xcode8.3
env: BS=cmake CXX=clang++
- os: osx
osx_image: xcode9.4
env: BS=cmake CXX=clang++
- os: osx
osx_image: xcode10.3
env: BS=cmake CXX=clang++
- os: osx
osx_image: xcode11.6
env: BS=cmake CXX=clang++
#
# Bjam
#
- os: linux
dist: trusty
env: BS=bjam TOOLSET=clang CXX=clang++-7
addons: { apt: { packages: ["clang-7", "libstdc++-7-dev", "gdb"], sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-7"] } }
- os: linux
dist: trusty
env: BS=bjam TOOLSET=gcc CXX=g++-8
addons: { apt: { packages: ["g++-8", "libstdc++-8-dev", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
- os: osx
osx_image: xcode11.6
env: BS=bjam TOOLSET=clang CXX=clang++
#
# Static analysis
#
- os: linux
dist: xenial
env: BS=cmake VARIANT=analyze CXX=clang++-9 LIBCXX=ON
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- libstdc++-9-dev
- gdb
- os: linux
dist: trusty
env: BS=cmake VARIANT=analyze CXX=g++-8
addons: { apt: { packages: ["g++-8", "libstdc++-8-dev", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
- os: osx
osx_image: xcode11.6
env: BS=cmake VARIANT=analyze CXX=clang++
#
# Dynamic analysis
#
- os: linux
dist: xenial
env: BS=cmake MEMCHECK=valgrind CXX=clang++-9 LIBCXX=ON
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-9
- libstdc++-9-dev
- gdb
- os: linux
dist: trusty
env: BS=cmake MEMCHECK=valgrind CXX=g++-8
addons: { apt: { packages: ["g++-8", "libstdc++-8-dev", "valgrind", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
- os: osx
osx_image: xcode11.6
env: BS=cmake MEMCHECK=valgrind CXX=clang++
#
# Coverage
#
- os: linux
dist: trusty
env: BS=bjam TOOLSET=gcc GCOV=gcov-8 VARIANT=coverage CXX=g++-8
addons: { apt: { packages: ["g++-8", "libstdc++-8-dev", "gdb"], sources: ["ubuntu-toolchain-r-test"] } }
before_install:
- git config --global user.name "Continuous Integration"
- git config --global user.email "kris@jusiak.net"
- git config --global push.default simple
install:
- if [ "${BS}" == "bjam" ]; then (wget https://github.com/boostorg/build/archive/boost-1.65.1.tar.gz
&& tar zxf boost-1.65.1.tar.gz && cd build-boost-1.65.1 && ./bootstrap.sh)
&& touch Jamroot && export BOOST_ROOT="$PWD/build-boost-1.65.1" && export PATH="$PATH:$BOOST_ROOT"; fi
- if [ "${LIBCXX}" != "" ]; then (svn --quiet co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx && cmake -Bbuild -H. && cmake --build build)
&& export CXXFLAGS="-stdlib=libc++ -I${TRAVIS_BUILD_DIR}/libcxx/include"
&& export LDFLAGS="-L${TRAVIS_BUILD_DIR}/libcxx/build/lib -lc++"
&& export LD_LIBRARY_PATH="${TRAVIS_BUILD_DIR}/libcxx/build/lib:$LD_LIBRARY_PATH"; fi
script:
- if [ "${CXX}" != "" ]; then (travis_wait make all); fi
- if [ "${CHECK}" != "" ]; then (travis_wait make check); fi
- if [ "${TRAVIS_PULL_REQUEST}" == "false" ] && [ "${TRAVIS_BRANCH}" == "cpp14" ] && [ "${DOCUMENTATION}" != "" ]; then (
pip install mkdocs -U --user && git clone https://github.com/boost-ext/di
&& cd di && rm -rf * && git checkout -b gh-pages -t origin/gh-pages && git reset --hard && rm -rf * && cd ..
&& MKDOCS_THEME=boost-modern MKDOCS_SITE=site make doc
&& MKDOCS_THEME=boost-classic MKDOCS_SITE=site/boost make doc readme
&& mv site/* di && cd di && git add -A . && git commit -am "doc update"
&& git push --force --quiet "https://${GH_TOKEN}@github.com/boost-ext/di"); fi
after_success:
- if [ "${BENCHMARK}" != "" ]; then (
git clone https://github.com/boost-ext/di benchmarks
&& cd benchmarks && git checkout -b benchmarks -t origin/benchmarks
&& find ../build/test ../test -iname "*.json" | xargs -I% cp % . && git add -A . && git commit -am "update"
&& git push --force --quiet "https://${GH_TOKEN}@github.com/boost-ext/di"); fi
- if [ "${VARIANT}" == "coverage" ]; then (bash <(curl -s https://codecov.io/bash)); fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/743f46341bea58bbe3ca
on_success: change
on_failure: always
on_start: false