Skip to content

Commit

Permalink
jdk21
Browse files Browse the repository at this point in the history
  • Loading branch information
krasinski committed Apr 29, 2024
1 parent eb9b66b commit 288adb1
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 26 deletions.
21 changes: 13 additions & 8 deletions docker/Jenkinsfile-build-docker
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ properties([

IMAGE_NAME_PREFIX = 'harbor.h2o.ai/opsh2oai/h2o-3'

JDK_VERSIONS = ['8', '10', '11', '12', '13', '14', '15', '16', '17']
JDK_VERSIONS_PY_R = ['8', '11', '17'] // stable, last-supported, latest
JDK_VERSIONS = ['8', '10', '11', '12', '13', '14', '15', '16', '17', '21']
JDK_VERSIONS_PY_R = ['8', '17', '21'] // stable, last-supported, latest
PYTHON_VERSIONS = ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
R_VERSION = ['3.3.3', '3.4.1', '3.5.3', '3.6.2', '4.0.2']

Expand Down Expand Up @@ -60,6 +60,7 @@ ansiColor('xterm') {
sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-15/x64-linux/jdk-15.0.2_linux-x64_bin.tar.gz"
sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-16/x64-linux/jdk-16.0.2_linux-x64_bin.tar.gz"
sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-17/x64-linux/jdk-17.0.0_linux-x64_bin.tar.gz"
sh "s3cmd get s3://artifacts.h2o.ai/releases/oracle/jdk-21/x64-linux/jdk-21.0.0_linux-x64_bin.tar.gz"
}
}
stash name: 'docker-sources'
Expand All @@ -75,7 +76,7 @@ ansiColor('xterm') {
PYTHON_VERSIONS.each {version ->
pythonImages += "dev-python-${version}"
}
buildInParallel(pipelineContext, pythonImages)
//buildInParallel(pipelineContext, pythonImages)

buildInParallel(pipelineContext, ['dev-r-base'])
def componentImages = []
Expand All @@ -86,11 +87,15 @@ ansiColor('xterm') {
componentImages += "dev-jdk-${version}"
}
componentImages += "dev-mojocompat"
buildInParallel(pipelineContext, componentImages)
//buildInParallel(pipelineContext, componentImages)

buildInParallel(pipelineContext, ["dev-build-base"])
buildInParallel(pipelineContext, ["dev-build-hadoop"],)
buildInParallel(pipelineContext, ["dev-release"])
//buildInParallel(pipelineContext, ["dev-build-base"])
//buildInParallel(pipelineContext, ["dev-build-hadoop"],)
//buildInParallel(pipelineContext, ["dev-release"])

buildInParallel(pipelineContext, "dev-jdk-21")
buildInParallel(pipelineContext, "dev-r-3.5.3-jdk-21")
buildInParallel(pipelineContext, "python-3.6-jdk-21")

def componentJdkImages = []
PYTHON_VERSIONS.each {version ->
Expand All @@ -103,7 +108,7 @@ ansiColor('xterm') {
componentJdkImages += "dev-r-${version}-jdk-${jdkVersion}"
}
}
buildInParallel(pipelineContext, componentJdkImages)
//buildInParallel(pipelineContext, componentJdkImages)
}
}

Expand Down
3 changes: 2 additions & 1 deletion docker/jenkins-images/Dockerfile-jdk-others
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN \
sync && \
if [ "${JAVA_VERSION}" = '8' ] || [ "${JAVA_VERSION}" = '10' ] || [ "${JAVA_VERSION}" = '11' ] || \
[ "${JAVA_VERSION}" = '12' ] || [ "${JAVA_VERSION}" = '13' ] || [ "${JAVA_VERSION}" = '14' ] || \
[ "${JAVA_VERSION}" = '15' ] || [ "${JAVA_VERSION}" = '16' ] || [ "${JAVA_VERSION}" = '17' ]; then \
[ "${JAVA_VERSION}" = '15' ] || [ "${JAVA_VERSION}" = '16' ] || [ "${JAVA_VERSION}" = '17' ] || \
[ "${JAVA_VERSION}" = '21' ]; then \
/tmp/install_java_version_local ${JAVA_VERSION} /tmp/java-${JAVA_VERSION}-vars.sh; \
else \
/tmp/install_java_version ${JAVA_VERSION} /tmp/java-${JAVA_VERSION}-vars.sh; \
Expand Down
6 changes: 6 additions & 0 deletions docker/scripts/java-21-vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash

JAVA_INSTALL_VERSION_MAJOR='21'
JAVA_INSTALL_VERSION=0
JAVA_INSTALL_PATH=/usr/opt/java-${JAVA_INSTALL_VERSION_MAJOR}-${JAVA_INSTALL_VERSION}/
JDK_FILE=/tmp/jdk-21.0.0_linux-x64_bin.tar.gz
4 changes: 2 additions & 2 deletions h2o-assemblies/genmodel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ apply plugin: 'com.github.hierynomus.license'
description = "H2O GenModel Assembly which is embedded into H2O.jar"

// MOJO has to stay Java 1.7 compatible!
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

