8
8
merge_group :
9
9
10
10
env :
11
- RUST_BACKTRACE : 1
12
- RUST_VERSION : 1.64
11
+ CARGO_INCREMENTAL : false
12
+ CARGO_TERM_COLOR : always
13
+ RUST_BACKTRACE : full
14
+ MSRV : 1.64
13
15
PKG_CONFIG_ALLOW_CROSS : 1 # allow android to work
14
16
RUSTFLAGS : --cfg=web_sys_unstable_apis -D warnings
15
17
RUSTDOCFLAGS : -Dwarnings
@@ -92,22 +94,17 @@ jobs:
92
94
- name : checkout repo
93
95
uses : actions/checkout@v3
94
96
95
- - name : install rust ${{ env.RUST_VERSION }}
96
- uses : actions-rs/toolchain@v1
97
- with :
98
- toolchain : ${{ env.RUST_VERSION }}
99
- target : ${{ matrix.target }}
100
- profile : minimal
101
- override : true
102
- components : clippy
97
+ - name : Install MSRV toolchain
98
+ run : |
99
+ rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy --target ${{ matrix.target }}
100
+ rustup default ${{ env.MSRV }}
103
101
104
102
- name : disable debug
105
103
shell : bash
106
104
run : |
107
105
mkdir -p .cargo
108
106
echo """
109
107
[profile.dev]
110
- incremental = false
111
108
debug = false" >> .cargo/config.toml
112
109
113
110
- name : caching
@@ -142,8 +139,7 @@ jobs:
142
139
set -e
143
140
144
141
# build for Emscripten/WebGL
145
- cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-hal \
146
- --no-default-features --features webgl,emscripten
142
+ cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-hal --no-default-features --features webgl,emscripten
147
143
148
144
# build cube example
149
145
cargo clippy --target ${{ matrix.target }} --example cube --features webgl,emscripten
@@ -164,8 +160,7 @@ jobs:
164
160
# (But watch out for backend-selection features in wgpu-core; some of
165
161
# those only build on the right platforms.)
166
162
cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-info -p player --tests --all-features
167
- cargo clippy --target ${{ matrix.target }} -p wgpu-core --tests \
168
- --features="portable_features"
163
+ cargo clippy --target ${{ matrix.target }} -p wgpu-core --tests --features="portable_features"
169
164
170
165
# build docs
171
166
# (Watch out for backend-selection features in wgpu-core; some of
@@ -180,19 +175,14 @@ jobs:
180
175
- name : checkout repo
181
176
uses : actions/checkout@v3
182
177
183
- - name : install rust stable
184
- uses : actions-rs/toolchain@v1
185
- with :
186
- toolchain : stable
187
- profile : minimal
188
- override : true
189
-
190
- - name : install wasm-pack # install from fork until this is merged: https://github.com/rustwasm/wasm-pack/pull/1185
191
- run : |
192
- # replace with "install wasm-pack action", which doesn't work for this project because of https://github.com/rustwasm/wasm-pack/issues/1180
193
- # - name: install wasm-pack
194
-
195
- cargo install --git https://github.com/haraldreingruber/wasm-pack wasm-pack
178
+ # TODO: replace with this once there is a release containing this PR:
179
+ # https://github.com/rustwasm/wasm-pack/pull/1185
180
+ # - name: Install wasm-pack
181
+ # uses: taiki-e/install-action@v2
182
+ # with:
183
+ # tool: wasm-pack
184
+ - name : install wasm-pack
185
+ run : cargo install --git https://github.com/rustwasm/wasm-pack --rev e1010233b0ce304f42cda59962254bf30ae97c3e wasm-pack
196
186
197
187
- name : execute tests
198
188
run : |
@@ -221,18 +211,10 @@ jobs:
221
211
- name : checkout repo
222
212
uses : actions/checkout@v3
223
213
224
- - name : install rust stable
225
- uses : actions-rs/toolchain@v1
214
+ - name : Install cargo-nextest and cargo-llvm-cov
215
+ uses : taiki-e/install-action@v2
226
216
with :
227
- toolchain : nightly
228
- profile : minimal
229
- override : true
230
- components : llvm-tools-preview
231
-
232
- - name : latest cargo-nextest
233
- uses : taiki-e/install-action@nextest
234
- - name : install cargo-llvm-cov
235
- uses : taiki-e/install-action@cargo-llvm-cov
217
+ tool : cargo-nextest,cargo-llvm-cov
236
218
237
219
- name : install swiftshader
238
220
if : matrix.os == 'ubuntu-22.04'
@@ -266,7 +248,6 @@ jobs:
266
248
mkdir -p .cargo
267
249
echo """
268
250
[profile.dev]
269
- incremental = false
270
251
debug = 1" >> .cargo/config.toml
271
252
272
253
- name : caching
@@ -279,7 +260,7 @@ jobs:
279
260
run : |
280
261
set -e
281
262
282
- cargo llvm-cov run --bin wgpu-info --no-report
263
+ cargo llvm-cov --no-cfg-coverage run --bin wgpu-info --no-report
283
264
284
265
- name : run tests
285
266
shell : bash
@@ -288,7 +269,7 @@ jobs:
288
269
289
270
for backend in ${{ matrix.backends }}; do
290
271
echo "======= NATIVE TESTS $backend ======";
291
- WGPU_BACKEND=$backend cargo llvm-cov nextest -p wgpu -p wgpu-types -p wgpu-hal -p wgpu-core -p player --no-fail-fast --no-report
272
+ WGPU_BACKEND=$backend cargo llvm-cov --no-cfg-coverage nextest -p wgpu -p wgpu-types -p wgpu-hal -p wgpu-core -p player --no-fail-fast --no-report
292
273
done
293
274
294
275
- name : generate coverage report
@@ -305,26 +286,18 @@ jobs:
305
286
306
287
doctest :
307
288
name : Doctest
308
- runs-on : ubuntu-22.04
289
+ runs-on : ubuntu-latest
309
290
310
291
steps :
311
292
- name : checkout repo
312
293
uses : actions/checkout@v3
313
294
314
- - name : install rust stable
315
- uses : actions-rs/toolchain@v1
316
- with :
317
- toolchain : stable
318
- profile : minimal
319
- override : true
320
-
321
295
- name : disable debug
322
296
shell : bash
323
297
run : |
324
298
mkdir -p .cargo
325
299
echo """
326
300
[profile.dev]
327
- incremental = false
328
301
debug = 1" >> .cargo/config.toml
329
302
330
303
- name : caching
@@ -346,14 +319,6 @@ jobs:
346
319
- name : checkout repo
347
320
uses : actions/checkout@v3
348
321
349
- - name : install rust
350
- uses : actions-rs/toolchain@v1
351
- with :
352
- profile : minimal
353
- toolchain : stable
354
- override : true
355
- components : rustfmt
356
-
357
322
- name : run rustfmt
358
323
run : |
359
324
cargo fmt -- --check
@@ -365,21 +330,17 @@ jobs:
365
330
- name : checkout repo
366
331
uses : actions/checkout@v3
367
332
368
- - name : install rust ${{ env.RUST_VERSION }}
369
- uses : actions-rs/toolchain@v1
370
- with :
371
- profile : minimal
372
- toolchain : ${{ env.RUST_VERSION }}
373
- override : true
374
- components : clippy
333
+ - name : Install MSRV toolchain
334
+ run : |
335
+ rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy
336
+ rustup default ${{ env.MSRV }}
375
337
376
338
- name : disable debug
377
339
shell : bash
378
340
run : |
379
341
mkdir -p .cargo
380
342
echo """
381
343
[profile.dev]
382
- incremental = false
383
344
debug = 1" >> .cargo/config.toml
384
345
385
346
- name : caching
@@ -403,7 +364,7 @@ jobs:
403
364
with :
404
365
command : check advisories
405
366
arguments : --all-features --workspace
406
- rust-version : ${{ env.RUST_VERSION }}
367
+ rust-version : ${{ env.MSRV }}
407
368
408
369
cargo-deny-check-rest :
409
370
name : " Run `cargo deny check`"
@@ -417,4 +378,4 @@ jobs:
417
378
with :
418
379
command : check bans licenses sources
419
380
arguments : --all-features --workspace
420
- rust-version : ${{ env.RUST_VERSION }}
381
+ rust-version : ${{ env.MSRV }}
0 commit comments