Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dffc446

Browse filesBrowse files
ntkmeeregon
authored andcommitted
Support windows-11-arm
1 parent 2e00740 commit dffc446
Copy full SHA for dffc446

File tree

Expand file treeCollapse file tree

8 files changed

+361
-134
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+361
-134
lines changed

‎.github/workflows/test.yml

Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+22-4Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [ 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 ]
20+
os: [ 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, windows-11-arm ]
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,
@@ -64,25 +64,43 @@ jobs:
6464
- { os: ubuntu-24.04-arm, ruby: '2.0' }
6565
- { os: ubuntu-24.04-arm, ruby: '2.1' }
6666
- { os: ubuntu-24.04-arm, ruby: '2.2' }
67+
# RubyInstaller windows-arm64 builds only exist for Ruby 3.4+
68+
- { os: windows-11-arm, ruby: '1.9' }
69+
- { os: windows-11-arm, ruby: '2.0' }
70+
- { os: windows-11-arm, ruby: '2.1' }
71+
- { os: windows-11-arm, ruby: '2.2' }
72+
- { os: windows-11-arm, ruby: '2.3' }
73+
- { os: windows-11-arm, ruby: '2.4' }
74+
- { os: windows-11-arm, ruby: '2.5' }
75+
- { os: windows-11-arm, ruby: '2.6' }
76+
- { os: windows-11-arm, ruby: '2.7' }
77+
- { os: windows-11-arm, ruby: '3.0' }
78+
- { os: windows-11-arm, ruby: '3.1' }
79+
- { os: windows-11-arm, ruby: '3.2' }
80+
- { os: windows-11-arm, ruby: '3.3' }
81+
# https://github.com/ruby/jruby-dev-builder/pull/14#issuecomment-2829841247
82+
- { os: windows-11-arm, ruby: jruby }
83+
- { os: windows-11-arm, ruby: jruby-head }
6784
# Windows (note: previews are not available on Windows)
6885
- { os: windows-2019, ruby: '1.9' }
6986
- { os: windows-2022, ruby: '1.9' }
7087
- { os: windows-2025, ruby: '1.9' }
71-
- { os: windows-2019, ruby: debug }
72-
- { os: windows-2022, ruby: debug }
73-
- { os: windows-2025, ruby: debug }
7488
- { os: windows-2019, ruby: truffleruby }
7589
- { os: windows-2022, ruby: truffleruby }
7690
- { os: windows-2025, ruby: truffleruby }
91+
- { os: windows-11-arm, ruby: truffleruby }
7792
- { os: windows-2019, ruby: truffleruby-head }
7893
- { os: windows-2022, ruby: truffleruby-head }
7994
- { os: windows-2025, ruby: truffleruby-head }
95+
- { os: windows-11-arm, ruby: truffleruby-head }
8096
- { os: windows-2019, ruby: truffleruby+graalvm }
8197
- { os: windows-2022, ruby: truffleruby+graalvm }
8298
- { os: windows-2025, ruby: truffleruby+graalvm }
99+
- { os: windows-11-arm, ruby: truffleruby+graalvm }
83100
- { os: windows-2019, ruby: truffleruby+graalvm-head }
84101
- { os: windows-2022, ruby: truffleruby+graalvm-head }
85102
- { os: windows-2025, ruby: truffleruby+graalvm-head }
103+
- { os: windows-11-arm, ruby: truffleruby+graalvm-head }
86104

