30
30
jobs :
31
31
32
32
licenses :
33
- runs-on : ubuntu-latest
33
+ runs-on : ubuntu-24.04
34
34
35
35
steps :
36
36
- uses : actions/checkout@v2
@@ -46,14 +46,17 @@ jobs:
46
46
~/go/pkg/mod
47
47
key : licenses-${{ hashFiles('.github/workflows/rust.yml') }}
48
48
49
- - name : Check licenses
49
+ - name : Install dependencies
50
50
run : |
51
- go install github.com/google/addlicense@latest
51
+ go install github.com/google/addlicense@v1.1.1
52
52
export PATH=$PATH:$(go env GOPATH)/bin
53
+
54
+ - name : Check licenses
55
+ run : |
53
56
addlicense -check -ignore "bazel/cargo/remote/**" .
54
57
55
58
bazel :
56
- runs-on : ubuntu-latest
59
+ runs-on : ubuntu-24.04
57
60
58
61
steps :
59
62
- uses : actions/checkout@v2
@@ -73,12 +76,13 @@ jobs:
73
76
~/.cargo/bin
74
77
~/.cargo/registry
75
78
~/go/pkg/mod
76
- key : bazel-${{ hashFiles('BUILD', 'WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.Bazel.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }}
79
+ key : bazel-${{ hashFiles('.github/workflows/rust.yml', ' BUILD', 'WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.Bazel.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }}
77
80
78
81
- name : Install dependencies
79
- if : ${{ env.ACT }}
80
82
run : |
81
- go install github.com/bazelbuild/[email protected]
83
+ go install github.com/bazelbuild/[email protected]
84
+ go install github.com/bazelbuild/buildtools/[email protected]
85
+ export PATH=$PATH:$(go env GOPATH)/bin
82
86
83
87
- name : Build (wasm32-unknown-unknown)
84
88
run : bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasm //...
88
92
89
93
- name : Format (buildifier)
90
94
run : |
91
- go install github.com/bazelbuild/buildtools/buildifier@latest
92
- export PATH=$PATH:$(go env GOPATH)/bin
93
95
buildifier -mode=check -r .
94
96
95
97
- name : Format (rules_rust)
98
100
git diff --exit-code
99
101
100
102
msrv :
101
- runs-on : ubuntu-latest
103
+ runs-on : ubuntu-24.04
102
104
103
105
env :
104
106
RUSTFLAGS : -D warnings
@@ -120,7 +122,7 @@ jobs:
120
122
**/target
121
123
key : msrv-${{ hashFiles('Cargo.toml') }}
122
124
123
- - name : Install dependencies
125
+ - name : Install Rustup
124
126
if : ${{ env.ACT }}
125
127
run : |
126
128
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -161,7 +163,7 @@ jobs:
161
163
run : cargo publish --dry-run --target=wasm32-unknown-unknown
162
164
163
165
stable :
164
- runs-on : ubuntu-latest
166
+ runs-on : ubuntu-24.04
165
167
166
168
env :
167
169
RUSTFLAGS : -D warnings
@@ -183,7 +185,7 @@ jobs:
183
185
**/target
184
186
key : stable-${{ hashFiles('Cargo.toml') }}
185
187
186
- - name : Install dependencies
188
+ - name : Install Rustup
187
189
if : ${{ env.ACT }}
188
190
run : |
189
191
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -223,7 +225,7 @@ jobs:
223
225
run : cargo publish --dry-run --target=wasm32-unknown-unknown
224
226
225
227
nightly :
226
- runs-on : ubuntu-latest
228
+ runs-on : ubuntu-24.04
227
229
228
230
env :
229
231
RUSTFLAGS : -D warnings
@@ -245,7 +247,7 @@ jobs:
245
247
**/target
246
248
key : nightly-${{ hashFiles('Cargo.toml') }}
247
249
248
- - name : Install dependencies
250
+ - name : Install Rustup
249
251
if : ${{ env.ACT }}
250
252
run : |
251
253
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -286,13 +288,12 @@ jobs:
286
288
run : cargo publish --dry-run --target=wasm32-unknown-unknown
287
289
288
290
outdated :
289
- runs-on : ubuntu-latest
291
+ runs-on : ubuntu-24.04
290
292
291
293
steps :
292
294
- uses : actions/checkout@v2
293
295
294
296
- name : Cache
295
- if : ${{ env.ACT }}
296
297
uses : actions/cache@v2
297
298
with :
298
299
path : |
@@ -302,9 +303,9 @@ jobs:
302
303
~/.cargo/bin
303
304
~/.cargo/registry
304
305
~/.rustup
305
- key : outdated-${{ hashFiles('Cargo.toml') }}
306
+ key : outdated-${{ hashFiles('.github/workflows/rust.yml', ' Cargo.toml') }}
306
307
307
- - name : Install dependencies
308
+ - name : Install Rustup
308
309
if : ${{ env.ACT }}
309
310
run : |
310
311
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -313,20 +314,28 @@ jobs:
313
314
rm rustup-init.sh
314
315
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
315
316
316
- - name : Run cargo outdated
317
+ - name : Install dependencies
318
+ run : |
319
+ cargo install cargo-outdated --version 0.16.0
320
+
321
+ - name : Run cargo outdated (main)
317
322
run : |
318
- # TODO: Switch back to the official version once it supports Cargo lockfile v4.
319
- cargo install --git https://github.com/MonterraByte/cargo-outdated.git --branch cargo-update
320
323
cargo outdated --root-deps-only --exit-code 1
321
324
325
+ - name : Run cargo outdated (examples)
326
+ run : |
327
+ for example in $(find examples -name Cargo.toml); do \
328
+ cd $(dirname $GITHUB_WORKSPACE/$example); \
329
+ cargo outdated --root-deps-only --exit-code 1; \
330
+ done
331
+
322
332
audit :
323
- runs-on : ubuntu-latest
333
+ runs-on : ubuntu-24.04
324
334
325
335
steps :
326
336
- uses : actions/checkout@v2
327
337
328
338
- name : Cache
329
- if : ${{ env.ACT }}
330
339
uses : actions/cache@v2
331
340
with :
332
341
path : |
@@ -336,26 +345,35 @@ jobs:
336
345
~/.cargo/bin
337
346
~/.cargo/registry
338
347
~/.rustup
339
- key : audit-${{ hashFiles('Cargo.toml') }}
348
+ key : audit-${{ hashFiles('.github/workflows/rust.yml', ' Cargo.toml') }}
340
349
341
- - name : Install dependencies
350
+ - name : Install Rustup
342
351
if : ${{ env.ACT }}
343
352
run : |
344
353
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
345
354
chmod +x ./rustup-init.sh
346
355
./rustup-init.sh -y
347
356
rm rustup-init.sh
348
357
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
349
- export PATH=$PATH:$HOME/.cargo/bin
350
- cargo install cargo-audit
351
358
352
- - name : Run cargo audit
359
+ - name : Install dependencies
360
+ run : |
361
+ cargo install cargo-audit --version 0.21.0
362
+
363
+ - name : Run cargo audit (main)
353
364
run : |
354
365
cp -p bazel/cargo/Cargo.Bazel.lock Cargo.lock
355
366
cargo audit
356
367
368
+ - name : Run cargo audit (examples)
369
+ run : |
370
+ for example in $(find examples -name Cargo.toml); do \
371
+ cd $(dirname $GITHUB_WORKSPACE/$example); \
372
+ cargo audit; \
373
+ done
374
+
357
375
examples :
358
- runs-on : ubuntu-latest
376
+ runs-on : ubuntu-24.04
359
377
360
378
strategy :
361
379
matrix :
@@ -391,7 +409,7 @@ jobs:
391
409
**/target
392
410
key : example-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }}
393
411
394
- - name : Install dependencies
412
+ - name : Install Rustup
395
413
if : ${{ env.ACT }}
396
414
run : |
397
415
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -417,15 +435,6 @@ jobs:
417
435
- name : Format (manifest)
418
436
run : cargo verify-project
419
437
420
- - name : Run cargo audit
421
- if : ${{ !env.ACT }}
422
- run : cargo audit
423
-
424
- # TODO: Re-enable once cargo outdated supports Cargo lockfile v4.
425
- # - name: Run cargo outdated
426
- # if: ${{ !env.ACT }}
427
- # run: cargo outdated --root-deps-only --exit-code 1
428
-
429
438
- name : Validate Envoy config
430
439
run : |
431
440
docker run --rm \
@@ -436,7 +445,7 @@ jobs:
436
445
-c envoy.yaml
437
446
438
447
reactors :
439
- runs-on : ubuntu-latest
448
+ runs-on : ubuntu-24.04
440
449
441
450
strategy :
442
451
matrix :
@@ -472,7 +481,7 @@ jobs:
472
481
**/target
473
482
key : reactor-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }}
474
483
475
- - name : Install dependencies
484
+ - name : Install Rustup
476
485
if : ${{ env.ACT }}
477
486
run : |
478
487
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -505,15 +514,6 @@ jobs:
505
514
- name : Format (manifest)
506
515
run : cargo verify-project
507
516
508
- - name : Run cargo audit
509
- if : ${{ !env.ACT }}
510
- run : cargo audit
511
-
512
- # TODO: Re-enable once cargo outdated supports Cargo lockfile v4.
513
- # - name: Run cargo outdated
514
- # if: ${{ !env.ACT }}
515
- # run: cargo outdated --root-deps-only --exit-code 1
516
-
517
517
- name : Rename .wasm to match expected filename
518
518
run : |
519
519
cd target/wasm32-wasip1/release
0 commit comments