mirror of
https://github.com/gradle/actions
synced 2024-11-23 18:02:13 +00:00
[bot] Update dist directory
This commit is contained in:
parent
e5c1381176
commit
36455cb5f4
8 changed files with 116 additions and 44 deletions
38
dist/dependency-submission/main/index.js
vendored
38
dist/dependency-submission/main/index.js
vendored
|
@ -180159,18 +180159,20 @@ class CacheEntryListener {
|
||||||
this.requestedRestoreKeys = restoreKeys;
|
this.requestedRestoreKeys = restoreKeys;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markRestored(key, size) {
|
markRestored(key, size, time) {
|
||||||
this.restoredKey = key;
|
this.restoredKey = key;
|
||||||
this.restoredSize = size;
|
this.restoredSize = size;
|
||||||
|
this.restoredTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markNotRestored(message) {
|
markNotRestored(message) {
|
||||||
this.notRestored = message;
|
this.notRestored = message;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markSaved(key, size) {
|
markSaved(key, size, time) {
|
||||||
this.savedKey = key;
|
this.savedKey = key;
|
||||||
this.savedSize = size;
|
this.savedSize = size;
|
||||||
|
this.savedTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markAlreadyExists(key) {
|
markAlreadyExists(key) {
|
||||||
|
@ -180205,14 +180207,16 @@ ${renderEntryTable(entries)}
|
||||||
function renderEntryTable(entries) {
|
function renderEntryTable(entries) {
|
||||||
return `
|
return `
|
||||||
<table>
|
<table>
|
||||||
<tr><td></td><th>Count</th><th>Total Size (Mb)</th></tr>
|
<tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</tr>
|
||||||
<tr><td>Entries Restored</td>
|
<tr><td>Entries Restored</td>
|
||||||
<td>${getCount(entries, e => e.restoredSize)}</td>
|
<td>${getCount(entries, e => e.restoredSize)}</td>
|
||||||
<td>${getSize(entries, e => e.restoredSize)}</td>
|
<td>${getSize(entries, e => e.restoredSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.restoredTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td>Entries Saved</td>
|
<tr><td>Entries Saved</td>
|
||||||
<td>${getCount(entries, e => e.savedSize)}</td>
|
<td>${getCount(entries, e => e.savedSize)}</td>
|
||||||
<td>${getSize(entries, e => e.savedSize)}</td>
|
<td>${getSize(entries, e => e.savedSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.savedTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
`;
|
`;
|
||||||
|
@ -180223,9 +180227,11 @@ function renderEntryDetails(listener) {
|
||||||
Requested Key : ${entry.requestedKey ?? ''}
|
Requested Key : ${entry.requestedKey ?? ''}
|
||||||
Restored Key : ${entry.restoredKey ?? ''}
|
Restored Key : ${entry.restoredKey ?? ''}
|
||||||
Size: ${formatSize(entry.restoredSize)}
|
Size: ${formatSize(entry.restoredSize)}
|
||||||
|
Time: ${formatTime(entry.restoredTime)}
|
||||||
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
||||||
Saved Key : ${entry.savedKey ?? ''}
|
Saved Key : ${entry.savedKey ?? ''}
|
||||||
Size: ${formatSize(entry.savedSize)}
|
Size: ${formatSize(entry.savedSize)}
|
||||||
|
Time: ${formatTime(entry.savedTime)}
|
||||||
${getSavedMessage(entry, listener.cacheReadOnly)}
|
${getSavedMessage(entry, listener.cacheReadOnly)}
|
||||||
`)
|
`)
|
||||||
.join('---\n');
|
.join('---\n');
|
||||||
|
@ -180273,12 +180279,21 @@ function getSize(cacheEntries, predicate) {
|
||||||
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
return Math.round(bytes / (1024 * 1024));
|
return Math.round(bytes / (1024 * 1024));
|
||||||
}
|
}
|
||||||
|
function getTime(cacheEntries, predicate) {
|
||||||
|
return cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
|
}
|
||||||
function formatSize(bytes) {
|
function formatSize(bytes) {
|
||||||
if (bytes === undefined || bytes === 0) {
|
if (bytes === undefined || bytes === 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
||||||
}
|
}
|
||||||
|
function formatTime(ms) {
|
||||||
|
if (ms === undefined || ms === 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return `${ms} ms`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@ -180347,12 +180362,13 @@ function hashStrings(values) {
|
||||||
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
listener.markRequested(cacheKey, cacheRestoreKeys);
|
listener.markRequested(cacheKey, cacheRestoreKeys);
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
||||||
? {}
|
? {}
|
||||||
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
||||||
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
||||||
if (restoredEntry !== undefined) {
|
if (restoredEntry !== undefined) {
|
||||||
listener.markRestored(restoredEntry.key, restoredEntry.size);
|
listener.markRestored(restoredEntry.key, restoredEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
return restoredEntry;
|
return restoredEntry;
|
||||||
}
|
}
|
||||||
|
@ -180364,8 +180380,9 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
}
|
}
|
||||||
async function saveCache(cachePath, cacheKey, listener) {
|
async function saveCache(cachePath, cacheKey, listener) {
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
||||||
listener.markSaved(savedEntry.key, savedEntry.size);
|
listener.markSaved(savedEntry.key, savedEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error instanceof cache.ReserveCacheError) {
|
if (error instanceof cache.ReserveCacheError) {
|
||||||
|
@ -180660,7 +180677,7 @@ class AbstractEntryExtractor {
|
||||||
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
||||||
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
||||||
if (restoredEntry) {
|
if (restoredEntry) {
|
||||||
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`);
|
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern} in ${listener.restoredTime}ms`);
|
||||||
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -180709,8 +180726,8 @@ class AbstractEntryExtractor {
|
||||||
entryListener.markNotSaved('contents unchanged');
|
entryListener.markNotSaved('contents unchanged');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
|
||||||
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
||||||
|
core.info(`Saved ${artifactType} with key ${cacheKey} from ${pattern} in ${entryListener.savedTime}ms`);
|
||||||
}
|
}
|
||||||
for (const file of matchingFiles) {
|
for (const file of matchingFiles) {
|
||||||
(0, cache_utils_1.tryDelete)(file);
|
(0, cache_utils_1.tryDelete)(file);
|
||||||
|
@ -180942,13 +180959,14 @@ class GradleUserHomeCache {
|
||||||
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
||||||
key:${cacheKey.key}
|
key:${cacheKey.key}
|
||||||
restoreKeys:[${cacheKey.restoreKeys}]`);
|
restoreKeys:[${cacheKey.restoreKeys}]`);
|
||||||
const cacheResult = await (0, cache_utils_1.restoreCache)(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener);
|
const cachePath = this.getCachePath();
|
||||||
|
const cacheResult = await (0, cache_utils_1.restoreCache)(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener);
|
||||||
if (!cacheResult) {
|
if (!cacheResult) {
|
||||||
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
||||||
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`);
|
core.info(`Restored ${this.cacheDescription} with key ${cacheResult.key} to ${cachePath.join()} in ${entryListener.restoredTime}ms`);
|
||||||
try {
|
try {
|
||||||
await this.afterRestore(listener);
|
await this.afterRestore(listener);
|
||||||
}
|
}
|
||||||
|
@ -180986,9 +181004,9 @@ class GradleUserHomeCache {
|
||||||
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
|
||||||
const cachePath = this.getCachePath();
|
const cachePath = this.getCachePath();
|
||||||
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
||||||
|
core.info(`Saved ${this.cacheDescription} with key ${cacheKey} from ${cachePath.join()} in ${gradleHomeEntryListener.savedTime}ms`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
async beforeSave(listener) {
|
async beforeSave(listener) {
|
||||||
|
|
2
dist/dependency-submission/main/index.js.map
vendored
2
dist/dependency-submission/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
38
dist/dependency-submission/post/index.js
vendored
38
dist/dependency-submission/post/index.js
vendored
|
@ -133765,18 +133765,20 @@ class CacheEntryListener {
|
||||||
this.requestedRestoreKeys = restoreKeys;
|
this.requestedRestoreKeys = restoreKeys;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markRestored(key, size) {
|
markRestored(key, size, time) {
|
||||||
this.restoredKey = key;
|
this.restoredKey = key;
|
||||||
this.restoredSize = size;
|
this.restoredSize = size;
|
||||||
|
this.restoredTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markNotRestored(message) {
|
markNotRestored(message) {
|
||||||
this.notRestored = message;
|
this.notRestored = message;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markSaved(key, size) {
|
markSaved(key, size, time) {
|
||||||
this.savedKey = key;
|
this.savedKey = key;
|
||||||
this.savedSize = size;
|
this.savedSize = size;
|
||||||
|
this.savedTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markAlreadyExists(key) {
|
markAlreadyExists(key) {
|
||||||
|
@ -133811,14 +133813,16 @@ ${renderEntryTable(entries)}
|
||||||
function renderEntryTable(entries) {
|
function renderEntryTable(entries) {
|
||||||
return `
|
return `
|
||||||
<table>
|
<table>
|
||||||
<tr><td></td><th>Count</th><th>Total Size (Mb)</th></tr>
|
<tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</tr>
|
||||||
<tr><td>Entries Restored</td>
|
<tr><td>Entries Restored</td>
|
||||||
<td>${getCount(entries, e => e.restoredSize)}</td>
|
<td>${getCount(entries, e => e.restoredSize)}</td>
|
||||||
<td>${getSize(entries, e => e.restoredSize)}</td>
|
<td>${getSize(entries, e => e.restoredSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.restoredTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td>Entries Saved</td>
|
<tr><td>Entries Saved</td>
|
||||||
<td>${getCount(entries, e => e.savedSize)}</td>
|
<td>${getCount(entries, e => e.savedSize)}</td>
|
||||||
<td>${getSize(entries, e => e.savedSize)}</td>
|
<td>${getSize(entries, e => e.savedSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.savedTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
`;
|
`;
|
||||||
|
@ -133829,9 +133833,11 @@ function renderEntryDetails(listener) {
|
||||||
Requested Key : ${entry.requestedKey ?? ''}
|
Requested Key : ${entry.requestedKey ?? ''}
|
||||||
Restored Key : ${entry.restoredKey ?? ''}
|
Restored Key : ${entry.restoredKey ?? ''}
|
||||||
Size: ${formatSize(entry.restoredSize)}
|
Size: ${formatSize(entry.restoredSize)}
|
||||||
|
Time: ${formatTime(entry.restoredTime)}
|
||||||
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
||||||
Saved Key : ${entry.savedKey ?? ''}
|
Saved Key : ${entry.savedKey ?? ''}
|
||||||
Size: ${formatSize(entry.savedSize)}
|
Size: ${formatSize(entry.savedSize)}
|
||||||
|
Time: ${formatTime(entry.savedTime)}
|
||||||
${getSavedMessage(entry, listener.cacheReadOnly)}
|
${getSavedMessage(entry, listener.cacheReadOnly)}
|
||||||
`)
|
`)
|
||||||
.join('---\n');
|
.join('---\n');
|
||||||
|
@ -133879,12 +133885,21 @@ function getSize(cacheEntries, predicate) {
|
||||||
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
return Math.round(bytes / (1024 * 1024));
|
return Math.round(bytes / (1024 * 1024));
|
||||||
}
|
}
|
||||||
|
function getTime(cacheEntries, predicate) {
|
||||||
|
return cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
|
}
|
||||||
function formatSize(bytes) {
|
function formatSize(bytes) {
|
||||||
if (bytes === undefined || bytes === 0) {
|
if (bytes === undefined || bytes === 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
||||||
}
|
}
|
||||||
|
function formatTime(ms) {
|
||||||
|
if (ms === undefined || ms === 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return `${ms} ms`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@ -133953,12 +133968,13 @@ function hashStrings(values) {
|
||||||
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
listener.markRequested(cacheKey, cacheRestoreKeys);
|
listener.markRequested(cacheKey, cacheRestoreKeys);
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
||||||
? {}
|
? {}
|
||||||
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
||||||
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
||||||
if (restoredEntry !== undefined) {
|
if (restoredEntry !== undefined) {
|
||||||
listener.markRestored(restoredEntry.key, restoredEntry.size);
|
listener.markRestored(restoredEntry.key, restoredEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
return restoredEntry;
|
return restoredEntry;
|
||||||
}
|
}
|
||||||
|
@ -133970,8 +133986,9 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
}
|
}
|
||||||
async function saveCache(cachePath, cacheKey, listener) {
|
async function saveCache(cachePath, cacheKey, listener) {
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
||||||
listener.markSaved(savedEntry.key, savedEntry.size);
|
listener.markSaved(savedEntry.key, savedEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error instanceof cache.ReserveCacheError) {
|
if (error instanceof cache.ReserveCacheError) {
|
||||||
|
@ -134266,7 +134283,7 @@ class AbstractEntryExtractor {
|
||||||
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
||||||
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
||||||
if (restoredEntry) {
|
if (restoredEntry) {
|
||||||
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`);
|
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern} in ${listener.restoredTime}ms`);
|
||||||
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -134315,8 +134332,8 @@ class AbstractEntryExtractor {
|
||||||
entryListener.markNotSaved('contents unchanged');
|
entryListener.markNotSaved('contents unchanged');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
|
||||||
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
||||||
|
core.info(`Saved ${artifactType} with key ${cacheKey} from ${pattern} in ${entryListener.savedTime}ms`);
|
||||||
}
|
}
|
||||||
for (const file of matchingFiles) {
|
for (const file of matchingFiles) {
|
||||||
(0, cache_utils_1.tryDelete)(file);
|
(0, cache_utils_1.tryDelete)(file);
|
||||||
|
@ -134548,13 +134565,14 @@ class GradleUserHomeCache {
|
||||||
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
||||||
key:${cacheKey.key}
|
key:${cacheKey.key}
|
||||||
restoreKeys:[${cacheKey.restoreKeys}]`);
|
restoreKeys:[${cacheKey.restoreKeys}]`);
|
||||||
const cacheResult = await (0, cache_utils_1.restoreCache)(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener);
|
const cachePath = this.getCachePath();
|
||||||
|
const cacheResult = await (0, cache_utils_1.restoreCache)(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener);
|
||||||
if (!cacheResult) {
|
if (!cacheResult) {
|
||||||
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
||||||
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`);
|
core.info(`Restored ${this.cacheDescription} with key ${cacheResult.key} to ${cachePath.join()} in ${entryListener.restoredTime}ms`);
|
||||||
try {
|
try {
|
||||||
await this.afterRestore(listener);
|
await this.afterRestore(listener);
|
||||||
}
|
}
|
||||||
|
@ -134592,9 +134610,9 @@ class GradleUserHomeCache {
|
||||||
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
|
||||||
const cachePath = this.getCachePath();
|
const cachePath = this.getCachePath();
|
||||||
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
||||||
|
core.info(`Saved ${this.cacheDescription} with key ${cacheKey} from ${cachePath.join()} in ${gradleHomeEntryListener.savedTime}ms`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
async beforeSave(listener) {
|
async beforeSave(listener) {
|
||||||
|
|
2
dist/dependency-submission/post/index.js.map
vendored
2
dist/dependency-submission/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
38
dist/setup-gradle/main/index.js
vendored
38
dist/setup-gradle/main/index.js
vendored
|
@ -180144,18 +180144,20 @@ class CacheEntryListener {
|
||||||
this.requestedRestoreKeys = restoreKeys;
|
this.requestedRestoreKeys = restoreKeys;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markRestored(key, size) {
|
markRestored(key, size, time) {
|
||||||
this.restoredKey = key;
|
this.restoredKey = key;
|
||||||
this.restoredSize = size;
|
this.restoredSize = size;
|
||||||
|
this.restoredTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markNotRestored(message) {
|
markNotRestored(message) {
|
||||||
this.notRestored = message;
|
this.notRestored = message;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markSaved(key, size) {
|
markSaved(key, size, time) {
|
||||||
this.savedKey = key;
|
this.savedKey = key;
|
||||||
this.savedSize = size;
|
this.savedSize = size;
|
||||||
|
this.savedTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markAlreadyExists(key) {
|
markAlreadyExists(key) {
|
||||||
|
@ -180190,14 +180192,16 @@ ${renderEntryTable(entries)}
|
||||||
function renderEntryTable(entries) {
|
function renderEntryTable(entries) {
|
||||||
return `
|
return `
|
||||||
<table>
|
<table>
|
||||||
<tr><td></td><th>Count</th><th>Total Size (Mb)</th></tr>
|
<tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</tr>
|
||||||
<tr><td>Entries Restored</td>
|
<tr><td>Entries Restored</td>
|
||||||
<td>${getCount(entries, e => e.restoredSize)}</td>
|
<td>${getCount(entries, e => e.restoredSize)}</td>
|
||||||
<td>${getSize(entries, e => e.restoredSize)}</td>
|
<td>${getSize(entries, e => e.restoredSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.restoredTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td>Entries Saved</td>
|
<tr><td>Entries Saved</td>
|
||||||
<td>${getCount(entries, e => e.savedSize)}</td>
|
<td>${getCount(entries, e => e.savedSize)}</td>
|
||||||
<td>${getSize(entries, e => e.savedSize)}</td>
|
<td>${getSize(entries, e => e.savedSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.savedTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
`;
|
`;
|
||||||
|
@ -180208,9 +180212,11 @@ function renderEntryDetails(listener) {
|
||||||
Requested Key : ${entry.requestedKey ?? ''}
|
Requested Key : ${entry.requestedKey ?? ''}
|
||||||
Restored Key : ${entry.restoredKey ?? ''}
|
Restored Key : ${entry.restoredKey ?? ''}
|
||||||
Size: ${formatSize(entry.restoredSize)}
|
Size: ${formatSize(entry.restoredSize)}
|
||||||
|
Time: ${formatTime(entry.restoredTime)}
|
||||||
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
||||||
Saved Key : ${entry.savedKey ?? ''}
|
Saved Key : ${entry.savedKey ?? ''}
|
||||||
Size: ${formatSize(entry.savedSize)}
|
Size: ${formatSize(entry.savedSize)}
|
||||||
|
Time: ${formatTime(entry.savedTime)}
|
||||||
${getSavedMessage(entry, listener.cacheReadOnly)}
|
${getSavedMessage(entry, listener.cacheReadOnly)}
|
||||||
`)
|
`)
|
||||||
.join('---\n');
|
.join('---\n');
|
||||||
|
@ -180258,12 +180264,21 @@ function getSize(cacheEntries, predicate) {
|
||||||
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
return Math.round(bytes / (1024 * 1024));
|
return Math.round(bytes / (1024 * 1024));
|
||||||
}
|
}
|
||||||
|
function getTime(cacheEntries, predicate) {
|
||||||
|
return cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
|
}
|
||||||
function formatSize(bytes) {
|
function formatSize(bytes) {
|
||||||
if (bytes === undefined || bytes === 0) {
|
if (bytes === undefined || bytes === 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
||||||
}
|
}
|
||||||
|
function formatTime(ms) {
|
||||||
|
if (ms === undefined || ms === 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return `${ms} ms`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@ -180332,12 +180347,13 @@ function hashStrings(values) {
|
||||||
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
listener.markRequested(cacheKey, cacheRestoreKeys);
|
listener.markRequested(cacheKey, cacheRestoreKeys);
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
||||||
? {}
|
? {}
|
||||||
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
||||||
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
||||||
if (restoredEntry !== undefined) {
|
if (restoredEntry !== undefined) {
|
||||||
listener.markRestored(restoredEntry.key, restoredEntry.size);
|
listener.markRestored(restoredEntry.key, restoredEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
return restoredEntry;
|
return restoredEntry;
|
||||||
}
|
}
|
||||||
|
@ -180349,8 +180365,9 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
}
|
}
|
||||||
async function saveCache(cachePath, cacheKey, listener) {
|
async function saveCache(cachePath, cacheKey, listener) {
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
||||||
listener.markSaved(savedEntry.key, savedEntry.size);
|
listener.markSaved(savedEntry.key, savedEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error instanceof cache.ReserveCacheError) {
|
if (error instanceof cache.ReserveCacheError) {
|
||||||
|
@ -180645,7 +180662,7 @@ class AbstractEntryExtractor {
|
||||||
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
||||||
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
||||||
if (restoredEntry) {
|
if (restoredEntry) {
|
||||||
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`);
|
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern} in ${listener.restoredTime}ms`);
|
||||||
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -180694,8 +180711,8 @@ class AbstractEntryExtractor {
|
||||||
entryListener.markNotSaved('contents unchanged');
|
entryListener.markNotSaved('contents unchanged');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
|
||||||
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
||||||
|
core.info(`Saved ${artifactType} with key ${cacheKey} from ${pattern} in ${entryListener.savedTime}ms`);
|
||||||
}
|
}
|
||||||
for (const file of matchingFiles) {
|
for (const file of matchingFiles) {
|
||||||
(0, cache_utils_1.tryDelete)(file);
|
(0, cache_utils_1.tryDelete)(file);
|
||||||
|
@ -180927,13 +180944,14 @@ class GradleUserHomeCache {
|
||||||
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
||||||
key:${cacheKey.key}
|
key:${cacheKey.key}
|
||||||
restoreKeys:[${cacheKey.restoreKeys}]`);
|
restoreKeys:[${cacheKey.restoreKeys}]`);
|
||||||
const cacheResult = await (0, cache_utils_1.restoreCache)(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener);
|
const cachePath = this.getCachePath();
|
||||||
|
const cacheResult = await (0, cache_utils_1.restoreCache)(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener);
|
||||||
if (!cacheResult) {
|
if (!cacheResult) {
|
||||||
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
||||||
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`);
|
core.info(`Restored ${this.cacheDescription} with key ${cacheResult.key} to ${cachePath.join()} in ${entryListener.restoredTime}ms`);
|
||||||
try {
|
try {
|
||||||
await this.afterRestore(listener);
|
await this.afterRestore(listener);
|
||||||
}
|
}
|
||||||
|
@ -180971,9 +180989,9 @@ class GradleUserHomeCache {
|
||||||
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
|
||||||
const cachePath = this.getCachePath();
|
const cachePath = this.getCachePath();
|
||||||
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
||||||
|
core.info(`Saved ${this.cacheDescription} with key ${cacheKey} from ${cachePath.join()} in ${gradleHomeEntryListener.savedTime}ms`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
async beforeSave(listener) {
|
async beforeSave(listener) {
|
||||||
|
|
2
dist/setup-gradle/main/index.js.map
vendored
2
dist/setup-gradle/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
38
dist/setup-gradle/post/index.js
vendored
38
dist/setup-gradle/post/index.js
vendored
|
@ -180139,18 +180139,20 @@ class CacheEntryListener {
|
||||||
this.requestedRestoreKeys = restoreKeys;
|
this.requestedRestoreKeys = restoreKeys;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markRestored(key, size) {
|
markRestored(key, size, time) {
|
||||||
this.restoredKey = key;
|
this.restoredKey = key;
|
||||||
this.restoredSize = size;
|
this.restoredSize = size;
|
||||||
|
this.restoredTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markNotRestored(message) {
|
markNotRestored(message) {
|
||||||
this.notRestored = message;
|
this.notRestored = message;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markSaved(key, size) {
|
markSaved(key, size, time) {
|
||||||
this.savedKey = key;
|
this.savedKey = key;
|
||||||
this.savedSize = size;
|
this.savedSize = size;
|
||||||
|
this.savedTime = time;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markAlreadyExists(key) {
|
markAlreadyExists(key) {
|
||||||
|
@ -180185,14 +180187,16 @@ ${renderEntryTable(entries)}
|
||||||
function renderEntryTable(entries) {
|
function renderEntryTable(entries) {
|
||||||
return `
|
return `
|
||||||
<table>
|
<table>
|
||||||
<tr><td></td><th>Count</th><th>Total Size (Mb)</th></tr>
|
<tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</tr>
|
||||||
<tr><td>Entries Restored</td>
|
<tr><td>Entries Restored</td>
|
||||||
<td>${getCount(entries, e => e.restoredSize)}</td>
|
<td>${getCount(entries, e => e.restoredSize)}</td>
|
||||||
<td>${getSize(entries, e => e.restoredSize)}</td>
|
<td>${getSize(entries, e => e.restoredSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.restoredTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td>Entries Saved</td>
|
<tr><td>Entries Saved</td>
|
||||||
<td>${getCount(entries, e => e.savedSize)}</td>
|
<td>${getCount(entries, e => e.savedSize)}</td>
|
||||||
<td>${getSize(entries, e => e.savedSize)}</td>
|
<td>${getSize(entries, e => e.savedSize)}</td>
|
||||||
|
<td>${getTime(entries, e => e.savedTime)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
`;
|
`;
|
||||||
|
@ -180203,9 +180207,11 @@ function renderEntryDetails(listener) {
|
||||||
Requested Key : ${entry.requestedKey ?? ''}
|
Requested Key : ${entry.requestedKey ?? ''}
|
||||||
Restored Key : ${entry.restoredKey ?? ''}
|
Restored Key : ${entry.restoredKey ?? ''}
|
||||||
Size: ${formatSize(entry.restoredSize)}
|
Size: ${formatSize(entry.restoredSize)}
|
||||||
|
Time: ${formatTime(entry.restoredTime)}
|
||||||
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
${getRestoredMessage(entry, listener.cacheWriteOnly)}
|
||||||
Saved Key : ${entry.savedKey ?? ''}
|
Saved Key : ${entry.savedKey ?? ''}
|
||||||
Size: ${formatSize(entry.savedSize)}
|
Size: ${formatSize(entry.savedSize)}
|
||||||
|
Time: ${formatTime(entry.savedTime)}
|
||||||
${getSavedMessage(entry, listener.cacheReadOnly)}
|
${getSavedMessage(entry, listener.cacheReadOnly)}
|
||||||
`)
|
`)
|
||||||
.join('---\n');
|
.join('---\n');
|
||||||
|
@ -180253,12 +180259,21 @@ function getSize(cacheEntries, predicate) {
|
||||||
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
const bytes = cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
return Math.round(bytes / (1024 * 1024));
|
return Math.round(bytes / (1024 * 1024));
|
||||||
}
|
}
|
||||||
|
function getTime(cacheEntries, predicate) {
|
||||||
|
return cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0);
|
||||||
|
}
|
||||||
function formatSize(bytes) {
|
function formatSize(bytes) {
|
||||||
if (bytes === undefined || bytes === 0) {
|
if (bytes === undefined || bytes === 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
||||||
}
|
}
|
||||||
|
function formatTime(ms) {
|
||||||
|
if (ms === undefined || ms === 0) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return `${ms} ms`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@ -180327,12 +180342,13 @@ function hashStrings(values) {
|
||||||
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
listener.markRequested(cacheKey, cacheRestoreKeys);
|
listener.markRequested(cacheKey, cacheRestoreKeys);
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
|
||||||
? {}
|
? {}
|
||||||
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
|
||||||
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
|
||||||
if (restoredEntry !== undefined) {
|
if (restoredEntry !== undefined) {
|
||||||
listener.markRestored(restoredEntry.key, restoredEntry.size);
|
listener.markRestored(restoredEntry.key, restoredEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
return restoredEntry;
|
return restoredEntry;
|
||||||
}
|
}
|
||||||
|
@ -180344,8 +180360,9 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
|
||||||
}
|
}
|
||||||
async function saveCache(cachePath, cacheKey, listener) {
|
async function saveCache(cachePath, cacheKey, listener) {
|
||||||
try {
|
try {
|
||||||
|
const startTime = Date.now();
|
||||||
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
const savedEntry = await cache.saveCache(cachePath, cacheKey);
|
||||||
listener.markSaved(savedEntry.key, savedEntry.size);
|
listener.markSaved(savedEntry.key, savedEntry.size, Date.now() - startTime);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error instanceof cache.ReserveCacheError) {
|
if (error instanceof cache.ReserveCacheError) {
|
||||||
|
@ -180640,7 +180657,7 @@ class AbstractEntryExtractor {
|
||||||
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
async restoreExtractedCacheEntry(artifactType, cacheKey, pattern, listener) {
|
||||||
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
const restoredEntry = await (0, cache_utils_1.restoreCache)([pattern], cacheKey, [], listener);
|
||||||
if (restoredEntry) {
|
if (restoredEntry) {
|
||||||
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`);
|
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern} in ${listener.restoredTime}ms`);
|
||||||
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
return new ExtractedCacheEntry(artifactType, pattern, cacheKey);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -180689,8 +180706,8 @@ class AbstractEntryExtractor {
|
||||||
entryListener.markNotSaved('contents unchanged');
|
entryListener.markNotSaved('contents unchanged');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
|
||||||
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
await (0, cache_utils_1.saveCache)([pattern], cacheKey, entryListener);
|
||||||
|
core.info(`Saved ${artifactType} with key ${cacheKey} from ${pattern} in ${entryListener.savedTime}ms`);
|
||||||
}
|
}
|
||||||
for (const file of matchingFiles) {
|
for (const file of matchingFiles) {
|
||||||
(0, cache_utils_1.tryDelete)(file);
|
(0, cache_utils_1.tryDelete)(file);
|
||||||
|
@ -180922,13 +180939,14 @@ class GradleUserHomeCache {
|
||||||
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
(0, cache_utils_1.cacheDebug)(`Requesting ${this.cacheDescription} with
|
||||||
key:${cacheKey.key}
|
key:${cacheKey.key}
|
||||||
restoreKeys:[${cacheKey.restoreKeys}]`);
|
restoreKeys:[${cacheKey.restoreKeys}]`);
|
||||||
const cacheResult = await (0, cache_utils_1.restoreCache)(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener);
|
const cachePath = this.getCachePath();
|
||||||
|
const cacheResult = await (0, cache_utils_1.restoreCache)(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener);
|
||||||
if (!cacheResult) {
|
if (!cacheResult) {
|
||||||
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key);
|
||||||
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`);
|
core.info(`Restored ${this.cacheDescription} with key ${cacheResult.key} to ${cachePath.join()} in ${entryListener.restoredTime}ms`);
|
||||||
try {
|
try {
|
||||||
await this.afterRestore(listener);
|
await this.afterRestore(listener);
|
||||||
}
|
}
|
||||||
|
@ -180966,9 +180984,9 @@ class GradleUserHomeCache {
|
||||||
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
core.warning(`Save ${this.cacheDescription} failed in 'beforeSave': ${error}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
|
||||||
const cachePath = this.getCachePath();
|
const cachePath = this.getCachePath();
|
||||||
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
await (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
||||||
|
core.info(`Saved ${this.cacheDescription} with key ${cacheKey} from ${cachePath.join()} in ${gradleHomeEntryListener.savedTime}ms`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
async beforeSave(listener) {
|
async beforeSave(listener) {
|
||||||
|
|
2
dist/setup-gradle/post/index.js.map
vendored
2
dist/setup-gradle/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue