Skip to content

Commit

Permalink
Add support for ubuntu-22.04-arm64 and ubuntu-24.04-arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jan 18, 2025
1 parent e6481e6 commit 91e6e89
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 2 additions & 0 deletions common.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ export async function hashFile(file) {
const GitHubHostedPlatforms = [
'ubuntu-20.04-x64',
'ubuntu-22.04-x64',
'ubuntu-22.04-arm64',
'ubuntu-24.04-x64',
'ubuntu-24.04-arm64',
'windows-2019-x64',
'windows-2022-x64',
'windows-2025-x64',
Expand Down
14 changes: 13 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion ruby-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
}

function getDownloadURL(platform, engine, version) {
let builderPlatform = platform
let builderPlatform = null
if (platform.startsWith('windows-') && os.arch() === 'x64') {
builderPlatform = 'windows-latest'
} else if (platform.startsWith('macos-')) {
Expand All @@ -100,6 +100,16 @@ function getDownloadURL(platform, engine, version) {
} else if (os.arch() === 'arm64') {
builderPlatform = 'macos-13-arm64'
}
} else if (platform.startsWith('ubuntu-')) {
if (os.arch() === 'x64') {
builderPlatform = platform
} else if (os.arch() === 'arm64') {
builderPlatform = `${platform}-arm64`
}
}

if (builderPlatform === null) {
throw new Error(`Unknown download URL for platform ${platform}`)
}

if (common.isHeadVersion(version)) {
Expand Down

0 comments on commit 91e6e89

Please sign in to comment.