This is an automated email from the ASF dual-hosted git repository. jdaugherty pushed a commit to branch ci/gradle-enhanced-cache in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 92cb18fd465ad897902f7052d4eedde71fbfecb2 Author: James Daugherty <[email protected]> AuthorDate: Mon Oct 12 09:34:16 2026 +0100 Cache the Gradle User Home through setup-gradle instead of actions/cache Every Gradle job restored and saved ~/.gradle/caches/modules-2 and ~/.gradle/wrapper with an explicit actions/cache step, keyed by branch and dependency hash, and disabled the cache that setup-gradle manages. That scheme was adopted to stay under GitHub's 10 GB cache quota, but its restore and save steps have been timing out repeatedly. Return to setup-gradle's own caching, as the workflows were originally configured, now using its default enhanced provider: it stores fine-grained, deduplicated entries and cleans unused files out of the Gradle User Home before saving, which addresses the quota concern that led to the explicit steps. It is free for public repositories and stores in GitHub's cache; the Develocity access key keeps serving the remote build cache that the Gradle build itself pushes task outputs to. The pinned release is unchanged. The provider only writes from the repository default branch unless told otherwise, which would leave every other release branch reading 8.0.x entries. Every caching setup-gradle step therefore reads only on pull requests, whose entries would be visible to that pull request alone, and writes on every other run. GitHub scopes the entries by ref, so each release branch keeps its own; a release runs on its tag, reads the default branch's entries, and writes entries that serve a re-run of that release. The jobs no longer need the cache_writer matrix flags or the split restore/save steps. GitHub's cache now holds only the Gradle User Home entries setup-gradle manages and the mongod download the embedded MongoDB tests run, which lives outside the Gradle User Home. The Groovy snapshot canary's Groovy build job is cached too: Groovy is rebuilt each run but its build dependencies are not. Release verification stays uncached, as before. --- .github/workflows/benchmark.yml | 6 +- .github/workflows/build-health.yml | 9 +- .github/workflows/codeanalysis.yml | 6 +- .github/workflows/codestyle.yml | 9 +- .github/workflows/coverage.yml | 6 +- .github/workflows/end-to-end.yml | 15 +- .github/workflows/forge-deploy-aws.yml | 3 +- .github/workflows/gradle.yml | 345 ++++----------------------- .github/workflows/groovy-snapshot-canary.yml | 33 +-- .github/workflows/rat.yml | 3 +- .github/workflows/release-publish-docs.yml | 3 +- .github/workflows/release.yml | 8 +- .github/workflows/sitemesh2.yml | 6 +- .github/workflows/validate-actions.yml | 3 +- .github/workflows/vulnerability-scan.yml | 4 + 15 files changed, 97 insertions(+), 362 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 39acddd3cb..74ca4531f2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -70,7 +70,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} # Deliberately allowed to fail the job, and placed before the expensive work: a broken # comparison tool makes every number produced here untrustworthy. That is a tooling @@ -296,7 +297,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "📥 Download JMH artifacts" uses: actions/[email protected] diff --git a/.github/workflows/build-health.yml b/.github/workflows/build-health.yml index 713a0df07c..840c1aa872 100644 --- a/.github/workflows/build-health.yml +++ b/.github/workflows/build-health.yml @@ -43,7 +43,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🩺 Check Core Projects" # build-logic is an included build, so its own health task is invoked through the root build. @@ -87,7 +88,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🩺 Check Gradle Plugin Projects" working-directory: grails-gradle @@ -124,7 +126,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🩺 Check Forge Projects" working-directory: grails-forge diff --git a/.github/workflows/codeanalysis.yml b/.github/workflows/codeanalysis.yml index 8ab28b1b00..d7c1e90e38 100644 --- a/.github/workflows/codeanalysis.yml +++ b/.github/workflows/codeanalysis.yml @@ -42,7 +42,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔎 Check Core Projects" run: ./gradlew aggregateAnalysisViolations --continue @@ -96,7 +97,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔎 Check Gradle Plugin Projects" working-directory: grails-gradle diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 42aa05bd97..3f9b7a84fd 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -42,7 +42,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔎 Check Core Projects" run: ./gradlew aggregateStyleViolations validateRepositoryConventions --continue @@ -76,7 +77,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔎 Check Forge Projects" working-directory: grails-forge @@ -115,7 +117,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔎 Check Gradle Plugin Projects" working-directory: grails-gradle diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a839641d8b..466e7b5a0f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -47,7 +47,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🌡️ Run tests with coverage" run: > @@ -81,7 +82,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🌡️ Run tests with coverage" working-directory: grails-gradle diff --git a/.github/workflows/end-to-end.yml b/.github/workflows/end-to-end.yml index 48510bdb04..d4a86ee4cb 100644 --- a/.github/workflows/end-to-end.yml +++ b/.github/workflows/end-to-end.yml @@ -74,22 +74,11 @@ jobs: java-version: | ${{ steps.jdks.outputs.fixture-java }} ${{ steps.jdks.outputs.build-java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "📦 Setup: publish grails-gradle to the local repository the tests resolve from" # Both builds publish into the same build/local-maven, and both are needed: the Grails BOM diff --git a/.github/workflows/forge-deploy-aws.yml b/.github/workflows/forge-deploy-aws.yml index 8f6369a638..80307aaf6f 100644 --- a/.github/workflows/forge-deploy-aws.yml +++ b/.github/workflows/forge-deploy-aws.yml @@ -83,7 +83,8 @@ jobs: - name: "Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic + # A dispatched run is on a branch and writes like a push; a pull request only reads its base branch's entries. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "Map deployment slot" diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 81e76f5b60..43b545505e 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -36,22 +36,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Validate grails-core dependency versions" run: > @@ -80,22 +69,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Validate grails-core BOM properties" run: > @@ -149,22 +127,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -200,22 +167,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -237,12 +193,10 @@ jobs: java: 21 job_name: Ubuntu JDK 21 gradle_task: 'build :grails-shell-cli:installDist groovydoc' - cache_writer: true - os: ubuntu-latest java: 25 job_name: Ubuntu JDK 25 gradle_task: 'build :grails-shell-cli:installDist groovydoc' - cache_writer: false - os: macos-latest java: 21 job_name: macOS JDK 21 @@ -256,25 +210,21 @@ jobs: # concurrent test, compiler and groovydoc JVMs; maxTestParallel is kept alongside # it so no single task exceeds that cap either. runner_arguments: '--max-workers=2 -PmaxTestParallel=2' - cache_writer: true - os: windows-latest java: 25 job_name: Windows JDK 25 shard 0 gradle_task: 'build :grails-shell-cli:installDist groovydoc' shard_arguments: '-PtestShardCount=3 -PtestShardIndex=0' - cache_writer: true - os: windows-latest java: 25 job_name: Windows JDK 25 shard 1 gradle_task: testShard shard_arguments: '-PtestShardCount=3 -PtestShardIndex=1' - cache_writer: false - os: windows-latest java: 25 job_name: Windows JDK 25 shard 2 gradle_task: testShard shard_arguments: '-PtestShardCount=3 -PtestShardIndex=2' - cache_writer: false runs-on: ${{ matrix.os }} steps: - name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it @@ -286,23 +236,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - id: dependency-cache - uses: actions/cache/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -316,14 +254,6 @@ jobs: -PskipCodeStyle ${{ matrix.shard_arguments }} ${{ matrix.runner_arguments }} - - name: "🗄️ Save dependency jar cache" - if: ${{ success() && matrix.cache_writer && steps.dependency-cache.outputs.cache-hit != 'true' }} - uses: actions/cache/[email protected] - with: - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} buildRerunTasks: if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }} name: 'Build Grails-Core Rerunning all Tasks (${{ matrix.job_name }})' @@ -336,25 +266,21 @@ jobs: job_name: Ubuntu JDK 21 build gradle_task: 'build :grails-shell-cli:installDist groovydoc' extra_arguments: '-PskipTests' - cache_writer: true - os: ubuntu-latest java: 21 job_name: Ubuntu JDK 21 shard 0 gradle_task: testShard extra_arguments: '-PtestShardCount=3 -PtestShardIndex=0' - cache_writer: false - os: ubuntu-latest java: 21 job_name: Ubuntu JDK 21 shard 1 gradle_task: testShard extra_arguments: '-PtestShardCount=3 -PtestShardIndex=1' - cache_writer: false - os: ubuntu-latest java: 21 job_name: Ubuntu JDK 21 shard 2 gradle_task: testShard extra_arguments: '-PtestShardCount=3 -PtestShardIndex=2' - cache_writer: false runs-on: ${{ matrix.os }} steps: - name: "Output Agent IP" # in the event RAO blocks this agent, this can be used to debug it @@ -366,23 +292,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - id: dependency-cache - uses: actions/cache/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -395,14 +309,6 @@ jobs: -PonlyCoreTests -PskipCodeStyle ${{ matrix.extra_arguments }} - - name: "🗄️ Save dependency jar cache" - if: ${{ success() && matrix.cache_writer && steps.dependency-cache.outputs.cache-hit != 'true' }} - uses: actions/cache/[email protected] - with: - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} buildForge: name: "Build Grails Forge (Java ${{ matrix.java }}, indy=${{ matrix.indy }})" strategy: @@ -424,22 +330,11 @@ jobs: with: distribution: 'liberica' java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -495,42 +390,36 @@ jobs: job_name: Java 21, indy=false gradle_task: 'bootJar check' artifact_suffix: java21-indyfalse-shard0 - cache_writer: true shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0' - java: 21 indy: false job_name: Java 21, indy=false, shard 1 gradle_task: testShard artifact_suffix: java21-indyfalse-shard1 - cache_writer: false shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1' - java: 21 indy: true job_name: Java 21, indy=true gradle_task: 'bootJar check' artifact_suffix: java21-indytrue-shard0 - cache_writer: false shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0' - java: 21 indy: true job_name: Java 21, indy=true, shard 1 gradle_task: testShard artifact_suffix: java21-indytrue-shard1 - cache_writer: false shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1' - java: 25 indy: false job_name: Java 25, indy=false gradle_task: 'bootJar check' artifact_suffix: java25-indyfalse-shard0 - cache_writer: false shard_arguments: '-PtestShardCount=2 -PtestShardIndex=0' - java: 25 indy: false job_name: Java 25, indy=false, shard 1 gradle_task: testShard artifact_suffix: java25-indyfalse-shard1 - cache_writer: false shard_arguments: '-PtestShardCount=2 -PtestShardIndex=1' runs-on: ubuntu-24.04 steps: @@ -543,23 +432,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - id: dependency-cache - uses: actions/cache/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -579,14 +456,6 @@ jobs: -PskipSpringSecurityTests -PskipRedisTests ${{ matrix.shard_arguments }} - - name: "🗄️ Save dependency jar cache" - if: ${{ success() && matrix.cache_writer && steps.dependency-cache.outputs.cache-hit != 'true' }} - uses: actions/cache/[email protected] - with: - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - name: "📤 Upload Geb Reports" if: failure() uses: actions/[email protected] @@ -624,22 +493,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -676,22 +534,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -730,22 +577,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -778,22 +614,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -831,22 +656,10 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🗄️ Cache the mongod the embedded server runs" uses: actions/[email protected] with: - # Kept apart from the dependency jars: this holds an immutable download from + # Outside the Gradle User Home that setup-gradle caches: this holds an immutable download from # fastdl.mongodb.org - the archive and the binary extracted out of it - and no database, # so it belongs to no branch and does not change when a dependency version does. # Keyed by the version this entry asks for, because the matrix runs more than one and a @@ -857,7 +670,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🏃 Run Functional Tests" env: @@ -894,22 +708,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🏃 Run Functional Tests" env: @@ -976,22 +779,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🏃 Run Functional Tests" env: @@ -1028,22 +820,11 @@ jobs: with: distribution: liberica java-version: ${{ matrix.java }} - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🏃 Run Functional Tests" env: @@ -1070,22 +851,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -1138,22 +908,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -1205,22 +964,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -1317,22 +1065,11 @@ jobs: with: distribution: liberica java-version: 21 - - name: "🗄️ Restore dependency jar cache" - uses: actions/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔨 Build Snapshot Documentation" run: > diff --git a/.github/workflows/groovy-snapshot-canary.yml b/.github/workflows/groovy-snapshot-canary.yml index ff09d7383a..361e2668bf 100644 --- a/.github/workflows/groovy-snapshot-canary.yml +++ b/.github/workflows/groovy-snapshot-canary.yml @@ -79,7 +79,10 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # this workflow rebuilds Groovy each run; a Gradle home cache is not useful here + # Groovy is rebuilt every run, but its build dependencies are not: the Gradle User Home of this job + # holds them, and the entry is keyed by job, so it never mixes with the Grails jobs below. + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -136,30 +139,18 @@ jobs: with: java-version: 21 distribution: liberica - - name: "🗄️ Restore dependency jar cache" - id: dependency-cache - uses: actions/cache/[email protected] - with: - # Cache only downloaded dependency jars and wrapper distributions, never Grails build outputs. - # Keyed by branch version so each release branch maintains its own warm cache. - # Fixed-depth paths: the post step re-hashes after the build, where a `**` glob walks every output and times out. - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} - restore-keys: | - gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}- - name: "🗄️ Cache the mongod the embedded server runs" uses: actions/[email protected] with: - # Separate from the dependency jars, for the reasons given on the same step in - # gradle.yml. The version is the one -PmongodbContainerVersion asks for below. + # Outside the Gradle User Home that setup-gradle caches, for the reasons given on the same + # step in gradle.yml. The version is the one -PmongodbContainerVersion asks for below. path: ~/.embedmongo key: embedmongo-${{ runner.os }}-8.0 - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-disabled: true # dependency jars are cached by the explicit branch-keyed step above + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -187,11 +178,3 @@ jobs: -PmongodbContainerVersion=8.0 env: GRAILS_INCLUDE_MAVEN_LOCAL: true - - name: "🗄️ Save dependency jar cache" - if: ${{ success() && matrix.shard_index == 0 && steps.dependency-cache.outputs.cache-hit != 'true' }} - uses: actions/cache/[email protected] - with: - path: | - ~/.gradle/caches/modules-2 - ~/.gradle/wrapper - key: gradle-deps-${{ runner.os }}-${{ github.base_ref || github.ref_name }}-${{ hashFiles('dependencies.gradle', 'gradle/wrapper/gradle-wrapper.properties', '*/gradle/wrapper/gradle-wrapper.properties') }} diff --git a/.github/workflows/rat.yml b/.github/workflows/rat.yml index 262b20c028..084db0d6ae 100644 --- a/.github/workflows/rat.yml +++ b/.github/workflows/rat.yml @@ -42,7 +42,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 diff --git a/.github/workflows/release-publish-docs.yml b/.github/workflows/release-publish-docs.yml index 90265e86cf..9dab3f7d3b 100644 --- a/.github/workflows/release-publish-docs.yml +++ b/.github/workflows/release-publish-docs.yml @@ -80,7 +80,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # A dispatched run is on a branch and writes like a push; a pull request only reads its base branch's entries. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "📖 Generate Documentation" # githubBranch comes from gradle.properties, so the source links point at the same branch as the voted diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a125e6ba2..8e29d82c6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,7 +100,9 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # A release runs on its tag, which GitHub lets read the default branch's entries but not its release branch's; + # what it writes is scoped to that tag, so it serves only a re-run of the same release. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "⚙️ Run pre-release" uses: apache/grails-github-actions/pre-release@asf @@ -717,7 +719,9 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # A release runs on its tag, which GitHub lets read the default branch's entries but not its release branch's; + # what it writes is scoped to that tag, so it serves only a re-run of the same release. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔎 Determine SDKMAN release type" id: sdkman-release diff --git a/.github/workflows/sitemesh2.yml b/.github/workflows/sitemesh2.yml index 8bccc09a3f..00ce82f709 100644 --- a/.github/workflows/sitemesh2.yml +++ b/.github/workflows/sitemesh2.yml @@ -68,7 +68,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 @@ -106,7 +107,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Setup TestLens" uses: testlens-app/setup-testlens@d29a2be31512b3aeda3adcef09fbe0d55af90c51 # v1.9.4 diff --git a/.github/workflows/validate-actions.yml b/.github/workflows/validate-actions.yml index 70f74d1c89..8946b56a9d 100644 --- a/.github/workflows/validate-actions.yml +++ b/.github/workflows/validate-actions.yml @@ -52,7 +52,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: - cache-provider: basic # 'basic' uses the MIT-licensed, open-source cache provider; the default 'enhanced' provider (v6+) is proprietary (Gradle commercial Terms of Use) + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔎 Validate Actions against the ASF approved list" run: ./gradlew validateActions diff --git a/.github/workflows/vulnerability-scan.yml b/.github/workflows/vulnerability-scan.yml index f78644e6c4..692b0c5c59 100644 --- a/.github/workflows/vulnerability-scan.yml +++ b/.github/workflows/vulnerability-scan.yml @@ -59,6 +59,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Run Vulnerability Scan" # Looks up every resolved dependency in the OSV database (https://osv.dev) and in Sonatype Guide. @@ -110,6 +112,8 @@ jobs: - name: "🐘 Setup Gradle" uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0 with: + # Every push writes, so each release branch keeps its own entries; a pull request only reads its base branch's. + cache-read-only: ${{ github.event_name == 'pull_request' }} develocity-access-key: ${{ secrets.GRAILS_DEVELOCITY_ACCESS_KEY }} - name: "🔍 Run Vulnerability Scan" # GitHub withholds secrets from a pull request raised by a fork, so its scan consults OSV only,
