Skip to content

Commit 97e255b

Browse files
authored
Shared cache keys (#1856)
2 parents 32c396e + 584f3ae commit 97e255b

5 files changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/csharp.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-26.04, macos-latest]
26+
env:
27+
RUSTUP_TOOLCHAIN: 1.85.0
2628
steps:
2729
- name: Checkout
2830
uses: actions/checkout@v6
31+
- name: "Install Rust 1.85.0"
32+
uses: dtolnay/rust-toolchain@1.85.0
2933
- name: "Use cache"
3034
uses: Swatinem/rust-cache@v2
35+
with:
36+
shared-key: msrv-workspace
3137
- name: Set up nix
3238
uses: ./.github/actions/setup-nix
3339
- name: "Build and test"

.github/workflows/dart.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-26.04, macos-latest]
26+
env:
27+
RUSTUP_TOOLCHAIN: 1.85.0
2628
steps:
2729
- name: Checkout
2830
uses: actions/checkout@v6
31+
- name: "Install Rust 1.85.0"
32+
uses: dtolnay/rust-toolchain@1.85.0
2933
- name: "Use cache"
3034
uses: Swatinem/rust-cache@v2
35+
with:
36+
shared-key: msrv-workspace
3137
- name: Set up nix
3238
uses: ./.github/actions/setup-nix
3339
- name: "Build and test"

.github/workflows/javascript.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-26.04, macos-latest]
26+
env:
27+
RUSTUP_TOOLCHAIN: 1.85.0
2628
steps:
2729
- name: Checkout
2830
uses: actions/checkout@v6
31+
- name: "Install Rust 1.85.0"
32+
uses: dtolnay/rust-toolchain@1.85.0
2933
- name: "Use cache"
3034
uses: Swatinem/rust-cache@v2
35+
with:
36+
shared-key: msrv-workspace
3137
- name: Set up nix
3238
uses: ./.github/actions/setup-nix
3339
- name: "Build and test"

.github/workflows/python.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-26.04, macos-latest]
26+
env:
27+
RUSTUP_TOOLCHAIN: 1.85.0
2628
steps:
2729
- name: Checkout
2830
uses: actions/checkout@v6
31+
- name: "Install Rust 1.85.0"
32+
uses: dtolnay/rust-toolchain@1.85.0
2933
- name: "Use cache"
3034
uses: Swatinem/rust-cache@v2
35+
with:
36+
shared-key: msrv-workspace
3137
- name: Set up nix
3238
uses: ./.github/actions/setup-nix
3339
- name: "Build and test"

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
echo "$(nix build .#nginx-with-stream --print-out-paths --no-link)/bin" >> $GITHUB_PATH
3636
- name: "Use cache"
3737
uses: Swatinem/rust-cache@v2
38+
with:
39+
shared-key: ${{ matrix.rust == 'stable' && 'stable-workspace' || matrix.rust == '1.85.0' && 'msrv-workspace' || '' }}
3840
- name: Run tests
3941
run: RUST_LOG=debug bash contrib/test.sh
4042

0 commit comments

Comments
 (0)