Skip to content

Commit fbaef13

Browse files
committed
Add support for ubuntu-22.04-arm64 and ubuntu-24.04-arm64
1 parent f72249c commit fbaef13

File tree

4 files changed

+36
-3
lines changed

4 files changed

+36
-3
lines changed

.github/workflows/test.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, macos-15, windows-2019, windows-2022, windows-2025 ]
20+
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm, macos-13, macos-14, macos-15, windows-2019, windows-2022, windows-2025 ]
2121
ruby: [
2222
'1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', ruby-head,
2323
jruby, jruby-head,
@@ -54,6 +54,15 @@ jobs:
5454
- { os: macos-15, ruby: '2.3' }
5555
- { os: macos-15, ruby: '2.4' }
5656
- { os: macos-15, ruby: '2.5' }
57+
# These old Rubies fail to compile or segfault on Linux arm64
58+
- { os: ubuntu-22.04-arm, ruby: '1.9' }
59+
- { os: ubuntu-22.04-arm, ruby: '2.0' }
60+
- { os: ubuntu-22.04-arm, ruby: '2.1' }
61+
- { os: ubuntu-22.04-arm, ruby: '2.2' }
62+
- { os: ubuntu-24.04-arm, ruby: '1.9' }
63+
- { os: ubuntu-24.04-arm, ruby: '2.0' }
64+
- { os: ubuntu-24.04-arm, ruby: '2.1' }
65+
- { os: ubuntu-24.04-arm, ruby: '2.2' }
5766
# Windows (note: previews are not available on Windows)
5867
- { os: windows-2019, ruby: '1.9' }
5968
- { os: windows-2022, ruby: '1.9' }

common.js

+2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ export async function hashFile(file) {
165165
const GitHubHostedPlatforms = [
166166
'ubuntu-20.04-x64',
167167
'ubuntu-22.04-x64',
168+
'ubuntu-22.04-arm64',
168169
'ubuntu-24.04-x64',
170+
'ubuntu-24.04-arm64',
169171
'windows-2019-x64',
170172
'windows-2022-x64',
171173
'windows-2025-x64',

dist/index.js

+13-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ruby-builder.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
9191
}
9292

9393
function getDownloadURL(platform, engine, version) {
94-
let builderPlatform = platform
94+
let builderPlatform = null
9595
if (platform.startsWith('windows-') && os.arch() === 'x64') {
9696
builderPlatform = 'windows-latest'
9797
} else if (platform.startsWith('macos-')) {
@@ -100,6 +100,16 @@ function getDownloadURL(platform, engine, version) {
100100
} else if (os.arch() === 'arm64') {
101101
builderPlatform = 'macos-13-arm64'
102102
}
103+
} else if (platform.startsWith('ubuntu-')) {
104+
if (os.arch() === 'x64') {
105+
builderPlatform = platform
106+
} else if (os.arch() === 'arm64') {
107+
builderPlatform = `${platform}-arm64`
108+
}
109+
}
110+
111+
if (builderPlatform === null) {
112+
throw new Error(`Unknown download URL for platform ${platform}`)
103113
}
104114

105115
if (common.isHeadVersion(version)) {

0 commit comments

Comments
 (0)