ci: stop caching the configuration cache across runners (#7454)

This commit is contained in:
James Rich authored and GitHub committed 2026-09-29 20:47:23 +00:00
1 parent 17aa3ffc83
commit 11b2e851fa
4 files changed
+1 -56

No files matched your search

+1 -31
View File
@@ -33,20 +33,8 @@ inputs:
dependency_graph:
description: |
Dependency graph mode: disabled | generate | generate-and-submit | generate-and-upload |
download-and-submit. Submit needs `contents: write`. Never combine with
cache_configuration_cache — a CC-hit build generates NO graph.
download-and-submit. Submit needs `contents: write`.
default: 'disabled'
cache_configuration_cache:
description: |
Persist .gradle/configuration-cache. Opt-in: only pays off when config inputs are
commit-stable (the VERSION_CODE-pinned jobs). Real-versionCode jobs would restore,
miss, and never re-save.
default: 'false'
cache_key_suffix:
description: |
Extra CC-key discriminator for matrix legs running different task graphs (test-shards).
Runner-only matrices don't need it — os/arch are already in the key.
default: ''
runs:
using: composite
steps:
@@ -172,21 +160,3 @@ runs:
# cache latency turns out to cost more than the restore it replaced.
gradle-home-cache-excludes: |
caches/build-cache-1
# CC entries live in the project dir; setup-gradle only caches the Gradle User Home —
# Develocity measured 100% CC miss (~52s config/build) before this. Runs after Setup
# Gradle so GRADLE_ENCRYPTION_KEY is exported. No sha in the key: unchanged build files
# hit exactly and skip the save; restore-keys is the self-heal for stale entries.
# The wrapper hash is its own restore-key segment: a stale same-version entry is a
# graceful CC miss, but an entry written by a DIFFERENT Gradle version can crash
# fingerprint deserialization outright (seen on 9.6.1 entries under 9.7.0).
- name: Cache Gradle configuration-cache
# Gates: opted in; key present (undecryptable otherwise — keeps keyless fork PRs off
# these entries); not merge_group (throwaway cache scope).
if: inputs.cache_configuration_cache == 'true' && inputs.gradle_encryption_key != '' && github.event_name != 'merge_group'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ github.workspace }}/.gradle/configuration-cache
key: gradle-cc-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}${{ inputs.cache_key_suffix && format('-{0}', inputs.cache_key_suffix) || '' }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('settings.gradle.kts', '**/build.gradle.kts', 'build-logic/**', 'gradle/*.gradle', 'gradle/libs.versions.toml', 'gradle.properties', 'config.properties', '.github/ci-gradle.properties') }}
restore-keys: |
gradle-cc-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}${{ inputs.cache_key_suffix && format('-{0}', inputs.cache_key_suffix) || '' }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}-
-1
View File
@@ -59,7 +59,6 @@ jobs:
develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
job_summary_pr_comment: 'never'
cache_read_only: 'true'
cache_configuration_cache: 'false'
cache_robolectric: 'false'
# The sync is run to see what it would change; the result is not committed here.
-23
View File
@@ -96,13 +96,6 @@ jobs:
develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
job_summary_pr_comment: ${{ env.GRADLE_PR_COMMENT }}
cache_read_only: ${{ env.GRADLE_CACHE_READ_ONLY }}
# Disabled on Gradle 9.7.1: restoring an entry written by another runner crashes
# fingerprint deserialization (IsInIdeaSyncValueSource CNFE, settings-plugin
# classloader scope) and the job dies in ~10s before any test. A cross-machine
# restore is the only thing that triggers it, so it is 100% red in CI and not
# reproducible from a local store/reuse pair. Re-enable when that is fixed
# upstream; VERSION_CODE is still pinned above so entries would reuse.
cache_configuration_cache: 'false'
- name: Spotless, Detekt & Android Lint
# The root spotlessCheck and detekt do not reach the included build-logic build.
@@ -134,13 +127,6 @@ jobs:
develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
job_summary_pr_comment: ${{ env.GRADLE_PR_COMMENT }}
cache_read_only: ${{ env.GRADLE_CACHE_READ_ONLY }}
# Disabled on Gradle 9.7.1: restoring an entry written by another runner crashes
# fingerprint deserialization (IsInIdeaSyncValueSource CNFE, settings-plugin
# classloader scope) and the job dies in ~10s before any test. A cross-machine
# restore is the only thing that triggers it, so it is 100% red in CI and not
# reproducible from a local store/reuse pair. Re-enable when that is fixed
# upstream; VERSION_CODE is still pinned above so entries would reuse.
cache_configuration_cache: 'false'
- name: Screenshot Test Validation
# -Dorg.gradle.isolated-projects=false: AGP's screenshot plugin iterates BuildServicesRegistry at
@@ -312,15 +298,6 @@ jobs:
develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
job_summary_pr_comment: ${{ env.GRADLE_PR_COMMENT }}
cache_read_only: ${{ env.GRADLE_CACHE_READ_ONLY }}
# Disabled on Gradle 9.7.1: restoring an entry written by another runner crashes
# fingerprint deserialization (IsInIdeaSyncValueSource CNFE, settings-plugin
# classloader scope) and the job dies in ~10s before any test. A cross-machine
# restore is the only thing that triggers it, so it is 100% red in CI and not
# reproducible from a local store/reuse pair. Re-enable when that is fixed
# upstream; VERSION_CODE is still pinned above so entries would reuse.
cache_configuration_cache: 'false'
# Shards run different task graphs; kover flips the graph again.
cache_key_suffix: ${{ matrix.shard.name }}${{ inputs.run_coverage && '-kover' || '' }}
cache_konan: 'true'
- name: Run Tests & Coverage (${{ matrix.shard.name }})
-1
View File
@@ -124,7 +124,6 @@ jobs:
develocity_access_key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
job_summary_pr_comment: 'never'
cache_read_only: 'true'
cache_configuration_cache: 'false'
cache_robolectric: 'false'
- name: Regenerate the schema strings