-
Notifications
You must be signed in to change notification settings - Fork 1k
Update gradle caching #13208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gradle caching #13208
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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' || '' }} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when I run with and reading the CodeQL docs they say they need
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't check the commit history, but I suspect the issue was that the tests sometimes got an OOM. So it was split in 2 parts where in the first part we compile the tests with
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh! I missed the second step below, that makes sense, I'll add this back |
||
|
|
||
| - name: Test | ||
| run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}${{ inputs.no-build-cache && ' --no-build-cache' || '' }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removing |
||
|
|
||
| - name: Perform CodeQL analysis | ||
| uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this might help CI performance now that we aren't using gradle enterprise anymore (it should use github actions cache)