Update gradle caching (#13208)

This commit is contained in:
Trask Stalnaker 2025-02-04 17:52:05 -08:00 committed by GitHub
parent a898f20c41
commit 32b19aab15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 12 additions and 27 deletions

View File

@ -44,8 +44,6 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Spotless
run: ./gradlew spotlessCheck ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
@ -68,8 +66,6 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Generate license report
run: ./gradlew generateLicenseReport ${{ inputs.no-build-cache && '--no-build-cache' || '' }}
@ -151,8 +147,6 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Build
# javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/
@ -253,8 +247,6 @@ jobs:
with:
# 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
- name: List tests
# "check" is needed to activate all tests for listing purposes
@ -379,12 +371,10 @@ jobs:
with:
# 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: Build
# running suite "none" compiles everything needed by smoke tests without executing any tests
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none --no-daemon ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
- name: Test
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}${{ inputs.no-build-cache && ' --no-build-cache' || '' }}

View File

@ -77,9 +77,6 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Build and publish artifact snapshots
env:

View File

@ -37,12 +37,21 @@ jobs:
- name: Free disk space
run: .github/scripts/gha-free-disk-space.sh
- name: Set up Java 17
- name: Set up JDK for running Gradle
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: temurin
java-version-file: .java-version
- name: Increase gradle daemon heap size
run: |
sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
- name: Setup Gradle
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: ${{ github.event_name == 'pull_request' }}
- name: Initialize CodeQL
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
with:
@ -51,12 +60,9 @@ jobs:
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
tools: latest
- name: Setup Gradle
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
- name: Build
# skipping build cache is needed so that all modules will be analyzed
run: ./gradlew assemble -x javadoc --no-build-cache --no-daemon
run: ./gradlew assemble -x javadoc
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8

View File

@ -28,8 +28,6 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: true
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Build Docker image
run: ./gradlew :smoke-tests:images:early-jdk8:imageBuild

View File

@ -28,8 +28,6 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: true
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: Build Docker image
run: ./gradlew :smoke-tests:images:fake-backend:jibDockerBuild -Djib.httpTimeout=120000 -Djib.console=plain

View File

@ -64,8 +64,6 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: List tests
run: >

View File

@ -61,8 +61,6 @@ jobs:
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
with:
cache-read-only: ${{ inputs.cache-read-only }}
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
- name: List tests
run: >