mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-25 17:51:02 -05:00
Improve cache logging
This commit is contained in:
parent
25672bf196
commit
a94b9252d5
6 changed files with 14 additions and 8 deletions
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/post/index.js
vendored
2
dist/post/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -78,7 +78,9 @@ export class GradleUserHomeCache extends AbstractCache {
|
||||||
async beforeSave(): Promise<void> {
|
async beforeSave(): Promise<void> {
|
||||||
await this.reportGradleUserHomeSize('before saving common artifacts')
|
await this.reportGradleUserHomeSize('before saving common artifacts')
|
||||||
await this.saveArtifactBundles()
|
await this.saveArtifactBundles()
|
||||||
await this.reportGradleUserHomeSize('after saving common artifacts')
|
await this.reportGradleUserHomeSize(
|
||||||
|
'after saving common artifacts (./wrapper dir is not cached)'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private async saveArtifactBundles(): Promise<void> {
|
private async saveArtifactBundles(): Promise<void> {
|
||||||
|
@ -202,7 +204,7 @@ export class GradleUserHomeCache extends AbstractCache {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
core.info(`Gradle User Home cache entry (directories >5M): ${label}`)
|
core.info(`Gradle User Home (directories >5M): ${label}`)
|
||||||
|
|
||||||
core.info(
|
core.info(
|
||||||
result.stdout
|
result.stdout
|
||||||
|
|
|
@ -7,7 +7,9 @@ const BUILD_ROOT_DIR = 'BUILD_ROOT_DIR'
|
||||||
|
|
||||||
export async function restore(buildRootDirectory: string): Promise<void> {
|
export async function restore(buildRootDirectory: string): Promise<void> {
|
||||||
if (isCacheDisabled()) {
|
if (isCacheDisabled()) {
|
||||||
core.debug('Cache read disabled')
|
core.info(
|
||||||
|
'Cache is disabled: will not restore state from previous builds.'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +24,9 @@ export async function restore(buildRootDirectory: string): Promise<void> {
|
||||||
|
|
||||||
export async function save(): Promise<void> {
|
export async function save(): Promise<void> {
|
||||||
if (isCacheReadOnly()) {
|
if (isCacheReadOnly()) {
|
||||||
core.debug('Cache is read-only: not saving cache entry')
|
core.info(
|
||||||
|
'Cache is read-only: will not save state for use in subsequent builds.'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue