This is an automated email from the ASF dual-hosted git repository.
paulk-asert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 820056da83 GROOVY-12141: Improved dependency caching
820056da83 is described below
commit 820056da83d176bc23255dc100d3b92107834b38
Author: Paul King <[email protected]>
AuthorDate: Thu Jul 9 10:46:18 2026 +1000
GROOVY-12141: Improved dependency caching
---
.github/workflows/grails-joint-validation.yml | 20 ++++++-
.github/workflows/groovy-build-coverage.yml | 26 +++++++--
.github/workflows/groovy-build-performance.yml | 19 ++++++-
.github/workflows/groovy-build-test.yml | 70 ++++++++++++++++++++----
.github/workflows/groovy-jmh-adhoc.yml | 19 ++++++-
.github/workflows/groovy-jmh-classic.yml | 19 ++++++-
.github/workflows/groovy-jmh-daily.yml | 19 ++++++-
.github/workflows/groovy-jmh.yml | 19 ++++++-
.github/workflows/groovy-perf-daily.yml | 19 ++++++-
.github/workflows/groovy-rat-check.yml | 21 ++++++-
.github/workflows/micronaut-joint-validation.yml | 20 ++++++-
.github/workflows/validate-actions.yml | 21 ++++++-
12 files changed, 248 insertions(+), 44 deletions(-)
diff --git a/.github/workflows/grails-joint-validation.yml
b/.github/workflows/grails-joint-validation.yml
index bd254207fb..d5f2dc93dd 100644
--- a/.github/workflows/grails-joint-validation.yml
+++ b/.github/workflows/grails-joint-validation.yml
@@ -49,11 +49,25 @@ jobs:
- uses: actions/[email protected]
with:
java-version: 11
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `grails-joint` key segment keeps a dedicated cache lineage: this
+ # workflow also resolves the (large, distinct) Grails dependency set,
+ # including from repo.grails.org — the flakiest repository involved.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-grails-joint-${{ github.base_ref
|| github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-grails-joint-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: Env
run: env
diff --git a/.github/workflows/groovy-build-coverage.yml
b/.github/workflows/groovy-build-coverage.yml
index 46f37e9af1..0fae7a4319 100644
--- a/.github/workflows/groovy-build-coverage.yml
+++ b/.github/workflows/groovy-build-coverage.yml
@@ -50,7 +50,8 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
- # `setup-gradle` caches ~/.gradle/caches but NOT ~/.groovy/grapes,
+ # The Gradle dependency cache below covers ~/.gradle/caches/modules-2
+ # but NOT ~/.groovy/grapes,
# which is where @Grab-resolved artifacts (used by tests like
# GenericsSTCTest, MethodReferenceTest, …) land. Caching it makes
# the build resilient to transient Maven Central / CDN outages:
@@ -68,11 +69,28 @@ jobs:
key: ${{ runner.os }}-grape-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-grape-
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `coverage` key segment keeps a dedicated lineage: this job also
+ # resolves jacoco/sonar jars that no other workflow populates, and
+ # under the shared `build` key the faster-finishing groovy-build-test
+ # jobs would usually win the save race, pinning a cache without them.
+ # The `build` prefix below is a cold-start fallback only.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-coverage-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-coverage-${{ github.base_ref ||
github.ref_name }}-
+ gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: "🌡 Pre-warm @Grab artifacts via Maven"
shell: bash
run: |
diff --git a/.github/workflows/groovy-build-performance.yml
b/.github/workflows/groovy-build-performance.yml
index a8df695cb9..4445b551cf 100644
--- a/.github/workflows/groovy-build-performance.yml
+++ b/.github/workflows/groovy-build-performance.yml
@@ -48,11 +48,24 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `perf` key segment keeps a cache lineage for the perf/JMH
+ # workflow family, whose dependency set differs from the main build.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: Compiler performance comparison
run: ./gradlew perf:performanceTests
timeout-minutes: 60
diff --git a/.github/workflows/groovy-build-test.yml
b/.github/workflows/groovy-build-test.yml
index 36ad947fe5..96300a9384 100644
--- a/.github/workflows/groovy-build-test.yml
+++ b/.github/workflows/groovy-build-test.yml
@@ -62,7 +62,8 @@ jobs:
${{ matrix.java }}
21
check-latest: true
- # `setup-gradle` below caches ~/.gradle/caches but NOT ~/.groovy/grapes,
+ # The Gradle dependency cache below covers ~/.gradle/caches/modules-2
+ # but NOT ~/.groovy/grapes,
# which is where @Grab-resolved artifacts (used by tests like
# GenericsSTCTest, MethodReferenceTest, …) land. Caching it makes the
# build resilient to transient Maven Central / CDN outages: once an
@@ -86,12 +87,41 @@ jobs:
key: ${{ runner.os }}-grape-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-grape-
+ # Explicit Gradle dependency cache, same approach as the @Grab cache
+ # above (and as grails-core#15935). setup-gradle's built-in cache (any
+ # provider) only writes from the default branch — so maintenance
+ # branches (GROOVY_*) always ran cold — and stores the whole Gradle
+ # User Home as one entry keyed on build-file hashes, so any build
+ # change forced a full re-download from Maven Central. Instead cache
+ # just the downloaded jars/poms and wrapper dists, keyed per branch so
+ # each release branch keeps its own warm cache, with a prefix
+ # restore-key so a version bump restores the previous entry and only
+ # downloads the delta.
+ #
+ # An exact key hit skips re-saving, so unchanged runs don't churn the
+ # repo's 10GB cache quota. That is also why the `build` key segment
+ # separates cache lineages per workflow family
+ # (build/coverage/perf/joint): under one shared key, deps unique to
+ # e.g. JMH or coverage runs would never be persisted. Conversely, jobs
+ # that resolve only a small subset of the build deps (rat check,
+ # action validation) restore this lineage but never save to it, so a
+ # fast subset job can't pin a thin cache under a fresh key.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-
- name: "🐘 Setup Gradle"
uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching (MIT-licensed 'basic' or the proprietary
+ # v6+ 'enhanced' provider) is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: "🔍 Setup TestLens"
uses:
testlens-app/setup-testlens@3f82d2dc6cd5c03f02ce5f7885a21195d85f8d14 # v1.9.3
# Pre-warm the @Grab artifact cache by fetching each unique
Maven-shorthand
@@ -207,11 +237,21 @@ jobs:
key: ${{ runner.os }}-grape-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-grape-
+ # See the lts job for the Gradle dependency cache rationale.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: "🌡 Pre-warm @Grab artifacts via Maven"
shell: bash
run: |
@@ -315,11 +355,21 @@ jobs:
key: ${{ runner.os }}-grape-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-grape-
+ # See the lts job for the Gradle dependency cache rationale.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: "🌡 Pre-warm @Grab artifacts via Maven"
shell: bash
run: |
diff --git a/.github/workflows/groovy-jmh-adhoc.yml
b/.github/workflows/groovy-jmh-adhoc.yml
index 7fdb4b10ad..153bccbcaa 100644
--- a/.github/workflows/groovy-jmh-adhoc.yml
+++ b/.github/workflows/groovy-jmh-adhoc.yml
@@ -53,11 +53,24 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `perf` key segment keeps a cache lineage for the perf/JMH
+ # workflow family, whose dependency set differs from the main build.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
# The gc profiler captures gc.alloc.rate.norm (bytes/op) as a JMH
secondary
# metric — the whole point of the adhoc fat-free comparison.
diff --git a/.github/workflows/groovy-jmh-classic.yml
b/.github/workflows/groovy-jmh-classic.yml
index 5467099970..30d4c052d8 100644
--- a/.github/workflows/groovy-jmh-classic.yml
+++ b/.github/workflows/groovy-jmh-classic.yml
@@ -60,11 +60,24 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `perf` key segment keeps a cache lineage for the perf/JMH
+ # workflow family, whose dependency set differs from the main build.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: JMH (${{ matrix.suite }} classic)
run: ./gradlew perf:jmh -PbenchInclude=${{ matrix.pattern }}
-Pindy=false -PjmhResultFormat=JSON
timeout-minutes: 60
diff --git a/.github/workflows/groovy-jmh-daily.yml
b/.github/workflows/groovy-jmh-daily.yml
index a7eb2ff393..4010462ac8 100644
--- a/.github/workflows/groovy-jmh-daily.yml
+++ b/.github/workflows/groovy-jmh-daily.yml
@@ -81,11 +81,24 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `perf` key segment keeps a cache lineage for the perf/JMH
+ # workflow family, whose dependency set differs from the main build.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: JMH (${{ matrix.suite }} ${{ matrix.indy }})
run: ./gradlew perf:jmh -PbenchInclude=${{ matrix.pattern }} ${{
matrix.indyFlag }} -PjmhResultFormat=JSON
diff --git a/.github/workflows/groovy-jmh.yml b/.github/workflows/groovy-jmh.yml
index dbf376c9fe..9ed2fd3f42 100644
--- a/.github/workflows/groovy-jmh.yml
+++ b/.github/workflows/groovy-jmh.yml
@@ -60,11 +60,24 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `perf` key segment keeps a cache lineage for the perf/JMH
+ # workflow family, whose dependency set differs from the main build.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: JMH (${{ matrix.suite }})
run: ./gradlew perf:jmh -PbenchInclude=${{ matrix.pattern }}
-PjmhResultFormat=JSON
timeout-minutes: 60
diff --git a/.github/workflows/groovy-perf-daily.yml
b/.github/workflows/groovy-perf-daily.yml
index 3f5b39b7ca..d24ed6b1f3 100644
--- a/.github/workflows/groovy-perf-daily.yml
+++ b/.github/workflows/groovy-perf-daily.yml
@@ -37,11 +37,24 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `perf` key segment keeps a cache lineage for the perf/JMH
+ # workflow family, whose dependency set differs from the main build.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-perf-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
# Compiles a fixed set of source files using current + latest
3.x/4.x/5.x.
# Versions tracked are configured in subprojects/performance/build.gradle
diff --git a/.github/workflows/groovy-rat-check.yml
b/.github/workflows/groovy-rat-check.yml
index 2d95b75739..a5b489ca44 100644
--- a/.github/workflows/groovy-rat-check.yml
+++ b/.github/workflows/groovy-rat-check.yml
@@ -45,11 +45,26 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Restore-only (never saves): this job resolves just the plugin
+ # classpath + rat deps — a small subset of the `build` lineage. If it
+ # saved, it could win the save race for a new key and pin a thin cache
+ # that groovy-build-test.yml could then not overwrite until the next
+ # key rotation. See groovy-build-test.yml (lts job) for the full
+ # caching rationale.
+ - name: "🗄 Restore Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #
v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: Check licenses with rat
run: ./gradlew rat
timeout-minutes: 60
diff --git a/.github/workflows/micronaut-joint-validation.yml
b/.github/workflows/micronaut-joint-validation.yml
index 76f29c5487..043905e736 100644
--- a/.github/workflows/micronaut-joint-validation.yml
+++ b/.github/workflows/micronaut-joint-validation.yml
@@ -44,11 +44,25 @@ jobs:
distribution: 'zulu'
java-version: 17
check-latest: true
+ # Cache downloaded dependency jars/poms + wrapper dists, keyed per
+ # branch; see groovy-build-test.yml (lts job) for the full rationale.
+ # The `micronaut-joint` key segment keeps a dedicated cache lineage:
+ # this workflow also resolves the (large, distinct) Micronaut
+ # dependency set.
+ - name: "🗄 Cache Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-micronaut-joint-${{
github.base_ref || github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-micronaut-joint-${{ github.base_ref
|| github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: env
run: env
diff --git a/.github/workflows/validate-actions.yml
b/.github/workflows/validate-actions.yml
index 088b8075c7..fd36e5cabf 100644
--- a/.github/workflows/validate-actions.yml
+++ b/.github/workflows/validate-actions.yml
@@ -46,11 +46,26 @@ jobs:
distribution: 'zulu'
java-version: 21
check-latest: true
+ # Restore-only (never saves): this job resolves just the plugin
+ # classpath + the validation task's deps — a small subset of the
+ # `build` lineage. If it saved, it could win the save race for a new
+ # key and pin a thin cache that groovy-build-test.yml could then not
+ # overwrite until the next key rotation. See groovy-build-test.yml
+ # (lts job) for the full caching rationale.
+ - name: "🗄 Restore Gradle dependencies (~/.gradle/caches/modules-2 +
wrapper)"
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #
v6.1.0
+ with:
+ path: |
+ ~/.gradle/caches/modules-2
+ ~/.gradle/wrapper
+ key: gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-${{ hashFiles('versions.properties',
'gradle/wrapper/gradle-wrapper.properties', 'settings.gradle',
'build-logic/build.gradle') }}
+ restore-keys: |
+ gradle-deps-${{ runner.os }}-build-${{ github.base_ref ||
github.ref_name }}-
- uses:
gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0
- # 'basic' uses the MIT-licensed, open-source cache provider; the
default
- # 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of
Use)
+ # The action's own caching is disabled: dependency jars and wrapper
+ # dists are cached by the explicit branch-keyed step above instead.
with:
- cache-provider: basic
+ cache-disabled: true
- name: Validate Actions
run: ./gradlew validateActions --no-daemon
timeout-minutes: 5