Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Swatinem/rust-cache@v2 for caching #105

Merged
merged 1 commit into from
Aug 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 3 additions & 37 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ env:
RUSTDOCFLAGS: -Dwarnings
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CARGO_INCREMENTAL: 0
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand Down Expand Up @@ -50,19 +48,7 @@ jobs:

- name: Create Cargo.lock for caching
run: cargo update
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-index-os-check-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-index-os-check-${{ matrix.target }}
cargo-index-os-check-
cargo-index-

- uses: mozilla-actions/sccache-action@v0.0.3
- uses: Swatinem/rust-cache@v2

- run: |
cargo hack check --feature-powerset --target ${{ matrix.target }} ${{ matrix.args }}
Expand All @@ -81,17 +67,7 @@ jobs:

- name: Create Cargo.lock for caching
run: cargo update
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-index-check-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-index-check-
cargo-index-
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: Swatinem/rust-cache@v2

- run: ./check.sh

Expand All @@ -108,17 +84,7 @@ jobs:

- name: Create Cargo.lock for caching
run: cargo update
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-index-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-index-build-
cargo-index-
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: Swatinem/rust-cache@v2

- name: Compile tests
run: cargo test --all-features --workspace --no-run
Expand Down