From 786e79fbda89c166e0c48824b446aceee609fd7a Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 2 Mar 2022 19:58:11 -0800 Subject: [PATCH] Better github action cache management (#5488) --- .github/workflows/smoke-test.yml | 3 ++- .github/workflows/test.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index c652f43e6a..7ac941193e 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -63,4 +63,5 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: ":smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}${{ inputs.no-build-cache && ' --no-build-cache' || '' }}" - cache-read-only: ${{ inputs.cache-read-only }} + # 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' }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 753c7d4077..2ed85181a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,8 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: test -PtestJavaVersion=${{ matrix.test-java-version }} -PtestJavaVM=${{ matrix.vm }} -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false ${{ inputs.no-build-cache && ' --no-build-cache' || '' }} - cache-read-only: ${{ inputs.cache-read-only }} + # 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' }} - name: Upload deadlock detector artifacts if any if: always()