Skip to content

[COMMONSXML-11] Restructure the build matrix around the axes that matter - #24

Merged
garydgregory merged 11 commits into
mainfrom
feature/ci-matrix-platforms
Aug 1, 2026
Merged

[COMMONSXML-11] Restructure the build matrix around the axes that matter#24
garydgregory merged 11 commits into
mainfrom
feature/ci-matrix-platforms

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Note

Stacked on #23. The base branch is feature/ci-matrix, so this PR shows only its own commit. Please merge #23 first; GitHub will then retarget this one at main automatically.

java.xml is pure Java, so the OS and JDK axes barely interact. The one OS-specific behavior this library touches is file URI / systemId normalization on Windows, which is old, stable code that any single Windows job exercises. Crossing three OSes with two JDK endpoints therefore spent jobs on combinations that cannot differ, while leaving the axes that do differ underexplored.

The new matrix

OS Distribution JDK Purpose
windows-latest temurin 8, 11, 17, 21, 25, 26, 27-ea JDK majors; also covers systemId normalization at every version
ubuntu-latest temurin 25 Linux canary: case-sensitive filesystem, and what contributors run
ubuntu-latest semeru 8, 21 OpenJ9 class-library lineage
ubuntu-latest zulu 8.0.201 A runtime predating the later jdk.xml.* backports
ubuntu-latest graalvm 25 Native image, via -Pnative-xalan (from #23)

Twelve JVM jobs plus the two Android legs, against twenty-one for a full 3x7 matrix, with strictly better coverage of the axes that produce different results.

Rationale for the omissions

macOS is intentionally dropped: its filesystem is case-insensitive like Windows and POSIX-pathed like Linux, so it is strictly interior to the other two. If we want to keep the build verified for Mac-based contributors, a scheduled weekly macOS job would be enough.

Corretto, Liberica, Microsoft, SapMachine track the OpenJDK Updates projects closely; for java.xml purposes they are interchangeable with Temurin.

Verification

Every distribution and version in the matrix was confirmed to be published before being added:

  • Temurin 26 is GA and 27 has EA builds for windows-x64 (Adoptium API).
  • IBM Semeru publishes 8 and 21 (ibmruntimes/semeru{8,21}-binaries).
  • Zulu 8.0.201 is published for linux x64 (Azul metadata API).
  • GraalVM 25 is the latest release; 26 and 27 are not published.

The suite was run locally against the JDK 8 legs, which are the ones most likely to break: Temurin 8u492 and IBM Semeru (OpenJ9) 8u412 both BUILD SUCCESS, all seven surefire executions green. The GraalVM job's exact command (mvn ... -Pnative-xalan test) also passes locally on GraalVM 21: 123 native tests, zero failures.

Two legs could not be exercised locally and are first tested by this PR's own CI run: Zulu 8.0.201 (no such JDK installed here) and Semeru 21. The Windows jobs likewise run for the first time here; they are the same code paths as the Linux ones apart from systemId normalization, which is precisely what they are there to check.

🤖 Generated with Claude Code

ppkarwasz and others added 3 commits July 9, 2026 22:04
Add a `native-xalan` profile that builds the tests into a native image, and
a GraalVM job to the CI matrix that activates it. This exercises a code path
the JVM matrix cannot reach: native-image resolves the JAXP providers at
build time under the closed-world assumption, rather than at run time
through ServiceLoader.

A native binary carries one classpath, so only `test-stockjdk` runs; the
other JAXP combinations stay on the JVM matrix. Saxon-HE is dropped, since
its JAXP entry points carry no reachability metadata and every ServiceLoader
lookup would fail on a missing no-arg constructor. Its `xpath3` group is
already excluded from that execution.

Apache Xalan supplies TrAX. The stock JDK's XSLTC compiles each stylesheet
into translet bytecode and defines the class at run time, which a
closed-world image cannot do: with XSLTC the transform tests fail on `No
classes have been predefined during the image build`. Predefining them does
not help either, even though JDK-8274535 made the generated bytecode
deterministic; the image builder rejects the class with `Cannot define class
die.verwandlung.fixture`. Interpretive Xalan, the workaround named on that
same issue, needs no bytecode at run time. Xalan and its serializer are
declared as project dependencies rather than through surefire's
additionalClasspathDependencies, which native-image never sees.

Reachability metadata comes from the tracing agent rather than a committed
config: Xalan reflects on its template setters and reads serializer defaults
from property files, none of which static analysis sees, and a hand-written
config would rot against every Xalan and JDK update. The attack fixtures are
embedded explicitly, since the agent records only the resources a given run
happened to open.

Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
java.xml is pure Java, so the OS and JDK axes barely interact. The one
OS-specific behavior this library touches is file URI / systemId
normalization on Windows, which any single Windows job exercises. Crossing
three OSes with two JDK endpoints therefore spent jobs on combinations that
cannot differ, while leaving the axes that do differ underexplored.

Run the JDK majors on Windows, which covers systemId normalization at every
version for free, and keep one Linux canary on the current LTS: a
case-sensitive filesystem, and what contributors and downstream CI run.

Add distribution variance, one job each. Semeru 8 and 21 cover OpenJ9, whose
class library is the most divergent runtime setup-java offers and the most
plausible source of surprises in factory lookup and class loading. Zulu is
pinned to an old 8 patch level, verifying the hardening degrades gracefully
on a runtime predating the later jdk.xml.* backports.

Drop macOS: its filesystem is case-insensitive like Windows and POSIX-pathed
like Linux, so it is strictly interior to the other two. Vendors that track
the OpenJDK Updates projects closely are interchangeable with Temurin here.

Narrow the GraalVM job to the `test` lifecycle; native-image is slow and the
static analysis goals are already covered by the JVM jobs.

Twelve JVM jobs plus the two Android legs, against twenty-one for a full
3x7 matrix, with strictly better coverage of the axes that produce different
results.

Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
@ppkarwasz

Copy link
Copy Markdown
Member Author

Zulu is pinned to a version that does not enforce ACCESS_EXTERNAL_*. Therefore we need to merge #21, before this one.

@ppkarwasz
ppkarwasz marked this pull request as draft July 9, 2026 21:03
@garydgregory

Copy link
Copy Markdown
Member

GraalVM should be marked as experimental. We make no effort in Commons towards accommodation for any specific JVM.

@ppkarwasz

Copy link
Copy Markdown
Member Author

GraalVM is marked as experimental in #23 on which PR this is stacked.

@ppkarwasz

Copy link
Copy Markdown
Member Author

After applying #21, the 8.0.201 build is not failing any more. This means the ACCESS_EXTERNAL_* implementation in that version was faulty and didn't cover all the bases.

@ppkarwasz
ppkarwasz marked this pull request as ready for review July 31, 2026 19:46
Base automatically changed from feature/ci-matrix to main August 1, 2026 11:09
@garydgregory
garydgregory merged commit e51431f into main Aug 1, 2026
31 of 32 checks passed
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