// Dependencies
dependencies {
Expand Down
2 changes: 1 addition & 1 deletion h2o-core/src/main/java/water/JavaVersionSupport.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class JavaVersionSupport {
// Make sure that the following is logically consistent with whitelist in R code - see function .h2o.check_java_version in connection.R.
// Upgrade of the javassist library should be considered when adding support for a new java version.
public static final int MIN_SUPPORTED_JAVA_VERSION = 8;
public static final int MAX_SUPPORTED_JAVA_VERSION = 17;
public static final int MAX_SUPPORTED_JAVA_VERSION = 21;

/**
* Checks for the version of Java this instance of H2O was ran with and compares it with supported versions.
Expand Down
4 changes: 2 additions & 2 deletions h2o-core/src/test/java/water/JavaVersionSupportTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void beforeClass() throws Exception {
@Parameterized.Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}
{8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {21}
});
}

Expand Down Expand Up @@ -79,7 +79,7 @@ public static void beforeClass() throws Exception {
@Parameterized.Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{7}, {18}
{7}, {22}
});
}

Expand Down
2 changes: 1 addition & 1 deletion h2o-docs/src/product/welcome.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ H2O runs on Java. To build H2O or run H2O tests, the 64-bit JDK is required. To

H2O supports the following versions of Java:

- Java SE 17, 16, 15, 14, 13, 12, 11, 10, 9, 8
- Java SE 21, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8

Click `here <https://jdk.java.net/archive/>`__ to download the latest supported version.

Expand Down
4 changes: 2 additions & 2 deletions h2o-genmodel-extensions/deepwater/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
description = "H2O GenModel Deepwater Extension"

sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
api project(":h2o-genmodel")
Expand Down
4 changes: 2 additions & 2 deletions h2o-genmodel-extensions/mojo-pipeline/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
description = "H2O GenModel support MOJO2 pipeline extensions"

// MOJO has to stay Java 1.7 compatible!
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
api project(":h2o-genmodel")
Expand Down
4 changes: 2 additions & 2 deletions h2o-genmodel-extensions/xgboost/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apply plugin: 'com.github.johnrengelman.shadow'
description = "H2O GenModel XGBoost support"

// MOJO has to stay Java 1.7 compatible!
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

ext {
xgboostPredictorVersion = "0.3.20"
Expand Down
4 changes: 2 additions & 2 deletions h2o-genmodel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
description = "H2O GenModel"

// MOJO has to stay Java 1.7 compatible!
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

apply from: "$rootDir/gradle/dataCheck.gradle"

Expand Down
4 changes: 2 additions & 2 deletions h2o-logger/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java-library'

sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 1.8
targetCompatibility = 1.8

compileJava {
options.debug = true
Expand Down
2 changes: 1 addition & 1 deletion h2o-r/h2o-DESCRIPTION.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ License: Apache License (== 2.0)
URL: https://github.com/h2oai/h2o-3
BugReports: https://github.com/h2oai/h2o-3/issues
NeedsCompilation: no
SystemRequirements: Java (>= 8, <= 17)
SystemRequirements: Java (>= 8, <= 21)
Depends: R (>= 2.13.0),
methods,
stats
Expand Down
7 changes: 7 additions & 0 deletions scripts/jenkins/Makefile.jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,13 @@ test-junit-17-jenkins:
test-junit-17:
ADDITIONAL_TEST_JVM_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED" ./gradlew test -x h2o-ext-mojo-pipeline:test -x h2o-automl:test -x h2o-ext-xgboost:testMultiNode -x h2o-ext-target-encoder:testMultiNode -x h2o-clustering:test $$ADDITIONAL_GRADLE_OPTS

test-junit-21-jenkins:
$(call sed_test_scripts)
@$(MAKE) -f $(THIS_FILE) test-junit-21

test-junit-21:
ADDITIONAL_TEST_JVM_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED" ./gradlew test -x h2o-ext-mojo-pipeline:test -x h2o-automl:test -x h2o-ext-xgboost:testMultiNode -x h2o-ext-target-encoder:testMultiNode -x h2o-clustering:test $$ADDITIONAL_GRADLE_OPTS

test-junit-latest-jenkins:
$(call sed_test_scripts)
@$(MAKE) -f $(THIS_FILE) test-junit-latest
Expand Down
10 changes: 10 additions & 0 deletions scripts/jenkins/groovy/defineTestStages.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,12 @@ def call(final pipelineContext) {
additionalTestPackages: [pipelineContext.getBuildConfig().COMPONENT_PY],
imageSpecifier: "python-3.6-jdk-17"
],
[
stageName: 'Java 21 JUnit', target: 'test-junit-21-jenkins', pythonVersion: '3.6', javaVersion: 21,
timeoutValue: 700, component: pipelineContext.getBuildConfig().COMPONENT_JAVA,
additionalTestPackages: [pipelineContext.getBuildConfig().COMPONENT_PY],
imageSpecifier: "python-3.6-jdk-21"
],
[
stageName: 'Py3.6 Single Node', target: 'test-pyunit-single-node', pythonVersion: '3.6',
timeoutValue: 40, component: pipelineContext.getBuildConfig().COMPONENT_PY
Expand Down Expand Up @@ -504,6 +510,10 @@ def call(final pipelineContext) {
stageName: 'Java 17 Smoke', target: 'test-junit-17-smoke-jenkins', javaVersion: 17, timeoutValue: 40,
component: pipelineContext.getBuildConfig().COMPONENT_JAVA
],
[
stageName: 'Java 21 Smoke', target: 'test-junit-21-smoke-jenkins', javaVersion: 21, timeoutValue: 40,
component: pipelineContext.getBuildConfig().COMPONENT_JAVA
],
[
stageName: 'Java 11 JUnit', target: 'test-junit-11-jenkins', pythonVersion: '3.6', javaVersion: 11,
timeoutValue: 400, component: pipelineContext.getBuildConfig().COMPONENT_JAVA,
Expand Down

0 comments on commit 288adb1

Please sign in to comment.