mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-22 00:01:05 -05:00
Reinstate configuration-cache save/restore capability
This commit is contained in:
parent
009bd36b91
commit
334a4b8d4d
2 changed files with 10 additions and 10 deletions
12
.github/workflows/ci-quick-check.yml
vendored
12
.github/workflows/ci-quick-check.yml
vendored
|
@ -87,12 +87,12 @@ jobs:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
download-dist: true
|
||||||
|
|
||||||
# restore-configuration-cache:
|
restore-configuration-cache:
|
||||||
# needs: build-distribution
|
needs: build-distribution
|
||||||
# uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||||
# with:
|
with:
|
||||||
# runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
# download-dist: true
|
download-dist: true
|
||||||
|
|
||||||
restore-containerized-gradle-home:
|
restore-containerized-gradle-home:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
|
|
|
@ -7,7 +7,7 @@ import fs from 'fs'
|
||||||
import * as params from './input-params'
|
import * as params from './input-params'
|
||||||
import {CacheListener} from './cache-reporting'
|
import {CacheListener} from './cache-reporting'
|
||||||
import {saveCache, restoreCache, cacheDebug, isCacheDebuggingEnabled, tryDelete, generateCacheKey} from './cache-utils'
|
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'
|
const RESTORED_CACHE_KEY_KEY = 'restored-cache-key'
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ export class GradleStateCache {
|
||||||
async afterRestore(listener: CacheListener): Promise<void> {
|
async afterRestore(listener: CacheListener): Promise<void> {
|
||||||
await this.debugReportGradleUserHomeSize('as restored from cache')
|
await this.debugReportGradleUserHomeSize('as restored from cache')
|
||||||
await new GradleHomeEntryExtractor(this.gradleUserHome).restore(listener)
|
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')
|
await this.debugReportGradleUserHomeSize('after restoring common artifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ export class GradleStateCache {
|
||||||
await this.debugReportGradleUserHomeSize('before saving common artifacts')
|
await this.debugReportGradleUserHomeSize('before saving common artifacts')
|
||||||
await this.deleteExcludedPaths()
|
await this.deleteExcludedPaths()
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
new GradleHomeEntryExtractor(this.gradleUserHome).extract(listener)
|
new GradleHomeEntryExtractor(this.gradleUserHome).extract(listener),
|
||||||
// new ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
|
new ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
|
||||||
])
|
])
|
||||||
await this.debugReportGradleUserHomeSize(
|
await this.debugReportGradleUserHomeSize(
|
||||||
"after extracting common artifacts (only 'caches' and 'notifications' will be stored)"
|
"after extracting common artifacts (only 'caches' and 'notifications' will be stored)"
|
||||||
|
|
Loading…
Reference in a new issue