From df516ed63dc243873daa70fef311ffe518a94eca Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Wed, 17 Sep 2025 21:40:33 +0200 Subject: [PATCH] [Y-build] Move tests to targeted Java version Java-25 and drop second MacOS test configuration, but add Y-build tests on Windows. --- JenkinsJobs/Builds/build.jenkinsfile | 4 ++-- JenkinsJobs/YBuilds/Y_unit_tests.groovy | 23 ++++++++++++++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/JenkinsJobs/Builds/build.jenkinsfile b/JenkinsJobs/Builds/build.jenkinsfile index 36c9ca4900f..0d982b547d1 100644 --- a/JenkinsJobs/Builds/build.jenkinsfile +++ b/JenkinsJobs/Builds/build.jenkinsfile @@ -9,8 +9,8 @@ def I_TEST_CONFIGURATIONS = [ def Y_TEST_CONFIGURATIONS = [ [ os: 'linux' , ws: 'gtk' , arch: 'x86_64' , javaVersion: 21], [ os: 'linux' , ws: 'gtk' , arch: 'x86_64' , javaVersion: 25], - [ os: 'macosx', ws: 'cocoa', arch: 'aarch64', javaVersion: 21], - [ os: 'macosx', ws: 'cocoa', arch: 'x86_64' , javaVersion: 21], + [ os: 'macosx', ws: 'cocoa', arch: 'x86_64' , javaVersion: 25], + [ os: 'win32' , ws: 'win32', arch: 'x86_64' , javaVersion: 25], ] def BUILD = { def matcher = "$JOB_BASE_NAME" =~ '(?[IY])-build-(?\\d).(?\\d+)' diff --git a/JenkinsJobs/YBuilds/Y_unit_tests.groovy b/JenkinsJobs/YBuilds/Y_unit_tests.groovy index 47d2c528994..c6dd0137371 100644 --- a/JenkinsJobs/YBuilds/Y_unit_tests.groovy +++ b/JenkinsJobs/YBuilds/Y_unit_tests.groovy @@ -2,10 +2,9 @@ def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('Jenk def TEST_CONFIGURATIONS = [ [os: 'linux' , ws:'gtk' , arch: 'x86_64' , javaVersion: 21, agentLabel: 'ubuntu-2404' , javaHome: "tool(type:'jdk', name:'temurin-jdk21-latest')" ], - [os: 'linux' , ws:'gtk' , arch: 'x86_64' , javaVersion: 25, agentLabel: 'ubuntu-2404' , javaHome: "install('jdk', 'https://download.java.net/java/GA/jdk25/bd75d5f9689641da8e1daabeccb5528b/36/GPL/openjdk-25_linux-x64_bin.tar.gz')" ], - [os: 'macosx', ws:'cocoa', arch: 'aarch64', javaVersion: 21, agentLabel: 'nc1ht-macos11-arm64', javaHome: "'/Library/Java/JavaVirtualMachines/jdk-21.0.5+11-arm64/Contents/Home'" ], - [os: 'macosx', ws:'cocoa', arch: 'x86_64' , javaVersion: 21, agentLabel: 'nc1ht-macos11-arm64', javaHome: "'/Library/Java/JavaVirtualMachines/jdk-21.0.5+11/Contents/Home'" ], - [os: 'win32' , ws:'win32', arch: 'x86_64' , javaVersion: 21, agentLabel: 'qa6xd-win11' , javaHome: "'C:\\\\Program Files\\\\Eclipse Adoptium\\\\jdk-21.0.5.11-hotspot'" ], + [os: 'linux' , ws:'gtk' , arch: 'x86_64' , javaVersion: 25, agentLabel: 'ubuntu-2404' , javaHome: "tool(type:'jdk', name:'temurin-jdk25-latest')" ], + [os: 'macosx', ws:'cocoa', arch: 'aarch64', javaVersion: 25, agentLabel: 'nc1ht-macos11-arm64', javaHome: "installTemurinJDK('25', 'mac', 'x86_64', 'ea')" ], + [os: 'win32' , ws:'win32', arch: 'x86_64' , javaVersion: 25, agentLabel: 'qa6xd-win11' , javaHome: "installTemurinJDK('25', 'windows', 'x86_64', 'ea')" ], ] for (STREAM in config.Branches.keySet()){ @@ -130,14 +129,24 @@ def pathOf(String path){ def installTemurinJDK(String version, String os, String arch, String releaseType='ga') { // Translate os/arch names that are different in the Adoptium API if (arch == 'x86_64') { - arch == 'x64' + arch = 'x64' } - return install('jdk', "https://api.adoptium.net/v3/binary/latest/${version}/${releaseType}/${os}/${arch}/jdk/hotspot/normal/eclipse") + if (os == 'macosx') { + os = 'mac' + } else if (os == 'win32') { + os = 'windows' + } + return install('jdk', "https://api.adoptium.net/v3/binary/latest/${version}/${releaseType}/${os}/${arch}/jdk/hotspot/normal/eclipse") + (os == 'mac' ? '/Contents/Home' : '') } def install(String toolType, String url) { dir("${WORKSPACE}/tools/${toolType}") { - sh "curl -L ${url} | tar -xzf -" + def script = "curl -L ${url} | tar -xzf -" + if (isUnix()) { + sh script + } else { // Windows 10 and later has a tar.exe that can handle zip files (even read from std-in) + bat script + } return "${pwd()}/" + sh(script: 'ls', returnStdout: true).strip() } }