Add support to opt-in enable cross-os caching on windows

This commit is contained in:
Sampark Sharma 2023-01-04 07:54:25 +00:00 committed by GitHub
parent 365406cb70
commit 5e66b6cac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 951 additions and 449 deletions

View file

@ -19,8 +19,7 @@ async function saveImpl(stateProvider: IStateProvider): Promise<number | void> {
if (!utils.isValidEvent()) {
utils.logWarning(
`Event Validation Error: The event type ${
process.env[Events.Key]
`Event Validation Error: The event type ${process.env[Events.Key]
} is not supported because it's not tied to a branch or tag ref.`
);
return;
@ -52,9 +51,14 @@ async function saveImpl(stateProvider: IStateProvider): Promise<number | void> {
required: true
});
cacheId = await cache.saveCache(cachePaths, primaryKey, {
uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize)
});
const enableCrossOsArchive = utils.getInputAsBool(Inputs.EnableCrossOsArchive);
cacheId = await cache.saveCache(
cachePaths,
primaryKey,
{ uploadChunkSize: utils.getInputAsInt(Inputs.UploadChunkSize) },
enableCrossOsArchive
);
if (cacheId != -1) {
core.info(`Cache saved with key: ${primaryKey}`);