Skip to content

Commit

Permalink
ci: add runner to rust cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
mladedav committed Oct 18, 2024
1 parent c6e53c5 commit 682360c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Check
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: rustfmt
Expand All @@ -35,6 +36,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: cargo doc
env:
RUSTDOCFLAGS: "-D rustdoc::all -A rustdoc::private-doc-tests"
Expand All @@ -49,6 +51,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Install cargo-hack
run: |
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
Expand All @@ -69,6 +72,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Install cargo-public-api-crates
run: |
cargo install --git https://github.com/davidpdrsn/cargo-public-api-crates
Expand All @@ -93,6 +97,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Run tests
run: cargo test --workspace --all-features --all-targets

Expand All @@ -111,6 +116,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Run nightly tests
working-directory: axum-macros
run: cargo test
Expand All @@ -130,6 +136,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Select minimal version
run: cargo +nightly update -Z minimal-versions
- name: Fix up Cargo.lock
Expand Down Expand Up @@ -164,6 +171,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Run doc tests
run: cargo test --all-features --doc

Expand Down Expand Up @@ -194,6 +202,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Check
env:
# Clang has native cross-compilation support
Expand All @@ -220,6 +229,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Check
run: >
cargo
Expand All @@ -235,6 +245,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
prefix-key: "v0-rust-ubuntu-24.04"
- name: Install cargo-sort
run: |
cargo install cargo-sort
Expand Down

0 comments on commit 682360c

Please sign in to comment.