daniellansun opened a new pull request, #3110:
URL: https://github.com/apache/groovy/pull/3110
## Problem
On Windows runners, `gradle/actions/setup-gradle` sets
`GRADLE_USER_HOME=D:\a\.gradle`. Our explicit gradle-deps `actions/cache` step
cached `~/.gradle/caches/modules-2` and `~/.gradle/wrapper`, which Gradle does
not use on those runners. So on Windows:
- the cache restore never had anything useful to restore (every run was
effectively a cold dependency download), and
- the post-job save failed with a `Path Validation Error`, because the
cached paths did not exist.
The cache step also ran *before* `setup-gradle`, so it could not see the
relocated `GRADLE_USER_HOME` even if it had referenced it.
## Fix
Workflow YAML only (14 files, 16 gradle-deps cache blocks):
- The gradle-deps `actions/cache` step now runs **after** `setup-gradle` in
every job.
- Its paths are now `${{ env.GRADLE_USER_HOME }}/caches/modules-2` and `${{
env.GRADLE_USER_HOME }}/wrapper`, so they follow wherever `setup-gradle` puts
the Gradle user home on each OS.
- Cache keys and restore-keys are unchanged, and `setup-gradle` still runs
with `cache-disabled: true`.
## Expected impact
Once the new caches warm up on the base branch, Windows jobs should stop
re-downloading the full dependency set and wrapper distribution on every run.
That should bring Windows wall time down noticeably, and the save-step path
validation error should go away. Linux/macOS behavior should not change,
because there `GRADLE_USER_HOME` resolves to the same `~/.gradle` location.
## Scope
- No test excludes, no timeout changes, no build logic changes.
- Follow-ups such as Windows Defender exclusions, `forkEvery` tuning, and
macOS runner memory are deliberately left for separate PRs.
Validated locally with `actionlint` (clean) and a per-job ordering check
(every `GRADLE_USER_HOME`-based cache step comes after `setup-gradle` in the
same job).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]