forked from TheDan64/inkwell
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
280 lines (275 loc) · 7.57 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
language: rust
sudo: required
cache:
directories:
- /home/travis/.cargo
before_cache:
- cargo install cargo-tarpaulin
- rm -rf /home/travis/.cargo/registry
include_base: &BASE
addons:
apt:
sources: &BASE_SOURCES
- ubuntu-toolchain-r-test
packages: &BASE_PACKAGES
- libelf-dev
- lib32z1-dev
- libedit-dev
- libdw-dev
- binutils-dev
- libiberty-dev
- libssl-dev
before_install:
- export LLVM_VERSION_DASH=${LLVM_VERSION/./-}
- export PATH=/usr/lib/llvm-${LLVM_VERSION}/bin/:$HOME/.local/bin:$PATH
- export LLVM_PATH=/usr/share/llvm-${LLVM_VERSION}/cmake/
script:
- cargo build --features "target-all,llvm${LLVM_VERSION_DASH}" --color=always
- cargo test --features "target-all,llvm${LLVM_VERSION_DASH}" --verbose --color=always
matrix:
fast_finish: true
include:
- env:
- LLVM_VERSION="3.6"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-precise-3.6
packages:
- *BASE_PACKAGES
- llvm-3.6-dev
rust: 1.52
dist: trusty
- env:
- LLVM_VERSION="3.7"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-precise-3.7
packages:
- *BASE_PACKAGES
- llvm-3.7-dev
rust: 1.52
dist: trusty
- env:
- LLVM_VERSION="3.8"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-precise-3.8
packages:
- *BASE_PACKAGES
- llvm-3.8-dev
rust: 1.52
dist: trusty
# 3.9 seems to have a linking issue :/
# - env:
# - LLVM_VERSION="3.9"
# <<: *BASE
# addons:
# apt:
# sources:
# - *BASE_SOURCES
# - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main'
# key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# packages:
# - *BASE_PACKAGES
# - llvm-3.9-dev
# rust: 1.42.0
# dist: xenial
- env:
- LLVM_VERSION="4.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-trusty-4.0
packages:
- *BASE_PACKAGES
- llvm-4.0-dev
rust: 1.52
dist: trusty
- env:
- LLVM_VERSION="5.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-trusty-5.0
packages:
- *BASE_PACKAGES
- llvm-5.0-dev
rust: 1.52
dist: trusty
- env:
- LLVM_VERSION="6.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-trusty-6.0
packages:
- *BASE_PACKAGES
- llvm-6.0-dev
rust: 1.52
dist: trusty
- env:
- LLVM_VERSION="7.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-trusty-7
packages:
- *BASE_PACKAGES
- llvm-7-dev
rust: 1.52
dist: trusty
- env:
- LLVM_VERSION="8.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-trusty-8
packages:
- *BASE_PACKAGES
- llvm-8-dev
rust: 1.45.2
dist: trusty
- env:
- LLVM_VERSION="9.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-bionic-9
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- *BASE_PACKAGES
- llvm-9-dev
rust: 1.52
dist: bionic
- env:
- LLVM_VERSION="10.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-bionic-10
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- *BASE_PACKAGES
- llvm-10-dev
- libclang-common-10-dev
rust: 1.52
dist: bionic
- env:
- LLVM_VERSION="11.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-bionic-11
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- *BASE_PACKAGES
- llvm-11-dev
- libclang-common-11-dev
rust: 1.52
dist: bionic
- env:
- LLVM_VERSION="12.0"
<<: *BASE
addons:
apt:
sources:
- *BASE_SOURCES
- llvm-toolchain-bionic-12
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- *BASE_PACKAGES
- llvm-12-dev
- libclang-common-12-dev
rust: 1.52
dist: bionic
- deploy: # Documentation build; Only latest supported LLVM version for now
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
keep-history: false
local-dir: target/doc/
on:
branch: master
before_install:
- export PATH=/usr/lib/llvm-12/bin/:$HOME/.local/bin:$PATH
- export LLVM_PATH=/usr/share/llvm-12/cmake/
script:
- cargo doc --no-default-features --features "target-all,llvm12-0,nightly" --color=always
- echo '<meta http-equiv="refresh" content="1; url=inkwell/index.html">' > target/doc/index.html
rust: nightly
name: "GitHub IO Documentation Deployment"
addons:
apt:
sources:
- *BASE_SOURCES
# - llvm-toolchain-precise-3.6
# - llvm-toolchain-precise-3.7
# - llvm-toolchain-precise-3.8
# - llvm-toolchain-trusty-3.9
# - llvm-toolchain-trusty-4.0
# - llvm-toolchain-trusty-5.0
# - llvm-toolchain-trusty-6.0
# - llvm-toolchain-trusty-7
# - llvm-toolchain-trusty-8
# - llvm-toolchain-bionic-9
# llvm-toolchain-bionic-10
# llvm-toolchain-bionic-11
- llvm-toolchain-bionic-12
- sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- *BASE_PACKAGES
# - llvm-3.6-dev
# - llvm-3.7-dev
# - llvm-3.8-dev
# - llvm-3.9-dev
# - llvm-4.0-dev
# - llvm-5.0-dev
# - llvm-6.0-dev
# - llvm-7-dev
# - llvm-8-dev
# - llvm-9-dev
# - llvm-10-dev
# - llvm-11-dev
- llvm-12-dev
- libclang-common-12-dev
dist: bionic
env:
global:
- RUSTFLAGS="-C link-dead-code -C target-cpu=native -l ffi"
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == 1.45.2 ]]; then
cargo tarpaulin --features "llvm${LLVM_VERSION_DASH}" --out Xml
bash <(curl -s https://codecov.io/bash)
fi
notifications:
email: false