Skip to content

Commit

Permalink
Use lockfile for cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Jun 9, 2022
1 parent ed413af commit 7c2066f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/actions/setup-builder/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ runs:
/usr/local/cargo/registry/index/
/usr/local/cargo/registry/cache/
/usr/local/cargo/git/db/
key: cargo-cache3-
key: cargo-cache3-${{ hashFiles('**/Cargo.toml') }}
- name: Generate lockfile
shell: bash
run: cargo fetch
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
# these represent compiled steps of both dependencies and arrow
# and thus are specific for a particular OS, arch and rust version.
path: /github/home/target
key: ${{ runner.os }}-${{ runner.arch }}-target-cache3-${{ inputs.rust-version }}-
key: ${{ runner.os }}-${{ runner.arch }}-target-cache3-${{ inputs.rust-version }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Build Dependencies
shell: bash
run: |
Expand All @@ -56,5 +59,4 @@ runs:
echo "Installing ${{ inputs.rust-version }}"
rustup toolchain install ${{ inputs.rust-version }}
rustup default ${{ inputs.rust-version }}
rustup component add rustfmt
echo "CARGO_TARGET_DIR=/github/home/target" >> $GITHUB_ENV

0 comments on commit 7c2066f

Please sign in to comment.