-
Notifications
You must be signed in to change notification settings - Fork 1
Integration with use-ruby #1
Comments
cc @larskanis you might be interested in this. |
I need to take a good look at what you've done. I looked earlier, but just a quick glance... I set this up to work with Ruby 2.3 (RubyInstaller), the latest releases of Ruby 2.4 thru 2.6 (RubyInstaller2), and ruby-loco. I do a bit of work with extension gems, in particular, CI on Windows, so I set this up mostly for that purpose. But, normal (Ruby only) gems don't need that. One question I've wondered about is what versions of Ruby should be supported, both major/minor and within major/minor. RubyInstaller2 (@larskanis) has all the versions from 2.4 forward. If this work goes public, I'm sure someone will want to test against 2.6.3, or 2.5.5, etc. That wasn't available on AppVeyor, but I believe it is on Travis (?) |
On https://rubyinstaller.org/downloads/ I see there are packaged versions together with the DevKit. However I only see |
You can download the 7x files, there are three MSYS2 installs on Actions, one in each Windows Ruby. I symlink to one in the code here... |
Thanks, I found Lines 14 to 16 in 50b691d
But I guess that will break when GitHub updates Ruby 2.6 to 2.6.5 in the toolcache. We could probably take the last entry of C:\hostedtoolcache\windows\Ruby though.
It might be better to not rely on the toolcache if possible, as it often changes. Maybe we can run the installer in very silent mode, including |
Re Windows, there have been users (other than Ruby users) who have asked for an MSYS2 install, I also asked for one. I don't really know the best place to ask, and also whether they'll confirm anything.
Actually, I don't believe it has been updated since the beta started. That's part of the reason all of this has happened. |
actions/runner-images#30 seems the best issue I found so far regarding adding MSYS2 in the base image. |
Almost 4 months ago: |
I didn't work with Github Actions so far. But install of the RubyInstaller exe files is pretty easy. There is also a daily build of RubyInstaller-head available with ruby-master and up-to-date MSYS2: https://github.com/oneclick/rubyinstaller2/releases/tag/rubyinstaller-head |
I tried a few approaches in https://github.com/eregon/ruby-install-builder/actions on branch I tried repackaging the installed Ruby+DevKit, and that gives a 300MB .tar.gz, which is kind of large. The PATH in GitHub Actions seems quite messy and I think in the end I'll use an approach very similar to this action. @MSP-Greg is certainly more experienced than I am with Windows. |
First of all, thank you for your work on this. I've been using MSYS2 for a few years, also for building packages. I tried various ways to install it, and especially for a 'pure ruby' gem/repo, the time was just too long. From my perspective, I've seen many issues raised since the Actions beta started, and with few exceptions, very few actions were taken to fix the issues. When the CI doesn't even work with So, I'm waiting to see what happens. If they start making changes and moving things into GH repos, all the better. Otherwise, we need to think about how best to do it ourselves. The main thing I'm wondering about is support for versions other than 'last teeny', and whether we need to support master 'pre' builds. Given that the logic for that sort of thing is messy, it would be best to support from the start (?) |
FWIW I tried repackaging installed Ruby+DevKit as a .7z, that's 150MB (instead of 300MB .tar.gz, nice). So I guess the only fast way for now is to rely on the existing MSYS2 install in |
Yeah, been there, done that. I'm hoping they add an MSYS2 install independent of the Ruby installs. Everywhere I've seen discussion, they're very vague about any disk image updates. JFYI, I added Ruby 2.7.0 here. |
@eregon You're right, switching to a different compression algorithm doesn't have a big impact on install speed. Windows is awfully slow at handling small files. RubyInstaller uses lzma2 compression. Possibly my idea is ridiculous, because I didn't try Github Actions so far. But if I understood it right, it has RubyInstaller-Devkit 2.4, 2.5 and 2.6 preinstalled with full Devkit? So isn't it an option to just
and install RubyInstaller-head without Devkit (or Ruby-Loco)? The |
You're idea is good, as it's what I'm doing in this repo. I'm just making a It also allows 2.3.3. Some extension gems will compile and test with MSYS2 built *.so files... |
Thanks! And thank you @larskanis for building it! I got Ruby 2.4-2.7 working now in It has similar logic as this action but simplified: And indeed it just reuses the MSYS2 from the hostedtoolcache, which means the whole action takes just 5 seconds to run: https://github.com/eregon/use-ruby-action/runs/374628258 Drawbacks are probably a slightly older MSYS2 than when using And currently bundler is not installed in those |
Should be for Ruby 2.6 and later. Not right now, but I'll have a look re adding the base, mingw & msys2 parameters. They are helpful, as a lot of devs aren't familiar with MSYS2. Obviously, they'd be ignored for other OS's... Thanks, Greg |
Right, of course. But for Ruby <= 2.5 it's not there but I'd guess almost all Ruby CI jobs want it. |
Hello, and thank you for this action!
I am the author of https://github.com/eregon/use-ruby-action and would like to see what it would take to make it work on Windows too.
The idea of that action is to reuse prebuilt binaries, so setting up Ruby is just download + add to PATH.
For Linux and macOS I use this repo which automatically compiles Ruby:
https://github.com/eregon/ruby-install-builder/
For fun I tried to run it on Windows with
shell: bash
(which uses the Git shell, so quite limited) but that failed early: https://github.com/eregon/ruby-install-builder/commit/ca7c2421117780dac91d309189e08dd41c8ef0ec/checks?check_suite_id=380675014Looking at https://github.com/MSP-Greg/actions-ruby/blob/master/lib/main.js I wonder which parts are needed. It looks quite complicated.
Of course, it would be most convenient if we can use the RubyInstaller2 binaries.
OTOH, do we need to install extra packages and update MSYS2?
That seems to take a while (1min16s in example), so I'd like to avoid it if possible.
The text was updated successfully, but these errors were encountered: