Skip to content

Commit

Permalink
jdk21
Browse files Browse the repository at this point in the history
(cherry picked from commit 1d4c0f7)
  • Loading branch information
krasinski committed Apr 17, 2024
1 parent c81bf08 commit 8179233
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 8 deletions.
5 changes: 3 additions & 2 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_linux-x64_bin.tar.gz"
}
}
stash name: 'docker-sources'
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_linux-x64_bin.tar.gz
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}, {18}, {19}, {20}, {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, 20, 19, 18, 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
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

0 comments on commit 8179233

Please sign in to comment.