Skip to content

Commit c650208

Browse files
authored
Merge pull request #1111 from cipherstash/ci/mise-cache-per-image
fix(ci): key the mise cache by runner image
2 parents 5dd37db + 063530d commit c650208

13 files changed

Lines changed: 237 additions & 0 deletions

‎.github/workflows/bench-eql.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ jobs:
129129
# mise reads config from cwd and its PARENTS, so an action running at
130130
# the repo root never sees packages/eql/mise.toml.
131131
working_directory: packages/eql
132+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
133+
cache_key_prefix: mise-v1-ubuntu-2204
132134

133135
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
134136
with:

‎.github/workflows/crap-crates.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
install: true
7474
working_directory: .
7575
cache: true
76+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
77+
cache_key_prefix: mise-v1-ubuntu-2204
7678

7779
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
7880

@@ -94,6 +96,8 @@ jobs:
9496
install: true
9597
working_directory: .
9698
cache: true
99+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
100+
cache_key_prefix: mise-v1-ubuntu-2204
97101

98102
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
99103

‎.github/workflows/fuzz.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ jobs:
8989
install: true
9090
working_directory: .
9191
cache: true
92+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
93+
cache_key_prefix: mise-v1-ubuntu-2404
9294

9395
- name: Install the nightly toolchain (cargo-fuzz requires it)
9496
run: rustup toolchain install nightly --profile minimal
@@ -135,6 +137,8 @@ jobs:
135137
install: true
136138
working_directory: .
137139
cache: true
140+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
141+
cache_key_prefix: mise-v1-ubuntu-2404
138142

139143
- name: Install the nightly toolchain (cargo-fuzz requires it)
140144
run: rustup toolchain install nightly --profile minimal

‎.github/workflows/integration-protect-ffi.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ jobs:
338338
with:
339339
install: true
340340
working_directory: languages/typescript/packages/protect-ffi
341+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
342+
cache_key_prefix: mise-v1-ubuntu-2404
341343

342344
# One task, four things the suite cannot run without (see
343345
# integration-tests/tasks.toml): `pnpm install --frozen-lockfile` (a

‎.github/workflows/macro-expand-eql.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ jobs:
6565
install: true
6666
cache: true
6767
working_directory: packages/eql
68+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
69+
cache_key_prefix: mise-v1-ubuntu-2204
6870

6971
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
7072
with:

‎.github/workflows/miri.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
working_directory: .
5555
install_args: rust
5656
cache: true
57+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
58+
cache_key_prefix: mise-v1-ubuntu-2404
5759

5860
- name: Install the nightly toolchain with Miri
5961
run: |

‎.github/workflows/mutants.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
working_directory: .
8585
install_args: rust cargo:cargo-nextest cargo:cargo-mutants
8686
cache: true
87+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
88+
cache_key_prefix: mise-v1-ubuntu-2204
8789

8890
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
8991

‎.github/workflows/test-eql.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ jobs:
348348
install: true
349349
cache: true
350350
working_directory: packages/eql
351+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
352+
cache_key_prefix: mise-v1-ubuntu-2204
351353

352354
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
353355
with:
@@ -422,6 +424,8 @@ jobs:
422424
install: true
423425
cache: true
424426
working_directory: packages/eql
427+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
428+
cache_key_prefix: mise-v1-ubuntu-2204
425429

426430
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
427431
with:
@@ -473,6 +477,8 @@ jobs:
473477
install: true
474478
cache: true
475479
working_directory: packages/eql
480+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
481+
cache_key_prefix: mise-v1-ubuntu-2204
476482

