-
Notifications
You must be signed in to change notification settings - Fork 69
Support for alternatives implementations: TruffleRuby, JRuby, etc #20
Comments
This is an interesting question. I don't see us doing this immediately since there are some other, probably more pressing needs even in this repo, but I'm not quite sure what makes sense here. Questions that immediately pop up if we decide to do this:
I'm not really convinced on what we should do either way - @chrispat any thoughts here? |
Currently, the major Ruby implementations targeting full compatibility with MRI are JRuby, TruffleRuby and Rubinius. Maybe a good way to know is simply letting people contribute the setup for new implementations to this repository. I'd be happy to add support for TruffleRuby for instance.
A few Re support, I would expect little maintenance is needed, the process to install an alternate Ruby should not change over time. If it changes, it seems fair to ask the community to update the logic.
I would say it's very frequent for Ruby libraries. I think many Ruby library developers expect to be able to test against multiple Ruby implementations. |
Thanks for the thoughtful issue/responses. As I think more about it, I think I'm on board with this - lets do it! I don't have the bandwidth to get to this immediately, but am more than happy to review a PR and/or leave this issue open and do this in the future. If you do end up doing a PR for TruffleRuby (or something else), I'd recommend taking a look at the pattern we follow in other actions like setup-node. The implementation doesn't have to look the same, but would love if we can get benefits of caching the downloaded tool (which will matter a lot more when we introduce private runners) |
This may require some changes to the Actions job matrix. From what I can tell, the 'include:' section only adds 'data/inputs/env' to jobs in the existing matrix. Conversely, in Travis, the 'include:' section adds additional jobs to the matrix, and this is typically where JRuby jobs are added. Maybe another section could be added like 'additional-jobs:' or something... |
@damccorm Great, I'll try to find some time to make a PR, thank you for the link. @MSP-Greg I think that's mostly orthogonal to/independent of this issue, could you file it as a general feature request for GitHub Actions? I've seen both JRuby as part of the matrix (I think that's more frequent, and it ensures everything done on MRI is also tested on JRuby) or separated and then it can be a separate workflow. |
There's thread somewhere at https://github.saobby.my.eu.orgmunity/t5/GitHub-Actions/bd-p/actions where I added a post about the quirks of the current Actions matrix system. Regardless of how it's done, adding Ruby builds other than MRI to Actions would be helpful... |
I'm pretty keen to try this out. However, I do need the ability to specify custom environment variables for different versions of Ruby. Not sure what is the best way to do that. Here is my current workflow: https://github.com/socketry/async/blob/master/.github/workflows/tests.yml Here is my travis configuration: https://github.com/socketry/async/blob/master/.travis.yml Also, do you think it would make sense for |
@ioquatix You can already try #28 The docs for matrix are at https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix |
https://github.saobby.my.eu.orgmunity/t5/GitHub-Actions/GitHub-Actions-Matrix-options-dont-work-as-documented/m-p/29558 is the discussion @MSP-Greg was mentioning above. |
covered in this dupe: #44 (comment) |
There are multiple implementations of Ruby (see for example https://www.ruby-lang.org/en/about/).
Ruby library (gem) maintainers like to test against these other Ruby implementations in CI, to make sure their library works on that implementation too.
Should
actions/setup-ruby
be able to setup those Ruby implementations?Or should it be a separate repository to setup those Ruby implementations?
I think having it in
actions/setup-ruby
would be more convenient, as one would be able to reuse the same workflow file for testing both on MRI and e.g. on JRuby and on TruffleRuby:I think most alternative Ruby implementations provide their own binaries (while MRI does not), so the setup is usually fairly simple, and usually consists of just downloading + adding to PATH, sometimes with an extra command to run.
For instance for TruffleRuby it's just:
The text was updated successfully, but these errors were encountered: