mirror of
https://github.com/Swatinem/rust-cache
synced 2025-11-05 15:06:02 +00:00
feat: Add example multi-job caching workflow
This commit is contained in:
parent
9cc4cfc950
commit
aaecf17075
1 changed files with 74 additions and 0 deletions
74
.github/workflows/multi-job-cache.yml
vendored
Normal file
74
.github/workflows/multi-job-cache.yml
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
name: multi-job-cache
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
multi-job-cache-1:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
name: Test multi-job cache (1) on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: install rust toolchain
|
||||||
|
run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
||||||
|
|
||||||
|
- name: cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
workspaces: |
|
||||||
|
tests
|
||||||
|
add-job-id-key: "false"
|
||||||
|
add-rust-environment-hash-key: "false"
|
||||||
|
|
||||||
|
- name: cargo check (tests)
|
||||||
|
working-directory: tests
|
||||||
|
run: cargo check
|
||||||
|
|
||||||
|
multi-job-cache-2:
|
||||||
|
if: github.repository == 'Swatinem/rust-cache'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
name: Test multi-job cache (2) on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: install rust toolchain
|
||||||
|
run: rustup toolchain install stable --profile minimal --target wasm32-unknown-unknown --no-self-update
|
||||||
|
|
||||||
|
- name: cache
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
workspaces: |
|
||||||
|
tests/wasm-workspace
|
||||||
|
add-job-id-key: "false"
|
||||||
|
add-rust-environment-hash-key: "false"
|
||||||
|
|
||||||
|
- name: cargo check (tests/wasm-workspace)
|
||||||
|
working-directory: tests/wasm-workspace
|
||||||
|
run: cargo check
|
||||||
Loading…
Add table
Add a link
Reference in a new issue