mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-10-21 00:08:55 +08:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
749f47bda3 | ||
|
eb126d771e |
8
.github/workflows/ci-full-check.yml
vendored
8
.github/workflows/ci-full-check.yml
vendored
@@ -44,10 +44,10 @@ jobs:
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-configuration-cache:
|
||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
# restore-configuration-cache:
|
||||
# uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||
# with:
|
||||
# cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-custom-gradle-home:
|
||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||
|
12
.github/workflows/ci-quick-check.yml
vendored
12
.github/workflows/ci-quick-check.yml
vendored
@@ -71,12 +71,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
|
||||
|
@@ -197,7 +197,6 @@ By default, this action aims to cache any and all reusable state that may be spe
|
||||
The state that is cached includes:
|
||||
- Any distributions downloaded to satisfy a `gradle-version` parameter ;
|
||||
- A subset of the Gradle User Home directory, including downloaded dependencies, wrapper distributions, and the local build cache ;
|
||||
- Any [configuration-cache](https://docs.gradle.org/nightly/userguide/configuration_cache.html) data stored in the project `.gradle` directory. (Only supported for Gradle 7 or higher.)
|
||||
|
||||
To reduce the space required for caching, this action makes a best effort to reduce duplication in cache entries.
|
||||
|
||||
@@ -209,7 +208,7 @@ cache-disabled: true
|
||||
|
||||
Distributions downloaded to satisfy a `gradle-version` parameter are stored outside of Gradle User Home and cached separately. The cache key is unique to the downloaded distribution and will not change over time.
|
||||
|
||||
The state of the Gradle User Home and configuration-cache are highly dependent on the Gradle execution, so the cache key is composed of the current commit hash and the GitHub actions job id.
|
||||
The state of the Gradle User Home is highly dependent on the Gradle execution, so the cache key is composed of the current commit hash and the GitHub actions job id.
|
||||
As such, the cache key is likely to change on each subsequent run of GitHub actions.
|
||||
This allows the most recent state to always be available in the GitHub actions cache.
|
||||
|
||||
@@ -252,9 +251,10 @@ gradle-home-cache-includes: |
|
||||
caches
|
||||
notifications
|
||||
jdks
|
||||
# Exclude the local build-cache from the directories cached.
|
||||
# Exclude the local build-cache and keyrings from the directories cached.
|
||||
gradle-home-cache-excludes: |
|
||||
caches/build-cache-1
|
||||
caches/keyrings
|
||||
```
|
||||
|
||||
You can specify any number of fixed paths or patterns to include or exclude.
|
||||
|
6
dist/main/index.js
vendored
6
dist/main/index.js
vendored
@@ -63664,7 +63664,6 @@ class GradleStateCache {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.debugReportGradleUserHomeSize('as restored from cache');
|
||||
yield new cache_extract_entries_1.GradleHomeEntryExtractor(this.gradleUserHome).restore(listener);
|
||||
yield new cache_extract_entries_1.ConfigurationCacheEntryExtractor(this.gradleUserHome).restore(listener);
|
||||
yield this.debugReportGradleUserHomeSize('after restoring common artifacts');
|
||||
});
|
||||
}
|
||||
@@ -63703,8 +63702,7 @@ class GradleStateCache {
|
||||
yield this.debugReportGradleUserHomeSize('before saving common artifacts');
|
||||
this.deleteExcludedPaths();
|
||||
yield Promise.all([
|
||||
new cache_extract_entries_1.GradleHomeEntryExtractor(this.gradleUserHome).extract(listener),
|
||||
new cache_extract_entries_1.ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
|
||||
new cache_extract_entries_1.GradleHomeEntryExtractor(this.gradleUserHome).extract(listener)
|
||||
]);
|
||||
yield this.debugReportGradleUserHomeSize("after extracting common artifacts (only 'caches' and 'notifications' will be stored)");
|
||||
});
|
||||
@@ -64449,7 +64447,7 @@ const exec = __importStar(__nccwpck_require__(1514));
|
||||
const crypto = __importStar(__nccwpck_require__(6113));
|
||||
const path = __importStar(__nccwpck_require__(1017));
|
||||
const fs = __importStar(__nccwpck_require__(7147));
|
||||
const CACHE_PROTOCOL_VERSION = 'v6-';
|
||||
const CACHE_PROTOCOL_VERSION = 'v7-';
|
||||
const JOB_CONTEXT_PARAMETER = 'workflow-job-context';
|
||||
const CACHE_DISABLED_PARAMETER = 'cache-disabled';
|
||||
const CACHE_READONLY_PARAMETER = 'cache-read-only';
|
||||
|
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
6
dist/post/index.js
vendored
6
dist/post/index.js
vendored
@@ -62715,7 +62715,6 @@ class GradleStateCache {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.debugReportGradleUserHomeSize('as restored from cache');
|
||||
yield new cache_extract_entries_1.GradleHomeEntryExtractor(this.gradleUserHome).restore(listener);
|
||||
yield new cache_extract_entries_1.ConfigurationCacheEntryExtractor(this.gradleUserHome).restore(listener);
|
||||
yield this.debugReportGradleUserHomeSize('after restoring common artifacts');
|
||||
});
|
||||
}
|
||||
@@ -62754,8 +62753,7 @@ class GradleStateCache {
|
||||
yield this.debugReportGradleUserHomeSize('before saving common artifacts');
|
||||
this.deleteExcludedPaths();
|
||||
yield Promise.all([
|
||||
new cache_extract_entries_1.GradleHomeEntryExtractor(this.gradleUserHome).extract(listener),
|
||||
new cache_extract_entries_1.ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
|
||||
new cache_extract_entries_1.GradleHomeEntryExtractor(this.gradleUserHome).extract(listener)
|
||||
]);
|
||||
yield this.debugReportGradleUserHomeSize("after extracting common artifacts (only 'caches' and 'notifications' will be stored)");
|
||||
});
|
||||
@@ -63500,7 +63498,7 @@ const exec = __importStar(__nccwpck_require__(1514));
|
||||
const crypto = __importStar(__nccwpck_require__(6113));
|
||||
const path = __importStar(__nccwpck_require__(1017));
|
||||
const fs = __importStar(__nccwpck_require__(7147));
|
||||
const CACHE_PROTOCOL_VERSION = 'v6-';
|
||||
const CACHE_PROTOCOL_VERSION = 'v7-';
|
||||
const JOB_CONTEXT_PARAMETER = 'workflow-job-context';
|
||||
const CACHE_DISABLED_PARAMETER = 'cache-disabled';
|
||||
const CACHE_READONLY_PARAMETER = 'cache-read-only';
|
||||
|
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
@@ -4,7 +4,7 @@ import path from 'path'
|
||||
import fs from 'fs'
|
||||
import {CacheListener} from './cache-reporting'
|
||||
import {saveCache, restoreCache, cacheDebug, isCacheDebuggingEnabled, tryDelete, generateCacheKey} from './cache-utils'
|
||||
import {ConfigurationCacheEntryExtractor, GradleHomeEntryExtractor} from './cache-extract-entries'
|
||||
import {GradleHomeEntryExtractor} from './cache-extract-entries'
|
||||
|
||||
const RESTORED_CACHE_KEY_KEY = 'restored-cache-key'
|
||||
|
||||
@@ -80,7 +80,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')
|
||||
}
|
||||
|
||||
@@ -130,8 +130,8 @@ export class GradleStateCache {
|
||||
await this.debugReportGradleUserHomeSize('before saving common artifacts')
|
||||
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)"
|
||||
|
@@ -9,7 +9,7 @@ import * as fs from 'fs'
|
||||
|
||||
import {CacheEntryListener} from './cache-reporting'
|
||||
|
||||
const CACHE_PROTOCOL_VERSION = 'v6-'
|
||||
const CACHE_PROTOCOL_VERSION = 'v7-'
|
||||
|
||||
const JOB_CONTEXT_PARAMETER = 'workflow-job-context'
|
||||
const CACHE_DISABLED_PARAMETER = 'cache-disabled'
|
||||
|
Reference in New Issue
Block a user