Skip to content

Improve CI cache #1151

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

Merged
merged 2 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
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
10 changes: 2 additions & 8 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ jobs:
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target/debug
key: ${{ runner.os }}-docs-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v1

- name: Build docs
env:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,8 @@ jobs:
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v1

- name: Run clippy
uses: actions-rs/clippy-check@v1
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@ jobs:
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target/debug
key: ${{ runner.os }}-docs-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v1

- name: Build docs
env:
Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@ jobs:
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v1

- name: Run cargo test
run: cargo test
Expand Down Expand Up @@ -88,14 +82,8 @@ jobs:
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-rustc-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v1

- name: Test ${{ matrix.package }} feat. ${{ matrix.features }}
working-directory: ${{ matrix.package }}
Expand All @@ -119,14 +107,8 @@ jobs:
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-msrv-${{ steps.tc.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v1

- run: cargo check --examples --tests --all-features
env:
Expand Down