-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate system operations into setup-ruby #21
Comments
I've been thinking about this too, it's quite verbose in GitHub Actions to install a package across platforms, even if it has the same name. I'm not sure this fits in this action though, wouldn't it fit better in some - uses: unknown/install-packages
with:
packages: ragel openssl A quick search shows https://github.com/marketplace/actions/get-package which does something a bit like that. |
I think |
Maybe look at it as the one action needed to configure Ruby and the system for the CI task? Also, I've had a few workflows with a lot of steps, so the idea of keeping them to a minimum is good. It's not something I fell strongly about. Really, all people care about is the equivalent of |
I think the overhead of using a separate action is very small in practice, probably less than 1 second. I've made my mind, I think such an action would be useful in general, not just for Ruby and so I think it should be a separate action. This action is already not that simple anymore, I wouldn't want to add not-so-directly related features to it. So, I think someone should create a |
I forgot to mention, adding such feature in this action would also clearly no longer meet the efficiency claim, as installing packages can take far more than 5 seconds. |
Okay by me. Maybe setup-ruby-packages? I think making it clear that it's Ruby specific, and it would be helpful to have the action used after Ruby is setup/installed. Also, as you mentioned, code expands. I think maybe the idea of a global 'packages' input will just cause problems. Maybe have the following for allowable inputs:
|
Why do you say it's Ruby-specific? Aren't system packages global and so could also be used e.g., for some Python library's CI? For the names I'd suggest Then it's immediately clear by which package manager the package is installed, which is particularly useful if there are multiple package managers on that platform. What does |
I just threw that in. I don't know if JRuby has a package concept or not.
First of all, because supporting generic package installation might be a support nightmare. We're Ruby people. As to Ruby specific, the main reason I started msys2-action and then actions-ruby is OpenSSL. To build against Windows Ruby versions 2.2 thru head/master mingw & mswin takes four different packages. I help ruby/openssl, puma, & eventmachine, and all compile against OpenSSL. I didn't want workflow spaghetti code in all three. Without having the Ruby binary installed first, the action has no way to know what version/platform of OpenSSL to install, unless we add another input. Also, having the Ruby binary installed makes things like RUBY_DESCRIPTION, RUBY_VERSION, the ABI version, etc, available in the action script. I don't think I've mentioned it, but I don't think the RubyGems |
Reopening to keep the discussion here, although I think this should be a separate action, not part of this action. |
Re
I think it's pretty simple if it just shells out the package manager and does nothing more.
Can the version be part of the package name? I think it is, e.g. It seems what you'd like is Also, does installing openssl even have any effect when using Ruby? Maybe on Windows? |
Puma and ruby/openssl are using it, and EventMachine probably will when they update their CI. If the logic isn't available, it makes for very messy workflows. I suppose I could have a ruby-win31-openssl action... |
What about the point that the runtime openssl is mostly ignored? Is that not true on Windows? |
You've just hit on another Windows concept, and part of the reason I always build with OpenSSL versions matching the version Ruby was built with. Windows exe/dll files have a concept often referred to as 'manifests'. It involves xml embedded in exe or dll files that tell them where their support dll's are located. Using manifests does not affect PATH. RI2 and ruby-loco (mingw & mswin) all have manifests. So, anything using OpenSSL dll's, like Puma, EM or ruby/openssl, will use the files defined by the manifest first, which are the files packaged with Ruby. Note that when testing from build in ruby/ruby, the manifest doesn't exist, so the path resolution for the dll's is different. That is the reason some OpenSSL files need renaming in ruby/ruby, but not elsewhere. Another reason why I test from install... |
Thanks for the explanation. If I understand that right, it means it shouldn't be necessary to install openssl for puma, EM, etc, because it's already part of the shipped Ruby? Why is |
Good thought, but unlike the builds you've created for Ubuntu & macOS, only the dll's are included with shipped Ruby.
Actually, to keep it smaller, the RI2 embedded MSYS2 installs don't have the OpenSSL package included. |
Ah, so it's to install the openssl.h, etc headers, right. The headers are typically pretty small in size, it sounds like shipping them with builds of Ruby on Windows would simplify that quite a bit for a probably very small increase in download size. |
The actual package is about 4.77 MB. Some of that is man/html pages, some is shared/static, some the dll's already included in the Ruby package. It's about the same size as the Ruby mswin package, half the size of mingw. It's not a bad idea, but we also don't want to to stray too far from what a local install would be. Setting up cert files & paths is one thing, adding dependent packages into the build package is another. |
I should add that Ruby mingw builds have a history. With mswin builds we can do whatever we want. As I think I've stated, I created it so ruby/ruby had a means of testing with it in std-lib/'default gem' repos. |
Did some testing with the MSYS2 gcc issue. Below is gcc for recent Ruby releases, the suffix on the gcc version is the MSYS2 release:
Note that all the current Rubies were built with the current MSYS2 gcc (9.2.0-2). A particular gem was known to cause an issue, so I updated gcc to 9.2.0-2, then installed the gem on all Ruby versions shown above, except 2.7.0. All of the Rubies using gcc 8.3.0-2 and 9.2.0-1 failed. So, it appears that being able to install either current gcc or 9.2.0-1 is the answer to supporting all Rubies & extension gems. JFYI, I originally tried installing current versions of json & psych, and both installed. Re the 'setup-ruby-packages' idea, maybe it should just be separate *.js files by OS/platform? Have a shared/common runner that loads/runs whichever is needed? |
Closing since 'off-topic' |
Great, thanks for creating that action. |
Thinking about what 's needed for some of the repos I've worked in, I'm wondering if integrating some of the MSYS2 related things I've done in msys2-action and actions-ruby could be integrated here.
For instance, inputs could be added like:
EDIT: for instance, all the code needed for ragel
'ragel' is a package with a cross platform name, so code could install it based on the platform used. For packages without common names, the OS specific names could be used in the respective inputs.
I recall somewhere seeing something like 'brew update all' or a similar command, which for Windows/MSYS2 might be the equivalent of updating the gcc tools. Just some general thoughts...
The text was updated successfully, but these errors were encountered: