Skip to content

Commit

Permalink
Merge pull request #1239 from zcash/fasterer-ci
Browse files Browse the repository at this point in the history
CI: Add caching
  • Loading branch information
nuttycom authored Mar 8, 2024
2 parents aeb5170 + e4a8b3a commit 50b4c49
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ jobs:
uses: ./.github/actions/prepare
with:
extra-features: ${{ matrix.extra_flags != 'NOT_A_PUZZLE' && matrix.extra_flags || '' }}
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: >
cargo test
Expand All @@ -64,6 +73,15 @@ jobs:
- uses: actions/checkout@v4
- id: prepare
uses: ./.github/actions/prepare
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-latest
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- run: rustup override set ${{steps.toolchain.outputs.name}}
Expand Down Expand Up @@ -127,7 +145,6 @@ jobs:

clippy:
name: Clippy (MSRV)
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -146,7 +163,6 @@ jobs:
clippy-beta:
name: Clippy (beta)
timeout-minutes: 30
runs-on: ubuntu-latest
continue-on-error: true
steps:
Expand Down Expand Up @@ -179,6 +195,15 @@ jobs:
- uses: actions/checkout@v4
- id: prepare
uses: ./.github/actions/prepare
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: codecov-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Generate coverage report
run: >
cargo tarpaulin
Expand Down Expand Up @@ -208,7 +233,6 @@ jobs:
fmt:
name: Rustfmt
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 50b4c49

Please sign in to comment.