Skip to content

Update GHA + Jenkins workflows to work with Java 21#918

Merged
jonahgraham merged 7 commits intomainfrom
jonah/gha
Nov 14, 2025
Merged

Update GHA + Jenkins workflows to work with Java 21#918
jonahgraham merged 7 commits intomainfrom
jonah/gha

Conversation

@jonahgraham
Copy link
Contributor

This replaces #900 - instead of updating #900, this is a new PR that is pushed to origin so that full Jenkins build and test run, including signing/testing/etc

Full details in individual commits, at the high level:

  • Allow gradle build to use JDK 17 or 21
  • Run tests with Java 11, 17 & 21
  • On CI build with Java 21
  • Fixup some of the xtend dependencies so that it build and tests cleanly
  • better test reporting
  • run japicmp as part of GHA
  • and more cleanups

sebthom and others added 7 commits November 14, 2025 15:47
- update URLs to reference documentation
- test on MacOS ARM and Intel
- update versions of github actions (checkout, setup-java)
- parameterize validate job so that in case of errors an SSH debug
session can be opened

Co-authored-by: Jonah Graham <jonah@kichwacoders.com>
…and 21

- on CI build with Java 21, test with 11, 17 and 21
- on Dev machine, build can also be 17
- Decouple JDK to run Gradle from the JDK used to compile/test.
- Use Java toolchains to select JDK 11 for compilation and test
- Set javac --release 11 for consistent API/bytecode.
- Launch Test tasks with the JDK 11 toolchain for non-xtend cases
- Launch test tasks with JDK 17, 21 for all tests
- Update Tycho to newer version that works with Java 21

Co-authored-by: Jonah Graham <jonah@kichwacoders.com>
The results are published, but can be seen in build summary.
For some of the trivial use cases of xtend change them to pure Java.
This allows more of the tests to build and run with Java 11 as
xtend now requires Java 17.
xtend converts `.last` to `List.getLast()` if the JVM it is running
under has it, so the generated java files will use `List.getLast()`
even though we want to target older JVM. `List.getLast()` was introduced
in Java 21, which is newer than our supported version of Java11.

This is the workaround recommended in eclipse-xtext/xtext#3535
@jonahgraham
Copy link
Contributor Author

This ran on Jenkins too https://ci.eclipse.org/lsp4j/job/lsp4j-multi-build/job/jonah%252Fgha/ which publishes to https://download.eclipse.org/lsp4j/builds/jonah/gha/

@sebthom Do you want to have a review of this?

@jonahgraham
Copy link
Contributor Author

xtend dependent tests are run 2 x (Java 17 and Java 21) and non-dependent run on Java 11 too (3x)

For example:

JsonParseTest.xtend runs each test 2x results

NullResponseTest.java runs each test 3x results

@sebthom
Copy link
Contributor

sebthom commented Nov 14, 2025

LGTM, nice to see the matrix builds.

@jonahgraham jonahgraham merged commit 68d54fc into main Nov 14, 2025
16 of 17 checks passed
@jonahgraham jonahgraham added this to the 1.0.0 milestone Feb 9, 2026
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.

2 participants