mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Added Windows Arm64 Support for Windows Arm64 Runners
This commit is contained in:
parent
7a445ee88d
commit
ba9976ce09
4 changed files with 52 additions and 5 deletions
16
dist/setup/index.js
vendored
16
dist/setup/index.js
vendored
|
@ -123685,9 +123685,15 @@ class LibericaDistributions extends base_installer_1.JavaBase {
|
|||
downloadTool(javaRelease) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
core.info(`Extracting Java archive...`);
|
||||
const extension = (0, util_1.getDownloadArchiveExtension)();
|
||||
if (process.platform === 'win32' &&
|
||||
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||
yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||
javaArchivePath = javaArchivePathRenamed;
|
||||
}
|
||||
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
||||
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
||||
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
||||
|
@ -124635,9 +124641,15 @@ class ZuluDistribution extends base_installer_1.JavaBase {
|
|||
downloadTool(javaRelease) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info(`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`);
|
||||
const javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
let javaArchivePath = yield tc.downloadTool(javaRelease.url);
|
||||
core.info(`Extracting Java archive...`);
|
||||
const extension = (0, util_1.getDownloadArchiveExtension)();
|
||||
if (process.platform === 'win32' &&
|
||||
(this.architecture === 'arm64' || this.architecture === 'aarch64')) {
|
||||
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
|
||||
yield fs_1.default.renameSync(javaArchivePath, javaArchivePathRenamed);
|
||||
javaArchivePath = javaArchivePathRenamed;
|
||||
}
|
||||
const extractedJavaPath = yield (0, util_1.extractJdkFile)(javaArchivePath, extension);
|
||||
const archiveName = fs_1.default.readdirSync(extractedJavaPath)[0];
|
||||
const archivePath = path_1.default.join(extractedJavaPath, archiveName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue