Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
16cca5479d | |||
7b469c48c4 | |||
2506d21b74 | |||
187f735c38 | |||
48576e577e | |||
fa01820a3b | |||
62808131e1 | |||
ddbbc2fff5 | |||
4fba831118 | |||
11556068a2 | |||
ec303d3bdf | |||
1c449b9ad2 | |||
3e3d8c490f | |||
72dec17e4f | |||
e8f1c8b5ca | |||
05b9e395e1 |
@ -66,11 +66,13 @@ Currently, the following distributions are supported:
|
||||
|
||||
**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/).
|
||||
|
||||
**NOTE:** For Zulu OpenJDK architectures x64 and arm64 are mapped to x86 / arm with proper hw_bitness.
|
||||
|
||||
### Caching packages dependencies
|
||||
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:
|
||||
- gradle: `**/*.gradle*`, `**/gradle-wrapper.properties`
|
||||
- maven: `**/pom.xml`
|
||||
- sbt: `**/build.sbt`
|
||||
- sbt: all sbt build definition files `**/*.sbt`, `**/project/build.properties`, `**/project/**.{scala,sbt}`
|
||||
|
||||
The workflow output `cache-hit` is set to indicate if an exact match was found for the key [as actions/cache does](https://github.com/actions/cache/tree/main#outputs).
|
||||
|
||||
|
@ -14,10 +14,15 @@ describe('findPackageForDownload', () => {
|
||||
|
||||
it.each([
|
||||
[
|
||||
'17.x',
|
||||
'17.0.1',
|
||||
'17.0.1',
|
||||
'https://aka.ms/download-jdk/microsoft-jdk-17.0.1.12.1-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
|
||||
],
|
||||
[
|
||||
'17.x',
|
||||
'17.0.3',
|
||||
'https://aka.ms/download-jdk/microsoft-jdk-17.0.3-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
|
||||
],
|
||||
[
|
||||
'16.0.x',
|
||||
'16.0.2',
|
||||
@ -27,6 +32,11 @@ describe('findPackageForDownload', () => {
|
||||
'11.0.13',
|
||||
'11.0.13',
|
||||
'https://aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
|
||||
],
|
||||
[
|
||||
'11.0.15',
|
||||
'11.0.15',
|
||||
'https://aka.ms/download-jdk/microsoft-jdk-11.0.15-{{OS_TYPE}}-x64.{{ARCHIVE_TYPE}}'
|
||||
]
|
||||
])('version is %s -> %s', async (input, expectedVersion, expectedUrl) => {
|
||||
const result = await distribution['findPackageForDownload'](input);
|
||||
|
@ -52,6 +52,14 @@ describe('getAvailableVersions', () => {
|
||||
[
|
||||
{ version: '8', architecture: 'x64', packageType: 'jre+fx', checkLatest: false },
|
||||
'?os=macos&ext=tar.gz&bundle_type=jre&javafx=true&arch=x86&hw_bitness=64&release_status=ga&features=fx'
|
||||
],
|
||||
[
|
||||
{ version: '11', architecture: 'arm64', packageType: 'jdk', checkLatest: false },
|
||||
'?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=64&release_status=ga'
|
||||
],
|
||||
[
|
||||
{ version: '11', architecture: 'arm', packageType: 'jdk', checkLatest: false },
|
||||
'?os=macos&ext=tar.gz&bundle_type=jdk&javafx=false&arch=arm&hw_bitness=&release_status=ga'
|
||||
]
|
||||
])('build correct url for %s -> %s', async (input, parsedUrl) => {
|
||||
const distribution = new ZuluDistribution(input);
|
||||
|
@ -54,7 +54,7 @@ inputs:
|
||||
$GPG_PASSPHRASE.'
|
||||
required: false
|
||||
cache:
|
||||
description: 'Name of the build platform to cache dependencies. It can be "maven" or "gradle".'
|
||||
description: 'Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".'
|
||||
required: false
|
||||
job-status:
|
||||
description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting'
|
||||
|
6
dist/cleanup/index.js
vendored
6
dist/cleanup/index.js
vendored
@ -65448,7 +65448,11 @@ const supportedPackageManager = [
|
||||
path: [
|
||||
path_1.join(os_1.default.homedir(), '.ivy2', 'cache'),
|
||||
path_1.join(os_1.default.homedir(), '.sbt'),
|
||||
getCoursierCachePath()
|
||||
getCoursierCachePath(),
|
||||
// Some files should not be cached to avoid resolution problems.
|
||||
// In particular the resolution of snapshots (ideological gap between maven/ivy).
|
||||
'!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'),
|
||||
'!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties')
|
||||
],
|
||||
pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}']
|
||||
}
|
||||
|
15
dist/setup/index.js
vendored
15
dist/setup/index.js
vendored
@ -100653,7 +100653,11 @@ const supportedPackageManager = [
|
||||
path: [
|
||||
path_1.join(os_1.default.homedir(), '.ivy2', 'cache'),
|
||||
path_1.join(os_1.default.homedir(), '.sbt'),
|
||||
getCoursierCachePath()
|
||||
getCoursierCachePath(),
|
||||
// Some files should not be cached to avoid resolution problems.
|
||||
// In particular the resolution of snapshots (ideological gap between maven/ivy).
|
||||
'!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'),
|
||||
'!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties')
|
||||
],
|
||||
pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}']
|
||||
}
|
||||
@ -101717,11 +101721,17 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
|
||||
// TODO get these dynamically!
|
||||
// We will need Microsoft to add an endpoint where we can query for versions.
|
||||
const jdkVersions = [
|
||||
{
|
||||
version: [17, 0, 3]
|
||||
},
|
||||
{
|
||||
version: [17, 0, 1, 12, 1]
|
||||
},
|
||||
{
|
||||
version: [16, 0, 2, 7, 1]
|
||||
},
|
||||
{
|
||||
version: [11, 0, 15]
|
||||
}
|
||||
];
|
||||
// M1 is only supported for Java 16 & 17
|
||||
@ -102070,6 +102080,9 @@ class ZuluDistribution extends base_installer_1.JavaBase {
|
||||
else if (this.architecture == 'x86') {
|
||||
return { arch: 'x86', hw_bitness: '32', abi: '' };
|
||||
}
|
||||
else if (this.architecture == 'arm64') {
|
||||
return { arch: 'arm', hw_bitness: '64', abi: '' };
|
||||
}
|
||||
else {
|
||||
return { arch: this.architecture, hw_bitness: '', abi: '' };
|
||||
}
|
||||
|
@ -38,7 +38,11 @@ const supportedPackageManager: PackageManager[] = [
|
||||
path: [
|
||||
join(os.homedir(), '.ivy2', 'cache'),
|
||||
join(os.homedir(), '.sbt'),
|
||||
getCoursierCachePath()
|
||||
getCoursierCachePath(),
|
||||
// Some files should not be cached to avoid resolution problems.
|
||||
// In particular the resolution of snapshots (ideological gap between maven/ivy).
|
||||
'!' + join(os.homedir(), '.sbt', '*.lock'),
|
||||
'!' + join(os.homedir(), '**', 'ivydata-*.properties')
|
||||
],
|
||||
pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}']
|
||||
}
|
||||
|
@ -80,11 +80,17 @@ export class MicrosoftDistributions extends JavaBase {
|
||||
// TODO get these dynamically!
|
||||
// We will need Microsoft to add an endpoint where we can query for versions.
|
||||
const jdkVersions = [
|
||||
{
|
||||
version: [17, 0, 3]
|
||||
},
|
||||
{
|
||||
version: [17, 0, 1, 12, 1]
|
||||
},
|
||||
{
|
||||
version: [16, 0, 2, 7, 1]
|
||||
},
|
||||
{
|
||||
version: [11, 0, 15]
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -133,6 +133,8 @@ export class ZuluDistribution extends JavaBase {
|
||||
return { arch: 'x86', hw_bitness: '64', abi: '' };
|
||||
} else if (this.architecture == 'x86') {
|
||||
return { arch: 'x86', hw_bitness: '32', abi: '' };
|
||||
} else if (this.architecture == 'arm64') {
|
||||
return { arch: 'arm', hw_bitness: '64', abi: '' };
|
||||
} else {
|
||||
return { arch: this.architecture, hw_bitness: '', abi: '' };
|
||||
}
|
||||
|
Reference in New Issue
Block a user