Skip to content

Commit

Permalink
🩹 Encode runner in the cargo-install cache key
Browse files Browse the repository at this point in the history
The cache key used for the `cargo-install` component action was a
generic string of `cargo-install-<target>`, which did not encode the
OS that the runner is running on. This appeared to be fine for a while,
but is now failing between macOS and Linux; with my suspicions being
that this is due to it allowing cross-os caching for Linux and macOS.
The docs for the cross-OS feature only calls out Windows as the
cross-target, so it's unsure if this is actually the reason.

At any rate, the fix is easy enough, and for correctness this is
what should have been done anyway.
  • Loading branch information
bitwizeshift committed Dec 16, 2023
1 parent e6a1150 commit db83738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/cargo-install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
uses: actions/cache@v3
with:
path: .cargo/bin/${{ inputs.target }}
key: cargo-install-${{ inputs.target }}
key: cargo-install-${{ runner.os }}-${{ inputs.target }}

- name: Install cargo binary
if: steps.cargo-install.outputs.cache-hit != 'true'
Expand Down

0 comments on commit db83738

Please sign in to comment.