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
@@ -161,17 +163,17 @@ 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
168
170
169
171
steps :
170
- - uses : actions/checkout@v2
172
+ - uses : actions/checkout@v4
171
173
172
174
- name : Cache
173
175
if : ${{ env.ACT }}
174
- uses : actions/cache@v2
176
+ uses : actions/cache@v4
175
177
with :
176
178
path : |
177
179
~/.cargo/.crates.toml
@@ -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,17 +225,17 @@ 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
230
232
231
233
steps :
232
- - uses : actions/checkout@v2
234
+ - uses : actions/checkout@v4
233
235
234
236
- name : Cache
235
237
if : ${{ env.ACT }}
236
- uses : actions/cache@v2
238
+ uses : actions/cache@v4
237
239
with :
238
240
path : |
239
241
~/.cargo/.crates.toml
@@ -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,14 +288,13 @@ 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
- - uses : actions/checkout@v2
294
+ - uses : actions/checkout@v4
293
295
294
296
- name : Cache
295
- if : ${{ env.ACT }}
296
- uses : actions/cache@v2
297
+ uses : actions/cache@v4
297
298
with :
298
299
path : |
299
300
~/.cargo/.crates.toml
@@ -302,31 +303,40 @@ 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
311
312
chmod +x ./rustup-init.sh
312
313
./rustup-init.sh -y
313
314
rm rustup-init.sh
314
315
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
315
- export PATH=$PATH:$HOME/.cargo/bin
316
- cargo install cargo-outdated
317
316
318
- - name : Run cargo outdated
319
- run : cargo outdated --root-deps-only --exit-code 1
317
+ - name : Install dependencies
318
+ run : |
319
+ cargo install cargo-outdated --version 0.16.0
320
+
321
+ - name : Run cargo outdated (main)
322
+ run : |
323
+ cargo outdated --root-deps-only --exit-code 1
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
320
331
321
332
audit :
322
- runs-on : ubuntu-latest
333
+ runs-on : ubuntu-24.04
323
334
324
335
steps :
325
- - uses : actions/checkout@v2
336
+ - uses : actions/checkout@v4
326
337
327
338
- name : Cache
328
- if : ${{ env.ACT }}
329
- uses : actions/cache@v2
339
+ uses : actions/cache@v4
330
340
with :
331
341
path : |
332
342
~/.cargo/.crates.toml
@@ -335,26 +345,35 @@ jobs:
335
345
~/.cargo/bin
336
346
~/.cargo/registry
337
347
~/.rustup
338
- key : audit-${{ hashFiles('Cargo.toml') }}
348
+ key : audit-${{ hashFiles('.github/workflows/rust.yml', ' Cargo.toml') }}
339
349
340
- - name : Install dependencies
350
+ - name : Install Rustup
341
351
if : ${{ env.ACT }}
342
352
run : |
343
353
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
344
354
chmod +x ./rustup-init.sh
345
355
./rustup-init.sh -y
346
356
rm rustup-init.sh
347
357
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
348
- export PATH=$PATH:$HOME/.cargo/bin
349
- cargo install cargo-audit
350
358
351
- - 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)
352
364
run : |
353
365
cp -p bazel/cargo/Cargo.Bazel.lock Cargo.lock
354
366
cargo audit
355
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
+
356
375
examples :
357
- runs-on : ubuntu-latest
376
+ runs-on : ubuntu-24.04
358
377
359
378
strategy :
360
379
matrix :
@@ -365,6 +384,7 @@ jobs:
365
384
- ' http_config'
366
385
- ' http_headers'
367
386
- ' grpc_auth_random'
387
+ - ' envoy_filter_metadata'
368
388
369
389
defaults :
370
390
run :
@@ -374,11 +394,11 @@ jobs:
374
394
RUSTFLAGS : -D warnings
375
395
376
396
steps :
377
- - uses : actions/checkout@v2
397
+ - uses : actions/checkout@v4
378
398
379
399
- name : Cache
380
400
if : ${{ env.ACT }}
381
- uses : actions/cache@v2
401
+ uses : actions/cache@v4
382
402
with :
383
403
path : |
384
404
~/.cargo/.crates.toml
@@ -390,7 +410,7 @@ jobs:
390
410
**/target
391
411
key : example-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }}
392
412
393
- - name : Install dependencies
413
+ - name : Install Rustup
394
414
if : ${{ env.ACT }}
395
415
run : |
396
416
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -416,14 +436,6 @@ jobs:
416
436
- name : Format (manifest)
417
437
run : cargo verify-project
418
438
419
- - name : Run cargo audit
420
- if : ${{ !env.ACT }}
421
- run : cargo audit
422
-
423
- - name : Run cargo outdated
424
- if : ${{ !env.ACT }}
425
- run : cargo outdated --root-deps-only --exit-code 1
426
-
427
439
- name : Validate Envoy config
428
440
run : |
429
441
docker run --rm \
@@ -434,7 +446,7 @@ jobs:
434
446
-c envoy.yaml
435
447
436
448
reactors :
437
- runs-on : ubuntu-latest
449
+ runs-on : ubuntu-24.04
438
450
439
451
strategy :
440
452
matrix :
@@ -445,6 +457,7 @@ jobs:
445
457
- ' http_config'
446
458
- ' http_headers'
447
459
- ' grpc_auth_random'
460
+ - ' envoy_filter_metadata'
448
461
449
462
defaults :
450
463
run :
@@ -454,11 +467,11 @@ jobs:
454
467
RUSTFLAGS : -D warnings -Z wasi-exec-model=reactor
455
468
456
469
steps :
457
- - uses : actions/checkout@v2
470
+ - uses : actions/checkout@v4
458
471
459
472
- name : Cache
460
473
if : ${{ env.ACT }}
461
- uses : actions/cache@v2
474
+ uses : actions/cache@v4
462
475
with :
463
476
path : |
464
477
~/.cargo/.crates.toml
@@ -470,7 +483,7 @@ jobs:
470
483
**/target
471
484
key : reactor-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }}
472
485
473
- - name : Install dependencies
486
+ - name : Install Rustup
474
487
if : ${{ env.ACT }}
475
488
run : |
476
489
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh
@@ -503,16 +516,6 @@ jobs:
503
516
- name : Format (manifest)
504
517
run : cargo verify-project
505
518
506
- # TODO: Re-enable once cargo audit supports Cargo lockfile v4.
507
- # - name: Run cargo audit
508
- # if: ${{ !env.ACT }}
509
- # run: cargo audit
510
-
511
- # TODO: Re-enable once cargo outdated supports Cargo lockfile v4.
512
- # - name: Run cargo outdated
513
- # if: ${{ !env.ACT }}
514
- # run: cargo outdated --root-deps-only --exit-code 1
515
-
516
519
- name : Rename .wasm to match expected filename
517
520
run : |
518
521
cd target/wasm32-wasip1/release
0 commit comments