19
19
MANDREL_VERSION : 10.9.8.7-dev
20
20
MX_PYTHON : python3
21
21
PYTHONIOENCODING : utf-8
22
+ TEMURIN_API_URL_LATEST : https://api.adoptium.net/v3/binary/latest/25/ea
23
+ # Use this to 'pin' to a specific JDK build. The respective
24
+ # release needs to exist.
25
+ # TEMURIN_PINNED_RELEASE: jdk-25%2B9-ea-beta
22
26
23
27
# The following aims to reduce CI CPU cycles by:
24
28
# 1. Cancelling any previous builds of this PR when pushing new changes to it
@@ -34,9 +38,29 @@ concurrency:
34
38
cancel-in-progress : ${{ github.event_name == 'pull_request' || github.repository != 'graalvm/mandrel-packaging' }}
35
39
36
40
jobs :
41
+ setup-env :
42
+ name : Set Temurin API URL
43
+ runs-on : ubuntu-latest
44
+ outputs :
45
+ api-url : ${{ steps.set-env.outputs.TEMURIN_API_URL }}
46
+ steps :
47
+ - name : Prepare
48
+ id : set-env
49
+ run : |
50
+ if [ "${TEMURIN_PINNED_RELEASE}_" == "_" ]; then
51
+ TEMURIN_API_URL="${TEMURIN_API_URL_LATEST}"
52
+ else
53
+ TEMURIN_API_URL="https://api.adoptium.net/v3/binary/version/${TEMURIN_PINNED_RELEASE}"
54
+ fi
55
+ echo "Setting TEMURIN_API_URL=${TEMURIN_API_URL}"
56
+ echo "TEMURIN_API_URL=${TEMURIN_API_URL}" >> "$GITHUB_OUTPUT"
57
+
37
58
build-and-test :
38
59
name : Linux Build and test ${{ matrix.mandrel-ref }} branch/tag
39
60
runs-on : ubuntu-latest
61
+ needs : setup-env
62
+ env :
63
+ TEMURIN_API_URL : ${{ needs.setup-env.outputs.api-url }}
40
64
strategy :
41
65
fail-fast : false
42
66
matrix :
68
92
${{ runner.os }}-${{ matrix.quarkus-name }}-maven-
69
93
- name : Get latest OpenJDK 25 with static libs
70
94
run : |
71
- curl -sL https://api.adoptium.net/v3/binary/latest/25/ea /linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
72
- curl -sL https://api.adoptium.net/v3/binary/latest/25/ea /linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
95
+ curl -sL ${TEMURIN_API_URL} /linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
96
+ curl -sL ${TEMURIN_API_URL} /linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
73
97
mkdir -p ${JAVA_HOME}
74
98
tar xf jdk.tar.gz -C ${JAVA_HOME} --strip-components=1
75
99
tar xf jdk-static-libs.tar.gz -C ${JAVA_HOME} --strip-components=1
@@ -142,6 +166,9 @@ jobs:
142
166
build-and-test-on-mac :
143
167
name : ${{ matrix.os }} Build and test ${{ matrix.mandrel-ref }} branch/tag
144
168
runs-on : ${{ matrix.os }}
169
+ needs : setup-env
170
+ env :
171
+ TEMURIN_API_URL : ${{ needs.setup-env.outputs.api-url }}
145
172
strategy :
146
173
fail-fast : false
147
174
matrix :
@@ -183,8 +210,8 @@ jobs:
183
210
env :
184
211
ARCH : ${{ steps.arch.outputs.ARCH }}
185
212
run : |
186
- curl -sL https://api.adoptium.net/v3/binary/latest/25/ea /mac/${ARCH}/jdk/hotspot/normal/eclipse -o jdk.tar.gz
187
- curl -sL https://api.adoptium.net/v3/binary/latest/25/ea /mac/${ARCH}/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
213
+ curl -sL ${TEMURIN_API_URL} /mac/${ARCH}/jdk/hotspot/normal/eclipse -o jdk.tar.gz
214
+ curl -sL ${TEMURIN_API_URL} /mac/${ARCH}/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
188
215
mkdir -p ${JAVA_HOME}
189
216
tar xf jdk.tar.gz -C ${JAVA_HOME} --strip-components=1
190
217
tar xf jdk-static-libs.tar.gz -C ${JAVA_HOME} --strip-components=1
@@ -265,6 +292,9 @@ jobs:
265
292
build-and-test-on-windows :
266
293
name : Windows Build and test ${{ matrix.mandrel-ref }} branch/tag
267
294
runs-on : windows-2022
295
+ needs : setup-env
296
+ env :
297
+ TEMURIN_API_URL : ${{ needs.setup-env.outputs.api-url }}
268
298
strategy :
269
299
fail-fast : false
270
300
matrix :
@@ -298,10 +328,10 @@ jobs:
298
328
- name : Get latest OpenJDK 25 with static libs
299
329
run : |
300
330
$wc = New-Object System.Net.WebClient
301
- $wc.DownloadFile("https://api.adoptium.net/v3/binary/latest/25/ea /windows/x64/jdk/hotspot/normal/eclipse", "$Env:temp\jdk.zip")
331
+ $wc.DownloadFile("$Env:TEMURIN_API_URL\ /windows/x64/jdk/hotspot/normal/eclipse", "$Env:temp\jdk.zip")
302
332
Expand-Archive "$Env:temp\jdk.zip" -DestinationPath "$Env:temp"
303
333
Move-Item -Path "$Env:temp\jdk-*" -Destination $Env:JAVA_HOME
304
- $wc.DownloadFile("https://api.adoptium.net/v3/binary/latest/25/ea /windows/x64/staticlibs/hotspot/normal/eclipse", "$Env:temp\jdk-staticlibs.zip")
334
+ $wc.DownloadFile("$Env:TEMURIN_API_URL\ /windows/x64/staticlibs/hotspot/normal/eclipse", "$Env:temp\jdk-staticlibs.zip")
305
335
Expand-Archive "$Env:temp\jdk-staticlibs.zip" -DestinationPath "$Env:temp"
306
336
Move-Item -Path "$Env:temp\jdk-*\lib\static" -Destination $Env:JAVA_HOME\lib\
307
337
Remove-Item -Recurse "$Env:temp\jdk-*"
@@ -392,6 +422,9 @@ jobs:
392
422
build-and-test-2-step :
393
423
name : 2-step Linux Build and test ${{ matrix.mandrel-ref }} branch/tag
394
424
runs-on : ubuntu-latest
425
+ needs : setup-env
426
+ env :
427
+ TEMURIN_API_URL : ${{ needs.setup-env.outputs.api-url }}
395
428
strategy :
396
429
fail-fast : false
397
430
matrix :
@@ -423,8 +456,8 @@ jobs:
423
456
${{ runner.os }}-${{ matrix.quarkus-name }}-maven-
424
457
- name : Get latest OpenJDK 25 with static libs
425
458
run : |
426
- curl -sL https://api.adoptium.net/v3/binary/latest/25/ea /linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
427
- curl -sL https://api.adoptium.net/v3/binary/latest/25/ea /linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
459
+ curl -sL ${TEMURIN_API_URL} /linux/x64/jdk/hotspot/normal/eclipse -o jdk.tar.gz
460
+ curl -sL ${TEMURIN_API_URL} /linux/x64/staticlibs/hotspot/normal/eclipse -o jdk-static-libs.tar.gz
428
461
mkdir -p ${JAVA_HOME}
429
462
tar xf jdk.tar.gz -C ${JAVA_HOME} --strip-components=1
430
463
tar xf jdk-static-libs.tar.gz -C ${JAVA_HOME} --strip-components=1
0 commit comments