Skip to content

Commit 27a0374

Browse files
committed
Use separate opam cache for msys2 installs
1 parent 210ca9a commit 27a0374

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

dist/index.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-ocaml/src/cache.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ async function composeOpamCacheKeys() {
5050
const ocamlCompiler = await RESOLVED_COMPILER;
5151
const repositoryUrls = OPAM_REPOSITORIES.map(([_, value]) => value).join(",");
5252
const osInfo = await system.osInfo();
53+
const msys2 = WINDOWS_ENVIRONMENT === "msys2" ? "msys2" : undefined;
5354
const plainKey = [
5455
PLATFORM,
5556
osInfo.release,
@@ -58,7 +59,9 @@ async function composeOpamCacheKeys() {
5859
ocamlCompiler,
5960
repositoryUrls,
6061
sandbox,
61-
].join(",");
62+
]
63+
.concat(msys2 ?? [])
64+
.join(",");
6265
const hash = crypto.createHash("sha256").update(plainKey).digest("hex");
6366
const key = `${CACHE_PREFIX}-setup-ocaml-opam-${hash}`;
6467
const restoreKeys = [key];

0 commit comments

Comments
 (0)