Skip to content

Commit 39d80c6

Browse files
committed
Fix support for GraalVM 25.3.4.1
1 parent 5298d94 commit 39d80c6

6 files changed

Lines changed: 20 additions & 19 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
strategy:
4545
matrix:
4646
version: [
47-
'25.1',
48-
'25i1', # innovation release
49-
'25.1.3', # full version
47+
'25.3',
48+
'25i3', # innovation release
49+
'25.3.4.1', # full version
5050
'25.0' # LTS release
5151
]
5252
distribution: ['graalvm', 'graalvm-community']

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/checkout@v6
3030
- uses: graalvm/setup-graalvm@v1
3131
with:
32-
version: '25.1' # or '25.0' for LTS; See 'Options' for more details
32+
version: '25.3' # or '25.0' for LTS; See 'Options' for more details
3333
distribution: 'graalvm' # See 'Supported distributions' for available options
3434
github-token: ${{ secrets.GITHUB_TOKEN }}
3535
- name: Example step
@@ -92,7 +92,7 @@ jobs:
9292
- uses: actions/checkout@v6
9393
- uses: graalvm/setup-graalvm@v1
9494
with:
95-
version: '25.1'
95+
version: '25.3'
9696
distribution: 'graalvm'
9797
github-token: ${{ secrets.GITHUB_TOKEN }}
9898
```

‎__tests__/gds.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ afterAll(() => {
2828
test('fetch artifacts', async () => {
2929
let artifact
3030
// Test innovation releases
31-
for (const version of ['25.1', '25.1.3']) {
31+
for (const version of ['25.3', '25.3.4.1']) {
3232
artifact = await fetchArtifact(TEST_USER_AGENT, version, '25')
33-
expect(artifact.id).toBe('FE09EC0A4D9244CA834F1777BCA30041')
34-
expect(artifact.checksum).toBe('efcb8984be5f72ecf8615641bec720c825a6889957f0b98d95123f563ff77c86')
33+
expect(artifact.id).toBe('47B3692F0EC54D22A1DAC450AD7225D1')
34+
expect(artifact.checksum).toBe('814deac144a912035c4e824e05fa06a2e0c83821f0fb9d1084bc916e5eeef247')
3535
}
3636
// Test 25 LTS
3737
artifact = await fetchArtifact(TEST_USER_AGENT, '25.0', '25')

‎__tests__/graalvm.test.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ test('request invalid version/javaVersion', async () => {
3232
}
3333
})
3434

35+
test('find innovation release', async () => {
36+
const ghRelease = await graalvm.getGraalVMCEGitHubRelease('25.3.4.1')
37+
expect(ghRelease.tag_name).toBe('graal-25.3.4.1')
38+
expect(ghRelease.assets.length).toBe(8)
39+
for (const asset of ghRelease.assets) {
40+
expect(asset.name.includes('-25i3-')).toBe(true)
41+
}
42+
})
43+
3544
test('find version/javaVersion', async () => {
3645
// Make sure the action can find the latest Java version for known major versions
3746
for (const majorJavaVersion of ['17', '20']) {

‎dist/main.js‎

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/graalvm.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function setUpGraalVMJDKCE(graalVMVersionOrDev: string, javaVersion
7272
return downloadExtractAndCacheJDK(downloader, toolName, graalVMVersion)
7373
}
7474

75-
async function getGraalVMCEGitHubRelease(graalVMVersion: string): Promise<c.LatestReleaseResponseData> {
75+
export async function getGraalVMCEGitHubRelease(graalVMVersion: string): Promise<c.LatestReleaseResponseData> {
7676
const releaseTag = await findReleaseTag(graalVMVersion)
7777
return await getTaggedRelease(c.GRAALVM_GH_USER, c.GRAALVM_RELEASES_REPO, releaseTag)
7878
}
@@ -102,11 +102,7 @@ export async function findLatestGraalVMCEVersion(graalVMVersion: string, tagPref
102102
const versionNumberStartIndex = `refs/tags/${tagPrefix}`.length
103103
for (const matchingRef of matchingRefs) {
104104
const currentVersion = matchingRef.ref.substring(versionNumberStartIndex)
105-
if (!semver.valid(currentVersion)) {
106-
core.warning(`Skipping unexpected GraalVM CE release ${currentVersion}. ${c.ERROR_REQUEST}`)
107-
continue
108-
}
109-
if (semver.gt(currentVersion, highestVersion)) {
105+
if (semver.gt(semver.coerce(currentVersion) || lowestNonExistingVersion, highestVersion)) {
110106
highestVersion = currentVersion
111107
}
112108
}

0 commit comments

Comments
 (0)