Skip to content

Commit

Permalink
cache cargo output for faster build and test (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfrankland authored Oct 9, 2024
1 parent 4fedd32 commit f1cc1d8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ jobs:
shell: bash
run: rustup target add ${{ matrix.target }}

- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.arch }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install latest nextest release
uses: taiki-e/install-action@nextest

Expand Down Expand Up @@ -83,6 +93,16 @@ jobs:
- name: Install Trunk
uses: trunk-io/trunk-action/install@54ccfcf9add644a36a5aa1d0046c92f654ff9e45

- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.arch }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install nextest
if: matrix.target != 'aarch64-unknown-linux-musl'
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
Expand Down

0 comments on commit f1cc1d8

Please sign in to comment.