Skip to content

Commit dc81e98

Browse files
authored
Merge pull request #971 from ocaml/use-azure-sdk-for-upload-cache
Use Azure SDK for upload cache
2 parents ebe916a + 4a69350 commit dc81e98

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

dist/index.cjs

+12-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.cjs

+7-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-ocaml/src/cache.ts

+14-4
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ async function restoreCache(
109109
}
110110
try {
111111
const cacheKey = await backOff(
112-
async () => await cache.restoreCache(paths, key, restoreKeys, options),
112+
async () =>
113+
await cache.restoreCache(paths, key, restoreKeys, {
114+
useAzureSdk: true,
115+
downloadConcurrency: 8,
116+
...options,
117+
}),
113118
{ numOfAttempts: 5 },
114119
);
115120
if (cacheKey) {
@@ -137,9 +142,14 @@ async function saveCache(key: string, paths: string[]) {
137142
return;
138143
}
139144
try {
140-
await backOff(async () => await cache.saveCache(paths, key), {
141-
numOfAttempts: 5,
142-
});
145+
await backOff(
146+
async () =>
147+
await cache.saveCache(paths, key, {
148+
useAzureSdk: true,
149+
uploadConcurrency: 8,
150+
}),
151+
{ numOfAttempts: 5 },
152+
);
143153
} catch (error) {
144154
if (error instanceof Error) {
145155
core.info(error.message);

0 commit comments

Comments
 (0)