Skip to content

Commit

Permalink
CI: Support building with one Java version and testing with another
Browse files Browse the repository at this point in the history
Motivation
----------
Want to build using Java 17 (or later) and run tests
against all supported versions.

This lets the Java Columnar client require Java 17
and still live in the same repo as other SDKs,
and also removes an obstacle to including the
FIT performers which already require Java 17.

Modifications
-------------
Add class `Jvm`, a record that identifies a JVM
by its cbdep package and version.

Defer setting the JAVA_HOME and PATH environment
variables until we execute Maven. This requires
less boilerplate and is less error-prone than setting
them in the stage declaration.

Set the `jvm` Maven property so the surefire
plugin uses the target JVM to run tests instead
of Maven's JVM (which is now always Java 17).

Upgrade OpenJDK 17 and OpenJDK 11 to versions more
widely available via cbdep.

Comment out the macOS stage; it's broken due to
a misbehaving `wget` binary.

Change-Id: Idbd8a42eadfe5b7c3fe35199be664915578838cc
Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/212628
Tested-by: Build Bot <[email protected]>
Reviewed-by: Graham Pople <[email protected]>
  • Loading branch information
dnault committed Jul 12, 2024
1 parent d4507f5 commit 4dfe332
Showing 1 changed file with 176 additions and 250 deletions.
Loading

0 comments on commit 4dfe332

Please sign in to comment.