Additionally key on Rust toolchain file(s) if present

This commit is contained in:
Caleb Maclennan 2021-03-15 12:03:26 +03:00 committed by Arpad Borsos
parent a9bca6b5a6
commit da42bbe56d
2 changed files with 3 additions and 2 deletions

View File

@ -64,7 +64,8 @@ This cache is automatically keyed by:
- the github `job`,
- the rustc release / host / hash, and
- a hash of the `Cargo.lock` / `Cargo.toml` files.
- a hash of the `Cargo.lock` / `Cargo.toml` files (if present).
- a hash of the `rust-toolchain` / `rust-toolchain.toml` files (if present).
An additional input `key` can be provided if the builtin keys are not sufficient.

View File

@ -136,7 +136,7 @@ export async function getCmdOutput(
}
async function getLockfileHash(): Promise<string> {
const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock", { followSymbolicLinks: false });
const globber = await glob.create("**/Cargo.toml\n**/Cargo.lock\nrust-toolchain\nrust-toolchain.toml", { followSymbolicLinks: false });
const files = await globber.glob();
files.sort((a, b) => a.localeCompare(b));