Windows, MSYS2, Ruby

Windows Ruby has always used MSYS (ruby < 2.4) or MSYS2 (Ruby >= 2.4) for compiling.  ruby/ruby uses MSYS2/MinGW in their windows CI.

Currently, Actions has three versions of Windows Ruby installed. All include ‘embedded’ MSYS2 (aka DevKit).

If one looks at https://github.com/oneclick/rubyinstaller2/releases, the ‘devkit’ releases are approx 120 MB in size, while the standard releases are approx 10 MB in size.  The standard releases can be made even smaller by deleting the html files, which drops them to about appox 7 MB in size.

  1. So, it’s rather wasteful to have three almost identical copies of MSYS2.

  2. Non Ruby software is also compiled/built with MSYS2, Git for Windows is a good example.

Please consider adding a current MSYS2 installation at C:\msys64 for use with Ruby and other software.  Also, please be aware that regular updates to it would be helpful.

I don’t expect Actions to duplicate AppVeyor, but a list of the packages currently on AppVeyor is at https://ci.appveyor.com/project/MSP-Greg/appveyor-ruby

Finally, since Actions is provided free to the OSS community, I suspect many would be willing to help with scripts, etc.  So, if you want example scripts for installing MSYS2, etc…

1 Like

One of the challenges of keeping hosts loaded with development tools is the wide range of development tools - and even the wide range of versions within a set of development tools.  mingw especially can be tricky with the SJLJ vs SEH builds for x86 or the Dwarf vs SJLJ options.

> So, if you want example scripts for installing MSYS2, etc…

I think that this is a good opportunity to create a community-generated setup-msys2 action (akin to the setup-dotnet or setup-java actions) that installs the requested version of msys2 into a standard location.

1 Like

>  mingw especially can be tricky with the SJLJ vs SEH builds for x86 or the Dwarf vs SJLJ options.

Ok.  Maybe get x64 meeting the community’s needs before deciding how x86 should be supported?  Any idea how Git for Windows downloads split between x86 and x64?

Currently there are three almost identical minimal MSYS2 installs embedded in the three Ruby builds.  Rather than three, how about a more complete single install?

I tried a new MSYS2 install, I think that took about 8 minutes, most of the time was decompressing files.  Updating just gcc and a few other things in the Ruby installs takes about 2 minutes.  Seems like a lot of wasted time, expecially considering the above.

For whatever reasons, Appveyor has had a fairly complete MSYS2 install.  The main issue I’ve had is that their images are updated infrequently, so, at times a minimal refresh to MSYS2 can take a fair bit of time.

This is made worse by the fact that MSYS2 doesn’t really recommend ‘partial updates’, so one may have to do a full ‘-Syuu’/-Suu update just to get a small number of specfic packages to update…

> I think that this is a good opportunity to create a community-generated setup-msys2 action

Would *definitely* use that!

Done! Any contribution is welcome!

https://github.com/numworks/setup-msys2

To be honest, it was quite a pain in the ass to install for several reasons:

1/ Msys2 default installer is a GUI-only EXE. Fortunately they also ship tarballs, but those are a bit hidden.

2/ There were two bugs in tool-cache that prevented it to work easily:

https://github.com/actions/toolkit/pull/180

https://github.com/actions/toolkit/pull/165

Anyway, if you want to check a live example:

https://github.com/numworks/epsilon/blob/master/.github/workflows/ci-workflow.yml

https://github.com/numworks/epsilon/actions?workflow=Continuous+integration

1 Like

> So, if you want example scripts for installing MSYS2, etc…

@msp-greg, you might want to have a look at https://github.com/actions/starter-workflows/issues/95

Unlike @ecco, I install a full MSYS2 by using chocolatey, which is included by default in windows-latest. Unfortunately, it takes more than 5 min to install (https://github.com/1138-4EB/ghdl-packaging/commit/069ae680c38a1832950a377618dc4a1798d6ccf3/checks?check_suite_id=250753315) and it is required in each job/task.

Therefore, I think it would be useful if windows-latest environment included a decent MSYS2 installation. With ‘decent’ I mean an installation where you can execute an MSYS shell in order to build an MSYS2 package. I cannot understand what’s the point currently: why provide an MSYS2 environment where you cannot even build packages for the same env?

1 Like