87105
name: ${{ matrix.os }} ${{ matrix.ruby }}
88106
runs-on: ${{ matrix.os }}

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The action works on these [GitHub-hosted runners](https://docs.github.com/en/act
5151
| ---------------- | --------- |
5252
| Ubuntu | `ubuntu-22.04`, `ubuntu-24.04`, `ubuntu-22.04-arm`, `ubuntu-24.04-arm` |
5353
| macOS | `macos-13` and newer versions |
54-
| Windows | `windows-2019`, `windows-2022` |
54+
| Windows | `windows-2019`, `windows-2022`, `windows-2025`, `windows-11-arm` |
5555

5656
Not all combinations of runner images and versions are supported.
5757
The list of available Ruby versions can be seen in [ruby-builder-versions.json](ruby-builder-versions.json) for Ubuntu and macOS

‎common.js

Copy file name to clipboardExpand all lines: common.js
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ const GitHubHostedPlatforms = [
178178
'windows-2019-x64',
179179
'windows-2022-x64',
180180
'windows-2025-x64',
181+
'windows-11-arm64'
181182
]
182183

183184
// Precisely: whether we have builds for that platform and there are GitHub-hosted runners to test it
@@ -270,7 +271,7 @@ export function getOSNameVersionArch() {
270271

271272
function findWindowsVersion() {
272273
const version = os.version()
273-
const match = version.match(/^Windows Server (\d+) Datacenter/)
274+
const match = version.match(/^Windows(?: Server)? (\d+) (?:Datacenter|Enterprise)/)
274275
if (match) {
275276
return match[1]
276277
} else {
@@ -386,7 +387,9 @@ export function setupPath(newPathEntries) {
386387
const windowsToolchain = core.getInput('windows-toolchain')
387388
if (windows && windowsToolchain !== 'none') {
388389
// main Ruby dll determines whether mingw or ucrt build
389-
msys2Type = rubyIsUCRT(newPathEntries[0]) ? 'ucrt64' : 'mingw64'
390+
msys2Type = os.arch() === 'arm64'
391+
? 'clangarm64'
392+
: rubyIsUCRT(newPathEntries[0]) ? 'ucrt64' : 'mingw64'
390393

391394
// add MSYS2 in path for all Rubies on Windows, as it provides a better bash shell and a native toolchain
392395
const msys2 = [`C:\\msys64\\${msys2Type}\\bin`, 'C:\\msys64\\usr\\bin']

‎dist/index.js

Copy file name to clipboardExpand all lines: dist/index.js
+28-17Lines changed: 28 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎generate-windows-versions.rb

Copy file name to clipboardExpand all lines: generate-windows-versions.rb
+27-12Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,40 @@
99

1010
versions = entries.select { |entry|
1111
entry[:filetype] == 'rubyinstaller7z' and
12-
entry[:name].include?('(x64)')
12+
entry[:name].include?('(x64)') || entry[:name].include?('(arm)')
1313
}.group_by { |entry|
1414
entry[:name][/Ruby (\d+\.\d+\.\d+)/, 1]
15-
}.map { |version, builds|
16-
unless builds.sort_by { |build| build[:name] } == builds.reverse
17-
raise "not sorted as expected for #{version}"
18-
end
19-
[version, builds.first]
15+
}.map { |version, builds_by_version|
16+
builds = builds_by_version.group_by { |entry|
17+
entry[:name][/\((x64|arm)\)/, 1]
18+
}.map { |arch, builds_by_arch|
19+
arch = 'arm64' if arch == 'arm'
20+
unless builds_by_arch.sort_by { |build| build[:name] } == builds_by_arch.reverse
21+
raise "not sorted as expected for #{version}"
22+
end
23+
[arch, builds_by_arch.first[:href]]
24+
}.sort_by { |arch, builds|
25+
arch
26+
}.to_h
27+
[version, builds]
2028
}.sort_by { |version, entry|
2129
Gem::Version.new(version)
2230
}.select { |version, entry|
2331
min_requirements.any? { |req| req.satisfied_by?(Gem::Version.new(version)) }
24-
}.map { |version, entry|
25-
[version, entry[:href]]
2632
}.to_h
2733

28-
versions['head'] = 'https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-x64.7z'
29-
versions['mingw'] = 'https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mingw.7z'
30-
versions['mswin'] = 'https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mswin.7z'
31-
versions['ucrt'] = 'https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-ucrt.7z'
34+
versions['head'] = {
35+
'arm64': 'https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-arm.7z',
36+
'x64': 'https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-x64.7z'
37+
}
38+
versions['mingw'] = {
39+
'x64': 'https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mingw.7z'
40+
}
41+
versions['mswin'] = {
42+
'x64': 'https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-mswin.7z'
43+
}
44+
versions['ucrt'] = {
45+
'x64': 'https://github.com/MSP-Greg/ruby-loco/releases/download/ruby-master/ruby-ucrt.7z'
46+
}
3247

3348
File.binwrite 'windows-versions.json', "#{JSON.pretty_generate(versions)}\n"

‎ruby-builder.js

Copy file name to clipboardExpand all lines: ruby-builder.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,12 @@ async function downloadAndExtract(platform, engine, version, rubyPrefix) {
9797

9898
function getDownloadURL(platform, engine, version) {
9999
let builderPlatform = null
100-
if (platform.startsWith('windows-') && os.arch() === 'x64') {
101-
builderPlatform = 'windows-latest'
100+
if (platform.startsWith('windows-')) {
101+
if (os.arch() === 'x64') {
102+
builderPlatform = 'windows-latest'
103+
} else if (os.arch() === 'arm64') {
104+
builderPlatform = 'windows-arm64'
105+
}
102106
} else if (platform.startsWith('macos-')) {
103107
if (os.arch() === 'x64') {
104108
builderPlatform = 'macos-latest'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.