Skip to content

CI: Replace actions/cache with gradle/actions/setup-gradle for Gradle caching#15799

Merged
kevinjqliu merged 2 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/use-setup-gradle
Mar 27, 2026
Merged

CI: Replace actions/cache with gradle/actions/setup-gradle for Gradle caching#15799
kevinjqliu merged 2 commits intoapache:mainfrom
kevinjqliu:kevinjqliu/use-setup-gradle

Conversation

@kevinjqliu
Copy link
Copy Markdown
Contributor

@kevinjqliu kevinjqliu commented Mar 27, 2026

Closes #15789

Replaces manual actions/cache usage with gradle/actions/setup-gradle (using commit hash approved by asf) across all CI workflows.

setup-gradle handles Gradle caching automatically (caches/wrapper), only saves on the default branch,
and restores on PR branches — matching the previous behavior with less configuration.

Changes:

  • Remove actions/cache/restore + actions/cache/save pairs
  • Remove standalone actions/cache steps
  • Add gradle/actions/setup-gradle before Gradle invocations
  • Add caching to build-checks and build-javadoc jobs in Java CI that previously had none

@github-actions github-actions bot added the INFRA label Mar 27, 2026
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Other pinned actions include a version comment tag (e.g., # v5). Do we need one here too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Copy link
Copy Markdown
Contributor

@huaxingao huaxingao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevinjqliu kevinjqliu merged commit 315620a into apache:main Mar 27, 2026
36 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/use-setup-gradle branch March 27, 2026 23:57
manuzhang pushed a commit to manuzhang/iceberg that referenced this pull request Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use gradle/actions/setup-gradle instead of actions/cache

2 participants