Skip to content

Commit 9a068f7

Browse files
authored
Fix issue with cache misses on Windows due to updating cl mtime (#388)
Fix windows cache misses due to updating cl mtime fixes #387
1 parent 6aa6b76 commit 9a068f7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/restore/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66466,7 +66466,8 @@ async function configure(ccacheVariant, platform) {
6646666466
await execShell(`ccache --set-config=cache_dir='${cacheDir(ccacheVariant)}'`);
6646766467
await execShell(`ccache --set-config=max_size='${maxSize}'`);
6646866468
await execShell(`ccache --set-config=compression=true`);
66469-
if (platform === "darwin") {
66469+
if (platform === "darwin" || platform === "win32") {
66470+
// On Windows mtime will be different depending on the Visual Studio installation time, making it unreliable.
6647066471
await execShell(`ccache --set-config=compiler_check=content`);
6647166472
}
6647266473
if (lib_core.getBooleanInput("create-symlink")) {

src/restore.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ async function configure(ccacheVariant : string, platform : string) : Promise<vo
5454
await execShell(`ccache --set-config=cache_dir='${cacheDir(ccacheVariant)}'`);
5555
await execShell(`ccache --set-config=max_size='${maxSize}'`);
5656
await execShell(`ccache --set-config=compression=true`);
57-
if (platform === "darwin") {
57+
if (platform === "darwin" || platform === "win32") {
58+
// On Windows mtime will be different depending on the Visual Studio installation time, making it unreliable.
5859
await execShell(`ccache --set-config=compiler_check=content`);
5960
}
6061
if (core.getBooleanInput("create-symlink")) {

0 commit comments

Comments
 (0)