Unverified Commit 334a4b8d authored by daz's avatar daz
Browse files

Reinstate configuration-cache save/restore capability

parent 009bd36b
Loading
Loading
Loading
Loading
+6 −6
Changes for .github/workflows/ci-quick-check.yml: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -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
+4 −4
Changes for src/cache-base.ts: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -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)"