From 6be33d3642037b4cd765fb718dde68ca3a9e52d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Wed, 22 May 2024 09:01:16 +0200 Subject: [PATCH] HSEARCH-5155 Build with JDK 21 Meaning use JDK 21 for building main artifacts; the baseline (JDK 11) will not change. --- .github/workflows/build.yml | 8 ++++---- Jenkinsfile | 7 +++---- ci/dependency-update/Jenkinsfile | 3 +-- ci/performance/elasticsearch/Jenkinsfile | 2 +- ci/performance/lucene/Jenkinsfile | 2 +- ci/release/Jenkinsfile | 2 +- integrationtest/performance/pom.xml | 8 -------- pom.xml | 2 +- 8 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f556c72bc35..1c0d5dbf279 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,10 +60,10 @@ jobs: matrix: os: - { - name: "Linux JDK 17", + name: "Linux JDK 21", runs-on: 'ubuntu-latest', java: { - version: 17 + version: 21 }, maven: { # Since we only start an Elasticsearch container on Linux we add the profile to enable container reuse here: @@ -74,10 +74,10 @@ jobs: # so we can't run Elasticsearch tests. # See https://github.com/actions/runner-images/issues/1143#issuecomment-972929995 - { - name: "Windows JDK 17", + name: "Windows JDK 21", runs-on: 'windows-latest', java: { - version: 17 + version: 21 }, maven: { args: '-Dtest.elasticsearch.skip=true' diff --git a/Jenkinsfile b/Jenkinsfile index 367fe22aa12..19dc08d7646 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -149,7 +149,7 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap * settingsId: ... */ -@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 17 Latest' +@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 21 Latest' @Field final String MAVEN_TOOL = 'Apache Maven 3.9' // Default node pattern, to be used for resource-intensive stages. @@ -191,14 +191,13 @@ stage('Configure') { new JdkBuildEnvironment(version: '11', testCompilerTool: 'OpenJDK 11 Latest', condition: TestCondition.AFTER_MERGE), new JdkBuildEnvironment(version: '17', testCompilerTool: 'OpenJDK 17 Latest', + condition: TestCondition.AFTER_MERGE), + new JdkBuildEnvironment(version: '21', testCompilerTool: 'OpenJDK 21 Latest', condition: TestCondition.BEFORE_MERGE, isDefault: true), // We want to enable preview features when testing newer builds of OpenJDK: // even if we don't use these features, just enabling them can cause side effects // and it's useful to test that. - new JdkBuildEnvironment(version: '21', testCompilerTool: 'OpenJDK 21 Latest', - testLauncherArgs: '--enable-preview', - condition: TestCondition.AFTER_MERGE), new JdkBuildEnvironment(version: '22', testCompilerTool: 'OpenJDK 22 Latest', testLauncherArgs: '--enable-preview', condition: TestCondition.AFTER_MERGE), diff --git a/ci/dependency-update/Jenkinsfile b/ci/dependency-update/Jenkinsfile index 72961d21c94..da8a470fb05 100644 --- a/ci/dependency-update/Jenkinsfile +++ b/ci/dependency-update/Jenkinsfile @@ -44,7 +44,6 @@ Map settings() { ] case 'lucene10': return [ - testCompilerTool: 'OpenJDK 21 Latest', updateProperties: ['version.org.apache.lucene'], onlyRunTestDependingOn: ['hibernate-search-backend-lucene'], additionalMavenArgs: '-Dtest.elasticsearch.skip=true -pl :hibernate-search-engine,:hibernate-search-backend-lucene,:hibernate-search-util-internal-integrationtest-backend-lucene,:hibernate-search-v5migrationhelper-engine' @@ -83,7 +82,7 @@ def pullContainerImages() { } def withMavenWorkspace(Closure body) { - def actualJdk = settings().testCompilerTool == null ? 'OpenJDK 17 Latest' : settings().testCompilerTool + def actualJdk = settings().testCompilerTool == null ? 'OpenJDK 21 Latest' : settings().testCompilerTool withMaven(jdk: actualJdk, maven: 'Apache Maven 3.9', mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository', options: [ diff --git a/ci/performance/elasticsearch/Jenkinsfile b/ci/performance/elasticsearch/Jenkinsfile index b90953bd6c0..f65cf64585d 100644 --- a/ci/performance/elasticsearch/Jenkinsfile +++ b/ci/performance/elasticsearch/Jenkinsfile @@ -14,7 +14,7 @@ import groovy.transform.Field import org.hibernate.jenkins.pipeline.helpers.job.JobHelper @Field final String MAVEN_TOOL = 'Apache Maven 3.9' -@Field final String JDK_TOOL = 'OpenJDK 11 Latest' +@Field final String JDK_TOOL = 'OpenJDK 21 Latest' // Performance node pattern, to be used for stages involving performance tests. @Field final String PERFORMANCE_NODE_PATTERN = 'Performance' diff --git a/ci/performance/lucene/Jenkinsfile b/ci/performance/lucene/Jenkinsfile index 65f37d4f742..f55d30d5506 100644 --- a/ci/performance/lucene/Jenkinsfile +++ b/ci/performance/lucene/Jenkinsfile @@ -14,7 +14,7 @@ import groovy.transform.Field import org.hibernate.jenkins.pipeline.helpers.job.JobHelper @Field final String MAVEN_TOOL = 'Apache Maven 3.9' -@Field final String JDK_TOOL = 'OpenJDK 11 Latest' +@Field final String JDK_TOOL = 'OpenJDK 21 Latest' // Performance node pattern, to be used for stages involving performance tests. @Field final String PERFORMANCE_NODE_PATTERN = 'Performance' diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index 3ca940791bd..f9a214362cf 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -15,7 +15,7 @@ pipeline { } tools { maven 'Apache Maven 3.9' - jdk 'OpenJDK 17 Latest' + jdk 'OpenJDK 21 Latest' } options { buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10') diff --git a/integrationtest/performance/pom.xml b/integrationtest/performance/pom.xml index 67069d91aaa..1ec573eaa53 100644 --- a/integrationtest/performance/pom.xml +++ b/integrationtest/performance/pom.xml @@ -12,14 +12,6 @@ Hibernate Search ITs - Performance - Parent POM Parent POM of Hibernate Search performance tests - - - 8 - ${java.home} - ${java-version.main.compiler.java_home}/bin/javac - - backend/base backend/lucene diff --git a/pom.xml b/pom.xml index 1967e2bc4f7..dc147bd9302 100644 --- a/pom.xml +++ b/pom.xml @@ -203,7 +203,7 @@ UTF-8 - 17 + 21 11