Cache validated checksums for later executions

The most common case for validation will be that the wrapper jars are unchanged
from a previous workflow run. In this case, we cache the validated wrapper
checksums to minimise the work required on a subsequent run.

Fixes #172
This commit is contained in:
daz
2024-08-01 09:39:30 -06:00
parent ce4c3a6c5e
commit b6395da67c
8 changed files with 98 additions and 13 deletions

View File

@@ -46,13 +46,13 @@ export async function setup(
core.saveState(USER_HOME, userHome)
core.saveState(GRADLE_USER_HOME, gradleUserHome)
await wrapperValidator.validateWrappers(wrapperValidationConfig, getWorkspaceDirectory())
const cacheListener = new CacheListener()
await caches.restore(userHome, gradleUserHome, cacheListener, cacheConfig)
core.saveState(CACHE_LISTENER, cacheListener.stringify())
await wrapperValidator.validateWrappers(wrapperValidationConfig, getWorkspaceDirectory(), gradleUserHome)
await buildScan.setup(buildScanConfig)
return true