Compare case-insenitively for full cache key match (#303)
Some checks failed
buildjet / Test buildjet provider on ubuntu-latest (push) Has been skipped
check dist/ / check-dist (push) Has been skipped
coverage / Test `cargo-llvm-cov` on ubuntu-latest (push) Has been skipped
git-registry / Test cargo "git" registry on ubuntu-latest (push) Has been skipped
install / Test `cargo install` on ubuntu-latest (push) Has been skipped
multi-job-cache / Test multi-job cache (1) on ubuntu-latest (push) Has been skipped
multi-job-cache / Test multi-job cache (2) on ubuntu-latest (push) Has been skipped
nix / Test Nix on ubuntu-latest (push) Has been skipped
simple / Test `cargo check/test/build` on ubuntu-latest (push) Has been skipped
target-dir / Test custom target-dir on ubuntu-latest (push) Has been skipped
workspaces / Test multiple workspaces on ubuntu-latest (push) Has been skipped
buildjet / Test buildjet provider on macos-latest (push) Has been cancelled
buildjet / Test buildjet provider on windows-latest (push) Has been cancelled
coverage / Test `cargo-llvm-cov` on macos-latest (push) Has been cancelled
coverage / Test `cargo-llvm-cov` on windows-latest (push) Has been cancelled
git-registry / Test cargo "git" registry on macos-latest (push) Has been cancelled
git-registry / Test cargo "git" registry on windows-latest (push) Has been cancelled
install / Test `cargo install` on macos-latest (push) Has been cancelled
install / Test `cargo install` on windows-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (1) on macos-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (1) on windows-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (2) on macos-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (2) on windows-latest (push) Has been cancelled
nix / Test Nix on macos-latest (push) Has been cancelled
simple / Test `cargo check/test/build` on macos-latest (push) Has been cancelled
simple / Test `cargo check/test/build` on windows-latest (push) Has been cancelled
target-dir / Test custom target-dir on macos-latest (push) Has been cancelled
target-dir / Test custom target-dir on windows-latest (push) Has been cancelled
workspaces / Test multiple workspaces on macos-latest (push) Has been cancelled
workspaces / Test multiple workspaces on windows-latest (push) Has been cancelled
Some checks failed
buildjet / Test buildjet provider on ubuntu-latest (push) Has been skipped
check dist/ / check-dist (push) Has been skipped
coverage / Test `cargo-llvm-cov` on ubuntu-latest (push) Has been skipped
git-registry / Test cargo "git" registry on ubuntu-latest (push) Has been skipped
install / Test `cargo install` on ubuntu-latest (push) Has been skipped
multi-job-cache / Test multi-job cache (1) on ubuntu-latest (push) Has been skipped
multi-job-cache / Test multi-job cache (2) on ubuntu-latest (push) Has been skipped
nix / Test Nix on ubuntu-latest (push) Has been skipped
simple / Test `cargo check/test/build` on ubuntu-latest (push) Has been skipped
target-dir / Test custom target-dir on ubuntu-latest (push) Has been skipped
workspaces / Test multiple workspaces on ubuntu-latest (push) Has been skipped
buildjet / Test buildjet provider on macos-latest (push) Has been cancelled
buildjet / Test buildjet provider on windows-latest (push) Has been cancelled
coverage / Test `cargo-llvm-cov` on macos-latest (push) Has been cancelled
coverage / Test `cargo-llvm-cov` on windows-latest (push) Has been cancelled
git-registry / Test cargo "git" registry on macos-latest (push) Has been cancelled
git-registry / Test cargo "git" registry on windows-latest (push) Has been cancelled
install / Test `cargo install` on macos-latest (push) Has been cancelled
install / Test `cargo install` on windows-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (1) on macos-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (1) on windows-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (2) on macos-latest (push) Has been cancelled
multi-job-cache / Test multi-job cache (2) on windows-latest (push) Has been cancelled
nix / Test Nix on macos-latest (push) Has been cancelled
simple / Test `cargo check/test/build` on macos-latest (push) Has been cancelled
simple / Test `cargo check/test/build` on windows-latest (push) Has been cancelled
target-dir / Test custom target-dir on macos-latest (push) Has been cancelled
target-dir / Test custom target-dir on windows-latest (push) Has been cancelled
workspaces / Test multiple workspaces on macos-latest (push) Has been cancelled
workspaces / Test multiple workspaces on windows-latest (push) Has been cancelled
Some self-hosted (or otherwise non-github-hosted) runners are non-case-preserving for cache keys. To support such configurations, set the `cache-hit` output variable to `true` if the found cache key matches case-insenitively. Fixes: https://github.com/Swatinem/rust-cache/issues/302
This commit is contained in:
4
dist/restore/index.js
vendored
4
dist/restore/index.js
vendored
@@ -151483,7 +151483,9 @@ async function run() {
|
|||||||
lookupOnly,
|
lookupOnly,
|
||||||
});
|
});
|
||||||
if (restoreKey) {
|
if (restoreKey) {
|
||||||
const match = restoreKey === key;
|
const match = restoreKey.localeCompare(key, undefined, {
|
||||||
|
sensitivity: "accent"
|
||||||
|
}) === 0;
|
||||||
lib_core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
|
lib_core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
// pre-clean the target directory on cache mismatch
|
// pre-clean the target directory on cache mismatch
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ async function run() {
|
|||||||
lookupOnly,
|
lookupOnly,
|
||||||
});
|
});
|
||||||
if (restoreKey) {
|
if (restoreKey) {
|
||||||
const match = restoreKey === key;
|
const match = restoreKey.localeCompare(key, undefined, {
|
||||||
|
sensitivity: "accent"
|
||||||
|
}) === 0;
|
||||||
core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
|
core.info(`${lookupOnly ? "Found" : "Restored from"} cache key "${restoreKey}" full match: ${match}.`);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
// pre-clean the target directory on cache mismatch
|
// pre-clean the target directory on cache mismatch
|
||||||
|
|||||||
Reference in New Issue
Block a user