@@ -2,10 +2,9 @@ def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('Jenk
22
33def TEST_CONFIGURATIONS = [
44 [os : ' linux' , ws :' gtk' , arch : ' x86_64' , javaVersion : 21 , agentLabel : ' ubuntu-2404' , javaHome : " tool(type:'jdk', name:'temurin-jdk21-latest')" ],
5- [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')" ],
6- [os : ' macosx' , ws :' cocoa' , arch : ' aarch64' , javaVersion : 21 , agentLabel : ' nc1ht-macos11-arm64' , javaHome : " '/Library/Java/JavaVirtualMachines/jdk-21.0.5+11-arm64/Contents/Home'" ],
7- [os : ' macosx' , ws :' cocoa' , arch : ' x86_64' , javaVersion : 21 , agentLabel : ' nc1ht-macos11-arm64' , javaHome : " '/Library/Java/JavaVirtualMachines/jdk-21.0.5+11/Contents/Home'" ],
8- [os : ' win32' , ws :' win32' , arch : ' x86_64' , javaVersion : 21 , agentLabel : ' qa6xd-win11' , javaHome : " 'C:\\\\ Program Files\\\\ Eclipse Adoptium\\\\ jdk-21.0.5.11-hotspot'" ],
5+ [os : ' linux' , ws :' gtk' , arch : ' x86_64' , javaVersion : 25 , agentLabel : ' ubuntu-2404' , javaHome : " tool(type:'jdk', name:'temurin-jdk25-latest')" ],
6+ [os : ' macosx' , ws :' cocoa' , arch : ' aarch64' , javaVersion : 25 , agentLabel : ' nc1ht-macos11-arm64' , javaHome : " installTemurinJDK('25', 'mac', 'x86_64', 'ea')" ],
7+ [os : ' win32' , ws :' win32' , arch : ' x86_64' , javaVersion : 25 , agentLabel : ' qa6xd-win11' , javaHome : " installTemurinJDK('25', 'windows', 'x86_64', 'ea')" ],
98]
109
1110for (STREAM in config.Branches . keySet()){
@@ -130,14 +129,24 @@ def pathOf(String path){
130129def installTemurinJDK(String version, String os, String arch, String releaseType='ga') {
131130 // Translate os/arch names that are different in the Adoptium API
132131 if (arch == 'x86_64') {
133- arch == 'x64'
132+ arch = 'x64'
134133 }
135- return install('jdk', "https://api.adoptium.net/v3/binary/latest/${version}/${releaseType}/${os}/${arch}/jdk/hotspot/normal/eclipse")
134+ if (os == 'macosx') {
135+ os = 'mac'
136+ } else if (os == 'win32') {
137+ os = 'windows'
138+ }
139+ return install('jdk', "https://api.adoptium.net/v3/binary/latest/${version}/${releaseType}/${os}/${arch}/jdk/hotspot/normal/eclipse") + (os == 'mac' ? '/Contents/Home' : '')
136140}
137141
138142def install(String toolType, String url) {
139143 dir("${WORKSPACE}/tools/${toolType}") {
140- sh "curl -L ${url} | tar -xzf -"
144+ def script = "curl -L ${url} | tar -xzf -"
145+ if (isUnix()) {
146+ sh script
147+ } else { // Windows 10 and later has a tar.exe that can handle zip files (even read from std-in)
148+ bat script
149+ }
141150 return "${pwd()}/" + sh(script: 'ls', returnStdout: true).strip()
142151 }
143152}
0 commit comments