Skip to content

Commit

Permalink
Add cargo data caching to CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zargony committed Jul 20, 2024
1 parent 97f594f commit 8852553
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ jobs:
components: clippy, rust-src, rustfmt
- name: Check out repository
uses: actions/checkout@v4
- name: Cache cargo data
uses: actions/cache@v4
with:
path: |
~/.cargo/git
~/.cargo/registry
# intentionally not caching `target/` here yet
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all --check
- name: Clippy
Expand All @@ -43,5 +51,13 @@ jobs:
targets: riscv32imc-unknown-none-elf
- name: Check out repository
uses: actions/checkout@v4
- name: Cache cargo data
uses: actions/cache@v4
with:
path: |
~/.cargo/git
~/.cargo/registry
# intentionally not caching `target/` here yet
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build everything
run: cargo build --workspace --all-targets --release

0 comments on commit 8852553

Please sign in to comment.