Added Windows Arm64 Support for Windows Arm64 Runners

This commit is contained in:
mahabaleshwars 2024-02-08 17:31:08 +05:30
parent 7a445ee88d
commit ba9976ce09
4 changed files with 52 additions and 5 deletions

16
dist/setup/index.js vendored
View File

@ -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);

View File

@ -31,10 +31,19 @@ export class LibericaDistributions extends JavaBase {
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
const javaArchivePath = await tc.downloadTool(javaRelease.url);
let javaArchivePath = await tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
if (
process.platform === 'win32' &&
(this.architecture === 'arm64' || this.architecture === 'aarch64')
) {
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
javaArchivePath = javaArchivePathRenamed;
}
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);
const archiveName = fs.readdirSync(extractedJavaPath)[0];

View File

@ -33,6 +33,12 @@
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-21.0.0-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-21.0.0-windows-aarch64.zip"
}
]
},
@ -70,7 +76,13 @@
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-linux-aarch64.tar.gz"
}
},
{
"filename": "microsoft-jdk-17.0.7-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-17.0.7-windows-aarch64.zip"
},
]
},
{
@ -329,6 +341,12 @@
"arch": "aarch64",
"platform": "linux",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-linux-aarch64.tar.gz"
},
{
"filename": "microsoft-jdk-11.0.19-windows-aarch64.zip",
"arch": "aarch64",
"platform": "win32",
"download_url": "https://aka.ms/download-jdk/microsoft-jdk-11.0.19-windows-aarch64.zip"
}
]
},

View File

@ -76,10 +76,18 @@ export class ZuluDistribution extends JavaBase {
core.info(
`Downloading Java ${javaRelease.version} (${this.distribution}) from ${javaRelease.url} ...`
);
const javaArchivePath = await tc.downloadTool(javaRelease.url);
let javaArchivePath = await tc.downloadTool(javaRelease.url);
core.info(`Extracting Java archive...`);
const extension = getDownloadArchiveExtension();
if (
process.platform === 'win32' &&
(this.architecture === 'arm64' || this.architecture === 'aarch64')
) {
const javaArchivePathRenamed = `${javaArchivePath}.zip`;
await fs.renameSync(javaArchivePath, javaArchivePathRenamed);
javaArchivePath = javaArchivePathRenamed;
}
const extractedJavaPath = await extractJdkFile(javaArchivePath, extension);