Cache Gradle's downloads in CI (#142) · openjavaformat/open-java-format@3e13850 · GitHub
Skip to content

Commit 3e13850

Browse files
authored
Cache Gradle's downloads in CI (#142)
Six of the last 120 CI runs lost a job to a download, and every re-run passed. On 2026-10-19 Maven Central reset the connection on three runners and failed DNS on a fourth while they resolved dependencies, and on 2026-10-03 and 2026-10-19 services.gradle.org failed DNS and then timed out on macos-15-intel while the wrapper fetched Gradle. No JDK or GraalVM download failed. gradle/actions/setup-gradle, at the SHA dependency-submission.yml already pins, now runs in every job: it restores the dependencies and the wrapper's distribution from the Actions cache and saves them after builds of the default branch, while pull requests only read. Three paths stay out: the local build cache; the IntelliJ IDE the plugin's tests start, an 852 MB zip that is slower to restore than to download and a third of the repository's 10 GB; and the transforms directory, where that zip is unpacked to 2.1 GB and cannot be left out alone. Leaving paths out needs the default, proprietary cache provider, which is vendored in the action and free for public repositories. JDK downloads are not cached: none has failed, and setup-graalvm finds a cached GraalVM only by its exact version, which would mean pinning versions by hand in two workflows.
1 parent 0298dbd commit 3e13850

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 35 additions & 0 deletions

0 commit comments

Comments
 (0)