3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2026-07-24 15:22:33 +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: jobs:
save: save:
if: github.repository == 'Swatinem/rust-cache' if: github.repository == 'Swatinem/rust-cache'
name: Save a new cache on windows-latest strategy:
runs-on: windows-latest fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Save a new cache on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@ -24,16 +29,21 @@ jobs:
- uses: ./ - uses: ./
with: with:
workspaces: tests 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 - run: cargo check
working-directory: tests working-directory: tests
restore: restore:
if: github.repository == 'Swatinem/rust-cache' 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 needs: save
runs-on: windows-latest runs-on: ${{ matrix.os }}
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@ -49,7 +59,7 @@ jobs:
uses: ./ uses: ./
with: with:
workspaces: tests 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" save-if: "false"
- name: Verify exact cache hit - name: Verify exact cache hit