Skip to content

Commit

Permalink
CI: add use of Swatinem/rust-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
miles170 committed Nov 4, 2022
1 parent f52eaa9 commit aeccdc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
rustup set profile minimal
rustup toolchain install stable -c "clippy,rustfmt"
rustup default stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Ensure `cargo fmt` has been run
run: cargo fmt --check
- name: Ensure MSRV is set in `clippy.toml`
Expand All @@ -45,6 +47,8 @@ jobs:
rustup set profile minimal
rustup toolchain install ${{ env.MIN_SUPPORTED_RUST_VERSION }} -c clippy
rustup default ${{ env.MIN_SUPPORTED_RUST_VERSION }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
run: cargo clippy --locked --all-targets --all-features
- name: Run tests
Expand Down Expand Up @@ -118,6 +122,11 @@ jobs:
echo "CARGO_CMD=cross" >> $GITHUB_ENV
echo "CARGO_CMD=cross" >> $Env:GITHUB_ENV
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.job.os }}-${{ matrix.job.target }}

- name: Build
run: ${{ env.CARGO_CMD }} build --locked --release --target=${{ matrix.job.target }}

Expand Down

0 comments on commit aeccdc6

Please sign in to comment.