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
- - uses : actions/checkout@v2
37
- - uses : actions/setup-go@v2
36
+ - uses : actions/checkout@v4
37
+ - uses : actions/setup-go@v5
38
38
with :
39
39
go-version : ' ^1.16'
40
40
41
41
- name : Cache
42
42
if : ${{ env.ACT }}
43
- uses : actions/cache@v2
43
+ uses : actions/cache@v4
44
44
with :
45
45
path : |
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
- - uses : actions/checkout@v2
60
- - uses : actions/setup-go@v2
62
+ - uses : actions/checkout@v4
63
+ - uses : actions/setup-go@v5
61
64
with :
62
65
go-version : ' ^1.16'
63
66
64
67
- name : Cache
65
- uses : actions/cache@v2
68
+ uses : actions/cache@v4
66
69
with :
67
70
path : |
68
71
~/.cache/bazel
@@ -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,17 +100,17 @@ jobs:
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
105
107
106
108
steps :
107
- - uses : actions/checkout@v2
109
+ - uses : actions/checkout@v4
108
110
109
111
- name : Cache
110
112
if : ${{ env.ACT }}
111
- uses : actions/cache@v2
113
+ uses : actions/cache@v4
112
114
with :
113
115
path : |
114
116
~/.cargo/.crates.toml
@@ -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
@@ -164,17 +166,17 @@ jobs:
164
166
run : cargo publish --dry-run --target=wasm32-unknown-unknown
165
167
166
168
stable :
167
- runs-on : ubuntu-latest
169
+ runs-on : ubuntu-24.04
168
170
169
171
env :
170
172
RUSTFLAGS : -D warnings
171
173
172
174
steps :
173
- - uses : actions/checkout@v2
175
+ - uses : actions/checkout@v4
174
176
175
177
- name : Cache
176
178
if : ${{ env.ACT }}
177
- uses : actions/cache@v2
179
+ uses : actions/cache@v4
178
180
with :
179
181
path : |
180
182
~/.cargo/.crates.toml
@@ -186,7 +188,7 @@ jobs:
186
188
**/target
187
189
key : stable-${{ hashFiles('Cargo.toml') }}
188
190
189
- - name : Install dependencies
191
+ - name : Install Rustup
190
192
if : ${{ env.ACT }}
191
193
run : |
192
194
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -229,17 +231,17 @@ jobs:
229
231
run : cargo publish --dry-run --target=wasm32-unknown-unknown
230
232
231
233
nightly :
232
- runs-on : ubuntu-latest
234
+ runs-on : ubuntu-24.04
233
235
234
236
env :
235
237
RUSTFLAGS : -D warnings
236
238
237
239
steps :
238
- - uses : actions/checkout@v2
240
+ - uses : actions/checkout@v4
239
241
240
242
- name : Cache
241
243
if : ${{ env.ACT }}
242
- uses : actions/cache@v2
244
+ uses : actions/cache@v4
243
245
with :
244
246
path : |
245
247
~/.cargo/.crates.toml
@@ -251,7 +253,7 @@ jobs:
251
253
**/target
252
254
key : nightly-${{ hashFiles('Cargo.toml') }}
253
255
254
- - name : Install dependencies
256
+ - name : Install Rustup
255
257
if : ${{ env.ACT }}
256
258
run : |
257
259
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -298,14 +300,13 @@ jobs:
298
300
run : cargo publish --dry-run --target=wasm32-unknown-unknown
299
301
300
302
outdated :
301
- runs-on : ubuntu-latest
303
+ runs-on : ubuntu-24.04
302
304
303
305
steps :
304
- - uses : actions/checkout@v2
306
+ - uses : actions/checkout@v4
305
307
306
308
- name : Cache
307
- if : ${{ env.ACT }}
308
- uses : actions/cache@v2
309
+ uses : actions/cache@v4
309
310
with :
310
311
path : |
311
312
~/.cargo/.crates.toml
@@ -314,31 +315,40 @@ jobs:
314
315
~/.cargo/bin
315
316
~/.cargo/registry
316
317
~/.rustup
317
- key : outdated-${{ hashFiles('Cargo.toml') }}
318
+ key : outdated-${{ hashFiles('.github/workflows/rust.yml', ' Cargo.toml') }}
318
319
319
- - name : Install dependencies
320
+ - name : Install Rustup
320
321
if : ${{ env.ACT }}
321
322
run : |
322
323
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
323
324
chmod +x ./rustup-init.sh
324
325
./rustup-init.sh -y
325
326
rm rustup-init.sh
326
327
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
327
- export PATH=$PATH:$HOME/.cargo/bin
328
- cargo install cargo-outdated
329
328
330
- - name : Run cargo outdated
331
- run : cargo outdated --root-deps-only --exit-code 1
329
+ - name : Install dependencies
330
+ run : |
331
+ cargo install cargo-outdated --version 0.16.0
332
+
333
+ - name : Run cargo outdated (main)
334
+ run : |
335
+ cargo outdated --root-deps-only --exit-code 1
336
+
337
+ - name : Run cargo outdated (examples)
338
+ run : |
339
+ for example in $(find examples -name Cargo.toml); do \
340
+ cd $(dirname $GITHUB_WORKSPACE/$example); \
341
+ cargo outdated --root-deps-only --exit-code 1; \
342
+ done
332
343
333
344
audit :
334
- runs-on : ubuntu-latest
345
+ runs-on : ubuntu-24.04
335
346
336
347
steps :
337
- - uses : actions/checkout@v2
348
+ - uses : actions/checkout@v4
338
349
339
350
- name : Cache
340
- if : ${{ env.ACT }}
341
- uses : actions/cache@v2
351
+ uses : actions/cache@v4
342
352
with :
343
353
path : |
344
354
~/.cargo/.crates.toml
@@ -347,26 +357,35 @@ jobs:
347
357
~/.cargo/bin
348
358
~/.cargo/registry
349
359
~/.rustup
350
- key : audit-${{ hashFiles('Cargo.toml') }}
360
+ key : audit-${{ hashFiles('.github/workflows/rust.yml', ' Cargo.toml') }}
351
361
352
- - name : Install dependencies
362
+ - name : Install Rustup
353
363
if : ${{ env.ACT }}
354
364
run : |
355
365
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
356
366
chmod +x ./rustup-init.sh
357
367
./rustup-init.sh -y
358
368
rm rustup-init.sh
359
369
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
360
- export PATH=$PATH:$HOME/.cargo/bin
361
- cargo install cargo-audit
362
370
363
- - name : Run cargo audit
371
+ - name : Install dependencies
372
+ run : |
373
+ cargo install cargo-audit --version 0.21.0
374
+
375
+ - name : Run cargo audit (main)
364
376
run : |
365
377
cp -p bazel/cargo/Cargo.Bazel.lock Cargo.lock
366
378
cargo audit
367
379
380
+ - name : Run cargo audit (examples)
381
+ run : |
382
+ for example in $(find examples -name Cargo.toml); do \
383
+ cd $(dirname $GITHUB_WORKSPACE/$example); \
384
+ cargo audit; \
385
+ done
386
+
368
387
examples :
369
- runs-on : ubuntu-latest
388
+ runs-on : ubuntu-24.04
370
389
371
390
strategy :
372
391
matrix :
@@ -377,6 +396,7 @@ jobs:
377
396
- ' http_config'
378
397
- ' http_headers'
379
398
- ' grpc_auth_random'
399
+ - ' envoy_filter_metadata'
380
400
381
401
defaults :
382
402
run :
@@ -386,11 +406,11 @@ jobs:
386
406
RUSTFLAGS : -D warnings
387
407
388
408
steps :
389
- - uses : actions/checkout@v2
409
+ - uses : actions/checkout@v4
390
410
391
411
- name : Cache
392
412
if : ${{ env.ACT }}
393
- uses : actions/cache@v2
413
+ uses : actions/cache@v4
394
414
with :
395
415
path : |
396
416
~/.cargo/.crates.toml
@@ -402,7 +422,7 @@ jobs:
402
422
**/target
403
423
key : example-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }}
404
424
405
- - name : Install dependencies
425
+ - name : Install Rustup
406
426
if : ${{ env.ACT }}
407
427
run : |
408
428
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -428,14 +448,6 @@ jobs:
428
448
- name : Format (manifest)
429
449
run : cargo verify-project
430
450
431
- - name : Run cargo audit
432
- if : ${{ !env.ACT }}
433
- run : cargo audit
434
-
435
- - name : Run cargo outdated
436
- if : ${{ !env.ACT }}
437
- run : cargo outdated --root-deps-only --exit-code 1
438
-
439
451
- name : Validate Envoy config
440
452
run : |
441
453
docker run --rm \
@@ -446,7 +458,7 @@ jobs:
446
458
-c envoy.yaml
447
459
448
460
reactors :
449
- runs-on : ubuntu-latest
461
+ runs-on : ubuntu-24.04
450
462
451
463
strategy :
452
464
matrix :
@@ -457,6 +469,7 @@ jobs:
457
469
- ' http_config'
458
470
- ' http_headers'
459
471
- ' grpc_auth_random'
472
+ - ' envoy_filter_metadata'
460
473
461
474
defaults :
462
475
run :
@@ -466,11 +479,11 @@ jobs:
466
479
RUSTFLAGS : -D warnings -Z wasi-exec-model=reactor
467
480
468
481
steps :
469
- - uses : actions/checkout@v2
482
+ - uses : actions/checkout@v4
470
483
471
484
- name : Cache
472
485
if : ${{ env.ACT }}
473
- uses : actions/cache@v2
486
+ uses : actions/cache@v4
474
487
with :
475
488
path : |
476
489
~/.cargo/.crates.toml
@@ -482,7 +495,7 @@ jobs:
482
495
**/target
483
496
key : reactor-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }}
484
497
485
- - name : Install dependencies
498
+ - name : Install Rustup
486
499
if : ${{ env.ACT }}
487
500
run : |
488
501
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -515,16 +528,6 @@ jobs:
515
528
- name : Format (manifest)
516
529
run : cargo verify-project
517
530
518
- # TODO: Re-enable once cargo audit supports Cargo lockfile v4.
519
- # - name: Run cargo audit
520
- # if: ${{ !env.ACT }}
521
- # run: cargo audit
522
-
523
- # TODO: Re-enable once cargo outdated supports Cargo lockfile v4.
524
- # - name: Run cargo outdated
525
- # if: ${{ !env.ACT }}
526
- # run: cargo outdated --root-deps-only --exit-code 1
527
-
528
531
- name : Rename .wasm to match expected filename
529
532
run : |
530
533
cd target/wasm32-wasip1/release
0 commit comments