Skip to content

ci: add Java setup step to functional tests workflow - #64

Open
TheUnderScorer wants to merge 6 commits into
mainfrom
ci/INTER-2701-fix-tests
Open

TheUnderScorer wants to merge 6 commits into
mainfrom
ci/INTER-2701-fix-tests

Conversation

@TheUnderScorer

@TheUnderScorer TheUnderScorer commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The ubuntu-latest runner now defaults to JDK 25. Gradle 8.9 can't run on it, so every Gradle job failed before any test started. This PR runs Gradle on JDK 17 in CI and leaves the build itself alone. The Gradle 9 upgrade is postponed to a separate PR, since Gradle 9 needs JDK 17+ and JitPack builds on 11.

 test.yml / functional.yml
   format-check, test matrix, functional matrix
+    setup-java: temurin 17           # runs Gradle
     ./gradlew ... -PjavaVersion=${{ matrix.java }}   # toolchain uses the runner's preinstalled 11/17/21/25

   jitpack-build
+    setup-java: zulu 11              # same JDK as jitpack.yml

 check-templates-consistency.yml     # shared workflow, no Java setup step
-  generate-command: 'bash ./scripts/generate.sh'
+  generate-command: 'JAVA_HOME=$JAVA_HOME_17_X64 bash ./scripts/generate.sh'

No changes to the Gradle wrapper, build scripts or jitpack.yml. The diff against main touches only workflow files.

Evidence

  • Before: run 40332593453 fails with java.lang.IllegalArgumentException: 25.0.5 at org.jetbrains.kotlin...JavaVersion.parse. Java 11/17/21 jobs were cancelled by fail-fast.
    After: run 40363738577 and the functional and template checks all pass, including Java 11/17/21/25 unit and functional tests, the format check and the Jitpack smoke test.

Merge Danger

Door: two-way

CI config only. Revert the commit to undo it.

Blast Radius: CI

The published artifact, JitPack and the release workflow stay as they are. If the runner image drops JDK 17 or renames JAVA_HOME_17_X64, the template check breaks again.

🤖 Generated with Claude Code

@TheUnderScorer
TheUnderScorer force-pushed the ci/INTER-2701-fix-tests branch from 08c8469 to 6f49036 Compare October 26, 2026 13:37
necipallef
necipallef previously approved these changes Oct 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Release-PR generation still launches the upgraded Gradle with Java 11, which cannot run it.

1 open issue
What changed in this PR

Updates the SDK’s build tooling and CI Java setup to support newer runner JDKs while preserving Java 11 artifact compatibility.

Changes:

  • Upgrades Gradle from 8.9 to 9.8.2 and refreshes wrapper scripts.
  • Adapts build scripts to Gradle 9 APIs.
  • Separates CI runtime JDKs from test toolchains and moves JitPack builds to JDK 17.
File Description
sdk/​sdk.gradle.kts Updates project-version property access.
jitpack.yml Uses JDK 17 for building and publishing.
gradlew.bat Refreshes the Windows wrapper script.
gradlew Refreshes the Unix wrapper script.
gradle/​wrapper/​gradle-wrapper.properties Selects Gradle 9.8.2.
examples/​examples.gradle.kts Updates project-version property access.
build.gradle.kts Replaces removed execution APIs with injected ExecOperations.
.github/​workflows/​test.yml Installs explicit runtime JDKs and test toolchains.
.github/​workflows/​functional.yml Runs Gradle on JDK 21 alongside matrix toolchains.

Review effort: Balanced

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.2-bin.zip

@mcnulty-fp mcnulty-fp left a comment •

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.

When working on v8, I decided to skip the upgrade to gradle v9 because it requires Java 17+ to run and can't run on Java 11. The Jitpack build is setup to use Java 11 currently. Reference.

While we could update the jitpack build to use openjdk17 and change the compiler target to Java 11, we could also keep using gradle 8 by configuring actions/setup-java to set distribution to temurin and the version to 17. This will configure ubuntu-26.04 to use 17 rather the new default of 25.

Maybe it makes sense to postpone the Gradle upgrade to another PR and fix the tests in this PR?

mcnulty-fp
mcnulty-fp previously approved these changes Oct 26, 2026

@mcnulty-fp mcnulty-fp left a comment

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.

LGTM! Just one minor suggestion for the jitpack build smoke test

Comment thread .github/workflows/test.yml Outdated
Co-authored-by: Dan McNulty <212590662+mcnulty-fp@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants