Skip to content

Commit

Permalink
Cache cargo-semver-checks in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jakoschiko committed Sep 27, 2024
1 parent 9fb14e4 commit 8743679
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,27 @@ jobs:
- uses: actions/cache@v4
with:
path: |
# See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# See https://doc.rust-lang.org/cargo/guide/build-cache.html
target
key: ${{ runner.os }}|${{ github.job }}|${{ github.run_attempt }}
restore-keys: |
${{ runner.os }}|${{ github.job }}
${{ runner.os }}
- name: Install Rust
run: |
rustup install 1.79 --profile minimal --no-self-update
rustup default 1.79
rustup component add rustfmt
rustup component add clippy
cargo install --locked cargo-semver-checks
- name: Check fmt
run: cargo fmt --all --check
Expand All @@ -55,6 +63,4 @@ jobs:
RUST_BACKTRACE: 1

- name: SemVer check
run: |
cargo install --locked cargo-semver-checks
cargo semver-checks check-release --all-features
run: cargo semver-checks check-release --all-features

0 comments on commit 8743679

Please sign in to comment.