Skip to content

Commit 6280813

Browse files
Merge pull request actions#339 from starburstdata/pp/fix-arm64-architecture
Fix support for Zulu arm64 architecture
2 parents ddbbc2f + 1c449b9 commit 6280813

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ Currently, the following distributions are supported:
6666

6767
**NOTE:** Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` to `temurin` to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/).
6868

69+
**NOTE:** For Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness.
70+
6971
### Caching packages dependencies
7072
The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle, maven and sbt. The format of the used cache key is `setup-java-${{ platform }}-${{ packageManager }}-${{ fileHash }}`, where the hash is based on the following files:
7173
- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`

__tests__/distributors/zulu-installer.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ describe('getAvailableVersions', () => {
5252
[
5353
{ version: '8', architecture: 'x64', packageType: 'jre+fx', checkLatest: false },
5454
'?os=macos&ext=tar.gz&bundle_type=jre&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
55+
],
56+
[
57+
{ version: '11', architecture: 'arm64', packageType: 'jdk', checkLatest: false },
58+
'?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=64&release_status=ga'
59+
],
60+
[
61+
{ version: '11', architecture: 'arm', packageType: 'jdk', checkLatest: false },
62+
'?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=&release_status=ga'
5563
]
5664
])('build correct url for %s -> %s', async (input, parsedUrl) => {
5765
const distribution = new ZuluDistribution(input);

dist/setup/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102076,6 +102076,9 @@ class ZuluDistribution extends base_installer_1.JavaBase {
102076102076
else if (this.architecture == 'x86') {
102077102077
return { arch: 'x86', hw_bitness: '32', abi: '' };
102078102078
}
102079+
else if (this.architecture == 'arm64') {
102080+
return { arch: 'arm', hw_bitness: '64', abi: '' };
102081+
}
102079102082
else {
102080102083
return { arch: this.architecture, hw_bitness: '', abi: '' };
102081102084
}

src/distributions/zulu/installer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ export class ZuluDistribution extends JavaBase {
133133
return { arch: 'x86', hw_bitness: '64', abi: '' };
134134
} else if (this.architecture == 'x86') {
135135
return { arch: 'x86', hw_bitness: '32', abi: '' };
136+
} else if (this.architecture == 'arm64') {
137+
return { arch: 'arm', hw_bitness: '64', abi: '' };
136138
} else {
137139
return { arch: this.architecture, hw_bitness: '', abi: '' };
138140
}

0 commit comments

Comments
 (0)