477483
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
478484
with:
@@ -523,6 +529,8 @@ jobs:
523529
install: true
524530
cache: true
525531
working_directory: packages/eql
532+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
533+
cache_key_prefix: mise-v1-ubuntu-2204
526534
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
527535
with:
528536
workspaces: packages/eql
@@ -562,6 +570,8 @@ jobs:
562570
install: true
563571
cache: true
564572
working_directory: packages/eql
573+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
574+
cache_key_prefix: mise-v1-ubuntu-2204
565575
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
566576
with:
567577
workspaces: packages/eql
@@ -670,6 +680,8 @@ jobs:
670680
install: true
671681
cache: true
672682
working_directory: packages/eql
683+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
684+
cache_key_prefix: mise-v1-ubuntu-2204
673685
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
674686
with:
675687
workspaces: packages/eql
@@ -700,6 +712,8 @@ jobs:
700712
install: true
701713
cache: true
702714
working_directory: packages/eql
715+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
716+
cache_key_prefix: mise-v1-ubuntu-2204
703717
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
704718
with:
705719
workspaces: packages/eql
@@ -734,6 +748,8 @@ jobs:
734748
install: true
735749
cache: true
736750
working_directory: packages/eql
751+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
752+
cache_key_prefix: mise-v1-ubuntu-2204
737753
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
738754
with:
739755
workspaces: packages/eql
@@ -776,6 +792,8 @@ jobs:
776792
install: true
777793
cache: true
778794
working_directory: packages/eql
795+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
796+
cache_key_prefix: mise-v1-ubuntu-2204
779797
# This job looks Rust-free and is not. `test:splinter` is a bash script
780798
# that pipes SQL through psql, but the build step below runs `mise run
781799
# build`, and `tasks/build.sh` shells out to `cargo run -q -p eql-codegen`
@@ -832,6 +850,8 @@ jobs:
832850
install: true
833851
cache: true
834852
working_directory: packages/eql
853+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
854+
cache_key_prefix: mise-v1-ubuntu-2204
835855
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
836856
with:
837857
workspaces: packages/eql
@@ -872,6 +892,8 @@ jobs:
872892
install: true
873893
cache: true
874894
working_directory: packages/eql
895+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
896+
cache_key_prefix: mise-v1-ubuntu-2204
875897
# The gate detects drift by cross-checking a loose declaration count against
876898
# a strict parse, so an over-accepting parser defeats it silently. Runs
877899
# first, and needs no token: a broken parser makes the gate below
@@ -905,6 +927,8 @@ jobs:
905927
install: true
906928
cache: true
907929
working_directory: packages/eql
930+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
931+
cache_key_prefix: mise-v1-ubuntu-2204
908932
- name: Every intra-document anchor link resolves
909933
run: |
910934
mise run test:doc-anchors
@@ -950,6 +974,8 @@ jobs:
950974
install: true
951975
cache: true
952976
working_directory: packages/eql
977+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
978+
cache_key_prefix: mise-v1-ubuntu-2204
953979
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
954980
with:
955981
workspaces: packages/eql

‎.github/workflows/tests-crates.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ jobs:
105105
install: true
106106
working_directory: .
107107
cache: true
108+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
109+
cache_key_prefix: mise-v1-ubuntu-2204
108110

109111
# mise caches its rust install as a symlink into ~/.rustup, which the
110112
# cache does not hold. On a runner image that already carries a 1.94.1
@@ -166,6 +168,8 @@ jobs:
166168
working_directory: .
167169
install_args: rust aqua:wasm-bindgen/wasm-pack
168170
cache: true
171+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
172+
cache_key_prefix: mise-v1-ubuntu-2204
169173

170174
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
171175

‎.github/workflows/tests-golang.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ jobs:
105105
install: true
106106
working_directory: .
107107
cache: true
108+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
109+
cache_key_prefix: mise-v1-ubuntu-2204
108110

109111
# mise caches its rust install as a symlink into ~/.rustup, which the
110112
# cache does not hold. On a runner image that already carries a 1.94.1
@@ -201,6 +203,8 @@ jobs:
201203
working_directory: .
202204
install_args: go golangci-lint
203205
cache: true
206+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
207+
cache_key_prefix: mise-v1-ubuntu-2404
204208

205209
- name: golangci-lint
206210
run: mise run go:lint
@@ -309,6 +313,8 @@ jobs:
309313
working_directory: .
310314
install_args: rust go
311315
cache: true
316+
# Must name runs-on's image; see scripts/__tests__/workflow-mise-cache-image.test.mjs
317+
cache_key_prefix: mise-v1-ubuntu-2404
312318

313319
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
314320

0 commit comments

Comments
 (0)