Skip to content

Commit 9180418

Browse files
committed
Add JRuby for Windows on Arm
1 parent 829114f commit 9180418

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

common.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,15 @@ export async function setupJavaHome(rubyPrefix) {
395395
console.log("JRuby failed to start, try Java 21 envs")
396396

397397
let arch = os.arch()
398-
if (arch === "x64" || os.platform() !== "darwin") {
398+
if (arch === "arm64" && os.platform() === "win32") {
399+
arch = "AARCH64"
400+
} else if (arch === "x64" || os.platform() !== "darwin") {
399401
arch = "X64"
400402
}
401403

404+
// JAVA_HOME_21_AARCH64 - https://github.com/actions/partner-runner-images/blob/main/images/arm-windows-11-image.md#java
405+
// JAVA_HOME_21_arm64 - https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md#java
406+
// JAVA_HOME_21_X64 - https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#java
402407
let newHomeVar = `JAVA_HOME_21_${arch}`
403408
let newHome = process.env[newHomeVar]
404409

dist/index.js

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)