Reinstate configuration-cache save/restore capability

This commit is contained in:
daz 2023-12-13 12:45:03 -07:00
parent 009bd36b91
commit 334a4b8d4d
No known key found for this signature in database
2 changed files with 10 additions and 10 deletions

View file

@ -87,12 +87,12 @@ jobs:
runner-os: '["ubuntu-latest"]'
download-dist: true
# restore-configuration-cache:
# needs: build-distribution
# uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
# with:
# runner-os: '["ubuntu-latest"]'
# download-dist: true
restore-configuration-cache:
needs: build-distribution
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
with:
runner-os: '["ubuntu-latest"]'
download-dist: true
restore-containerized-gradle-home:
needs: build-distribution

View file

@ -7,7 +7,7 @@ import fs from 'fs'
import * as params from './input-params'
import {CacheListener} from './cache-reporting'
import {saveCache, restoreCache, cacheDebug, isCacheDebuggingEnabled, tryDelete, generateCacheKey} from './cache-utils'
import {GradleHomeEntryExtractor} from './cache-extract-entries'
import {GradleHomeEntryExtractor, ConfigurationCacheEntryExtractor} from './cache-extract-entries'
const RESTORED_CACHE_KEY_KEY = 'restored-cache-key'
@ -81,7 +81,7 @@ export class GradleStateCache {
async afterRestore(listener: CacheListener): Promise<void> {
await this.debugReportGradleUserHomeSize('as restored from cache')
await new GradleHomeEntryExtractor(this.gradleUserHome).restore(listener)
// await new ConfigurationCacheEntryExtractor(this.gradleUserHome).restore(listener)
await new ConfigurationCacheEntryExtractor(this.gradleUserHome).restore(listener)
await this.debugReportGradleUserHomeSize('after restoring common artifacts')
}
@ -131,8 +131,8 @@ export class GradleStateCache {
await this.debugReportGradleUserHomeSize('before saving common artifacts')
await this.deleteExcludedPaths()
await Promise.all([
new GradleHomeEntryExtractor(this.gradleUserHome).extract(listener)
// new ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
new GradleHomeEntryExtractor(this.gradleUserHome).extract(listener),
new ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
])
await this.debugReportGradleUserHomeSize(
"after extracting common artifacts (only 'caches' and 'notifications' will be stored)"