Skip to content

Commit ef2134f

Browse files
committed
Use separate opam cache for msys2 installs
1 parent c1f32ec commit ef2134f

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
@@ -51,6 +51,7 @@ async function composeOpamCacheKeys() {
5151
const ocamlCompiler = await RESOLVED_COMPILER;
5252
const repositoryUrls = OPAM_REPOSITORIES.map(([_, value]) => value).join();
5353
const osInfo = await system.osInfo();
54+
const msys2 = WINDOWS_ENVIRONMENT === "msys2" ? "msys2" : undefined;
5455
const plainKey = [
5556
PLATFORM,
5657
osInfo.release,
@@ -59,7 +60,9 @@ async function composeOpamCacheKeys() {
5960
ocamlCompiler,
6061
repositoryUrls,
6162
sandbox,
62-
].join();
63+
]
64+
.concat(msys2 ?? [])
65+
.join();
6366
const hash = crypto.createHash("sha256").update(plainKey).digest("hex");
6467
const key = `${CACHE_PREFIX}-setup-ocaml-opam-${hash}`;
6568
const restoreKeys = [key];

0 commit comments

Comments
 (0)