3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2026-07-17 11:55:44 +00:00

ci: exercise cache saves on every platform

This commit is contained in:
eitsupi 2026-07-04 04:55:03 +00:00
parent 33851f9f81
commit 7e67b2cf91

View file

@ -7,8 +7,13 @@ permissions: {}
jobs:
save:
if: github.repository == 'Swatinem/rust-cache'
name: Save a new cache on windows-latest
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Save a new cache on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
@ -24,16 +29,21 @@ jobs:
- uses: ./
with:
workspaces: tests
shared-key: save-restore-${{ github.run_id }}-${{ github.run_attempt }}
shared-key: save-restore-${{ matrix.os }}-${{ github.run_id }}-${{ github.run_attempt }}
- run: cargo check
working-directory: tests
restore:
if: github.repository == 'Swatinem/rust-cache'
name: Restore the newly saved cache on windows-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Restore the newly saved cache on ${{ matrix.os }}
needs: save
runs-on: windows-latest
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
@ -49,7 +59,7 @@ jobs:
uses: ./
with:
workspaces: tests
shared-key: save-restore-${{ github.run_id }}-${{ github.run_attempt }}
shared-key: save-restore-${{ matrix.os }}-${{ github.run_id }}-${{ github.run_attempt }}
save-if: "false"
- name: Verify exact cache hit