Skip to content

Commit a4a378f

Browse files
authored
Pin Oracle GraalVM 17 benchmark (#31)
Resolve the generic Java 17 benchmark input to Oracle GraalVM 17.0.12, the final public archived release after Oracle retired the floating GraalVM 17 URL. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 47f3716d-fb60-42cb-86a5-a2268a322ed6
1 parent 6e695be commit a4a378f

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/jdk-cache.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
options:
2121
- corretto
2222
- dragonwell
23+
- graalvm
2324
- graalvm-community
2425
- jetbrains
2526
- kona
@@ -59,6 +60,10 @@ permissions:
5960
contents: read
6061

6162
env:
63+
# Oracle retired the floating GraalVM 17 URL after 17.0.12. Keep the
64+
# cross-distribution input at Java 17 while resolving that vendor to its last
65+
# publicly archived GraalVM 17 release.
66+
BENCHMARK_JAVA_VERSION: ${{ inputs.distribution == 'graalvm' && inputs.java-version == '17' && '17.0.12' || inputs.java-version }}
6267
# A cache segment download that fails leaves @actions/cache holding an armed
6368
# timer it never clears, so the action idles for the rest of this timeout after
6469
# its work is done (see actions/toolkit's promiseWithTimeout: the clearTimeout
@@ -141,7 +146,7 @@ jobs:
141146
uses: ./.setup-java
142147
with:
143148
distribution: ${{ inputs.distribution }}
144-
java-version: ${{ inputs.java-version }}
149+
java-version: ${{ env.BENCHMARK_JAVA_VERSION }}
145150
cache: maven
146151
cache-jdk: true
147152
cache-dependency-path: .jdk-cache-key
@@ -215,7 +220,7 @@ jobs:
215220
uses: ./.setup-java
216221
with:
217222
distribution: ${{ inputs.distribution }}
218-
java-version: ${{ inputs.java-version }}
223+
java-version: ${{ env.BENCHMARK_JAVA_VERSION }}
219224
cache: maven
220225
cache-jdk: false
221226
cache-read-only: true
@@ -235,7 +240,7 @@ jobs:
235240
uses: ./.setup-java
236241
with:
237242
distribution: ${{ inputs.distribution }}
238-
java-version: ${{ inputs.java-version }}
243+
java-version: ${{ env.BENCHMARK_JAVA_VERSION }}
239244
cache: maven
240245
cache-jdk: false
241246
cache-read-only: true
@@ -257,7 +262,7 @@ jobs:
257262
uses: ./.setup-java
258263
with:
259264
distribution: ${{ inputs.distribution }}
260-
java-version: ${{ inputs.java-version }}
265+
java-version: ${{ env.BENCHMARK_JAVA_VERSION }}
261266
cache: maven
262267
cache-jdk: true
263268
cache-read-only: true
@@ -279,7 +284,7 @@ jobs:
279284
uses: ./.setup-java
280285
with:
281286
distribution: ${{ inputs.distribution }}
282-
java-version: ${{ inputs.java-version }}
287+
java-version: ${{ env.BENCHMARK_JAVA_VERSION }}
283288
cache: maven
284289
cache-jdk: true
285290
cache-read-only: true
@@ -301,7 +306,7 @@ jobs:
301306
uses: ./.setup-java
302307
with:
303308
distribution: ${{ inputs.distribution }}
304-
java-version: ${{ inputs.java-version }}
309+
java-version: ${{ env.BENCHMARK_JAVA_VERSION }}
305310
cache: maven
306311
cache-jdk: false
307312
cache-read-only: true
@@ -339,7 +344,7 @@ jobs:
339344
GH_TOKEN: ${{ github.token }}
340345
SAMPLES: ${{ inputs.samples }}
341346
DISTRIBUTION: ${{ inputs.distribution }}
342-
JAVA_VERSION: ${{ inputs.java-version }}
347+
JAVA_VERSION: ${{ env.BENCHMARK_JAVA_VERSION }}
343348
SETUP_JAVA_REPOSITORY: ${{ inputs.setup-java-repository }}
344349
SETUP_JAVA_REF: ${{ inputs.setup-java-ref }}
345350
CLEANUP_CACHES: ${{ inputs.cleanup-caches }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ Each save runs in a local action at `.github/actions/cache-save-slot` rather tha
169169

170170
The **JDK cache** workflow measures the installed-JDK cache added on `actions/setup-java@main`. It compares `cache-jdk: false` against `cache-jdk: true`, defaulting to Azul Zulu 17, which is not preinstalled in the GitHub-hosted runner tool cache. Every public Java 17 Linux x64 distribution supported without credentials or license acceptance is available for comparison. Both arms use the same action ref, so the result isolates JDK caching instead of conflating it with implementation changes between commits.
171171

172+
Oracle retired GraalVM's floating Java 17 download after the licensing transition that followed 17.0.12. When the workflow receives its default `java-version: 17` with `distribution: graalvm`, it therefore pins the benchmark to the still-public `17.0.12` archive; every other distribution continues to resolve the Java 17 range normally.
173+
172174
A single seed job compiles Spring PetClinic to populate one Maven cache entry and one JDK cache entry. Every measurement runner then runs both arms in one job in ABBA order under `cache-read-only: true`. Both arms restore the same Maven entry — only the JDK entry differs between them, which is the effect under test.
173175

174176
Every seed and measured slot removes matching JDKs from `$RUNNER_TOOL_CACHE` first, deliberately measuring the not-preinstalled path and preventing a hosted-runner tool-cache hit from bypassing JDK cache restore logic. Select Temurin to test that same forced-miss path with a distribution normally preinstalled on hosted runners.

0 commit comments

Comments
 (0)