Smaller github action cache (#5848)

This commit is contained in:
Trask Stalnaker 2022-04-15 18:18:45 -07:00 committed by GitHub
parent 23d346773e
commit 1c9b1c6445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 7 deletions

View File

@ -97,6 +97,8 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
arguments: assemble publishToSonatype
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Build and publish gradle plugin snapshots
env:
@ -107,5 +109,7 @@ jobs:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
uses: gradle/gradle-build-action@v2
with:
arguments: build publishToSonatype
build-root-directory: gradle-plugins
arguments: build publishToSonatype
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1

View File

@ -23,6 +23,8 @@ jobs:
with:
arguments: ":smoke-tests:images:fake-backend:jibDockerBuild -Djib.httpTimeout=120000 -Djib.console=plain"
cache-read-only: true
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
buildWindows:
runs-on: windows-2019

View File

@ -42,6 +42,8 @@ jobs:
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
arguments: assemble -x javadoc ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Upload deadlock detector artifacts if any
if: always()

View File

@ -65,6 +65,8 @@ jobs:
arguments: ":smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}${{ inputs.no-build-cache && ' --no-build-cache' || '' }}"
# only push cache for one matrix option per OS since github action cache space is limited
cache-read-only: ${{ inputs.cache-read-only || matrix.smoke-test-suite != 'tomcat' }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Upload jvm crash dump files if any
if: always()

View File

@ -56,7 +56,6 @@ jobs:
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
with:
arguments: test -PtestLatestDeps=true ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
# testLatestDeps dependencies bundle is over 2gb, which causes restoring it to fail with:
# RangeError [ERR_OUT_OF_RANGE]: The value of "length" is out of range.
# It must be >= 0 && <= 2147483647. Received 2299528741
cache-read-only: true
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1

View File

@ -67,8 +67,7 @@ jobs:
# only push cache for one matrix option since github action cache space is limited
cache-read-only: ${{ inputs.cache-read-only || matrix.test-java-version != 11 || matrix.vm != 'hotspot' }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: |
caches/build-cache-1
gradle-home-cache-excludes: caches/build-cache-1
- name: Upload deadlock detector artifacts if any
if: always()