Attempt to fix flaky caching tests (#836)

This commit is contained in:
Daz DeBoer 2026-01-28 11:03:09 -07:00 committed by GitHub
parent 8c7f3ffba4
commit f29f5a9d7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,7 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }}
# Requires a fresh cache entry each run
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: cache-cleanup
permissions:
contents: read
@ -45,6 +46,8 @@ jobs:
# Second build will use the cache from the first build, but cleanup should remove unused artifacts
cache-cleanup-assemble-build:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
needs: cache-cleanup-full-build
strategy:
max-parallel: 1
@ -68,6 +71,8 @@ jobs:
run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build
cache-cleanup-check-clean-cache:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
needs: cache-cleanup-assemble-build
strategy:
max-parallel: 1

View File

@ -13,6 +13,7 @@ on:
env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-containerized-gradle-home
permissions:
contents: read

View File

@ -13,6 +13,7 @@ on:
env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-custom-gradle-home
permissions:
contents: read

View File

@ -16,6 +16,7 @@ on:
env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-java-toolchain
permissions:
contents: read