Skip to content

Commit

Permalink
Reinstate configuration-cache save/restore capability
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Dec 20, 2023
1 parent 655ec2b commit 7a51d6f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci-quick-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/cache-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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')
}

Expand Down Expand Up @@ -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)"
Expand Down

0 comments on commit 7a51d6f

Please sign in to comment.