feat: add reusable Gradle configuration cache mode - #13
Open
cdsap wants to merge 16 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Experiment workflows can now run Gradle with configuration cache enabled and reuse the seeded configuration state across execution jobs. The seed job primes the configuration cache, saves the Gradle user-home inputs that Gradle fingerprints, and stores included-build outputs with the project cache entry. Execution jobs restore that complete set before invoking Gradle.
The workflow exposes
off,disabled,on,warn, andread-onlymodes for configuration-cache runs, and wires the same option into Gradle Profiler scenarios.offleaves Gradle's default behavior alone.disabledexplicitly passes--no-configuration-cache.read-onlypasses--configuration-cache -Dorg.gradle.configuration-cache.read-only=true, so Gradle can reuse an existing entry but will not write a new one on a miss.This adds a separate
project_isolationinput withoff,on, anddiagnosticsmodes. Project isolation uses the same restored configuration-cache inputs because Gradle enables configuration-cache infrastructure when Isolated Projects is enabled; the Gradle 9.7 path uses--isolated-projects, with diagnostics adding-Dorg.gradle.unsafe.isolated-projects.diagnostics=true.This also adds
configuration_cache_entrywithrestoreandskipmodes.restorekeeps the seeded CC-entry reuse path.skipstill builds with--configuration-cacheor--isolated-projects, but intentionally skips the explicit configuration-cache entry path setup, restore, prime, and save steps.Validation
git diff --check.GRADLE_ENCRYPTION_KEYforcdsap/Telltale.experiment.yamlon this branch: https://github.com/cdsap/Telltale/actions/runs/31440340933Reusing configuration cache.experiment-with-gradle-profiler.yamlon this branch: https://github.com/cdsap/Telltale/actions/runs/31443035558project_isolation=onsmoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31515873565--isolated-projects, then failed in the target experiment build because:core:checkoutis not Isolated Projects compatible (Project ':core:checkout' cannot access task dependencies directly).configuration_cache=onplusconfiguration_cache_entry=skipsmoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31522487020--configuration-cacheand calculated the task graph because no cached configuration entry was provided.configuration_cache=disabledsmoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31647317157--no-configuration-cache, and the explicit configuration-cache entry path setup, restore, prime, and save steps were skipped.configuration_cache=read-onlysmoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31648564651