oneclick / rubyinstaller2

MSYS2 based RubyInstaller for Windows
https://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
644 stars 248 forks source link

Add installer for windows-arm64 #362

Open pbo-linaro opened 7 months ago

pbo-linaro commented 7 months ago

Recently, this PR added Ruby support for windows-arm64: https://github.com/ruby/ruby/pull/8995 It fixes build and runtime issues.

Just after this, windows-arm64 MSYS2 ruby package was re-enabled thanks to this: https://github.com/msys2/MINGW-packages/pull/19179

Now, the missing piece for Ruby ecosystem is to create a windows-arm64 installer for RubyInstaller2.

What kind of work is expected to be done here? Is it simply a packaging of various MSYS2 packages?

Thanks, Pierrick

pbo-linaro commented 6 months ago

@mohits Sorry to ping you directly, but I noticed you were triaging some issues. Is there someone specifically we could add to this discussion?

mohits commented 6 months ago

Hi @pbo-linaro - I think most of the hard work is done by @larskanis and @MSP-Greg when it comes to handling the root causes of the problems.

I'm not fully plugged in to how the RubyInstaller2 is set up or built, but help out with some triage, and follow-up questions and answers since I do want to help the #RubyOnWindows community if I can. That way, I can keep reducing the open issues or get some help across so that the others can focus on the hard work :)

I'm not an official team member but I was given the rights to close issues a few months back.

MSP-Greg commented 6 months ago

Similar to the problem of how to provide non-Intel macOS builds for CI, windows-arm64 systems are not available on GitHub Actions.

I haven't looked around to see if any CI providers have them.

pbo-linaro commented 6 months ago

Thanks for your answers. Would you be open to use a self-hosted runner to fill this gap, or do you rely only on GitHub runners for now?

johnnyshields commented 1 month ago

@MSP-Greg @larskanis if the lack of a Github Actions runner is the limiting factor here, my team at TableCheck is happy to contribute a self-hosted Windows ARM runner until such time that Github officially supports it.

MSP-Greg commented 1 month ago

Just want to clarify one issue. The setup-ruby action used with GitHub Actions has a system that provides build tools and/or packages when using Windows Rubies. That system currently won't function on arm64.

This was done for two main reasons.

First of all, many repos run CI on Windows, but the maintainers are not familiar with Windows at the level needed to set up the required build system. Currently, the code selects whether to install MINGW, UCRT, or mswin tools/packages, and also selects a proper OpenSSL package. Note that the build systems are preinstalled on the Ubuntu & macOS runners.

Secondly, because setup-ruby handles bundle install and also caching of the bundled gems, the build tools need to be installed before bundle install is run. Build tools are required for any extension gems that are not pre-compiled.

So, although adding arm64 builds to RubyInstaller2 is worthwhile, there will need to be changes to use those builds with GitHub Actions, regardless of whether the runners are self-hosted or not...

johnnyshields commented 1 month ago

@MSP-Greg in light of this comment, who should be adding support for Windows ARM first--Windows Installer (this repo) or setup-ruby?

eregon commented 1 month ago

RubyInstaller. setup-ruby never built Ruby itself on Windows. As @MSP-Greg mentioned indeed more work will be needed later in setup-ruby to get the toolchain working, but anyway RubyInstaller builds need to happen before.