-
Notifications
You must be signed in to change notification settings - Fork 205
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
Update Actions #432
Update Actions #432
Conversation
run: rake | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: MSP-Greg/actions-ruby@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use ruby/setup-ruby
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Can't update MSYS2, etc.
- No mswin build
- Both mswin & mingw builds are fully tested. Last time I checked, the MinGW build that ruby/setup-ruby uses doesn't run test-all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re 1., how about a setup-msys2
or so action doing just that (and nothing on other OS)? Maybe https://github.com/MSP-Greg/msys2-action already does that?
Re 2., fair point, I wouldn't be against adding the possibility to use a mswin build in ruby/setup-ruby
. Can you open an issue at https://github.com/ruby/setup-ruby if you think it's important to test on mswin? I know little about Windows, but I thought most people use RubyInstaller (and I'd think extremely few do their own builds).
Re 3., doesn't the RubyInstaller-head build run test-all? If not, can you open an issue for that on https://github.com/oneclick/rubyinstaller2?
I see you used ruby/setup-ruby
for non-Windows workflows, so I think this change is fine, since anyway there are Windows-specific steps in there. But it would be good to make it available for cases which can share a workflow for all 3 OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to deprecate msys2-action and replace it with actions-ruby, which I could rename setup-ruby.
mswin build - ruby/ruby tests against it. So, as recently happened with ruby/openssl, mingw passed there, but when they pushed the changes to ruby/ruby, mswin failed. By having a mswin build available for CI, that doesn't need to happen.
At present, mswin builds are not often used. But, I know of one company using an embedded Ruby based on RI2, and they're having issues with the fact that their app builds with VS 2019 and the RI2 builds use a different msvc runtime (the one used by MSYS2 tools). So, there is reason to build/test against mswin/msvc.
doesn't the RubyInstaller-head build run test-all?
See below. I'm not sure about spec tests, they may run when it hits RI2, not sure.
Simply put, my shit works, or, if it occasionally doesn't, it gets fixed quickly. ruby-loco has been used in CI for almost three years in a lot of repos. The one time I recall it breaking was over the RubyGems binstub issue, and I added tests for that. I also actively encourage repos to test with ruby master on all platforms, which benefits ruby/ruby...
EDIT: FWIW, I use ruby-loco mingw every time I update https://msp-greg.github.io/, and any work I do on PR's I start with ruby-loco. I 'walk what I talk'...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've given a few more thoughts about this.
I think your 3 points are all valid points to use your action here.
- is part of package management, I wouldn't want to have that in setup-ruby (Integrate system operations into setup-ruby setup-ruby#21)
- For that to work, one needs a separate
windows
workflow/job, becausemswin, mingw
as Ruby versions just wouldn't make sense on Ubuntu & macOS. If it's a separate workflow/job then it's also easy to simply switch to your action in the windows workflow/job. - We should resolve that in RubyInstaller, good catch.
I think it's good to use your action for fine control like testing on both mingw & mswin.
I'm trying to deprecate msys2-action and replace it with actions-ruby, which I could rename setup-ruby.
I think something with windows, mswin or mingw in the action name would be helpful to clarify it's meant for Ruby on Windows. Another setup-ruby
would be confusing because it wouldn't be a superset of ruby/setup-ruby.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re the name, how about 'setup-ruby-win'? I think that would be clear to most people.
Re RubyInstaller vs ruby-loco mingw, I've set up ruby-loco to test against a master branch. All test suites are run against install, they're isolated (so all run), and logic is there to determine if any fail. The mswin build is currently building in a more traditional way (like ruby/ruby CI), but I'm converting it over to match the mingw build. A lot of repos have been using it for quite a while, including RubyGems.
Off topic, but stepping back, should the Ruby organization support Ruby Windows binaries itself? Should the 'devkit' be a repo under ruby? Should ruby/ruby support dll manifests in Windows binaries? Etc, etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setup-ruby-win
sounds good to me.
I'd be OK to add mingw/mswin builds built by ruby-loco in ruby/setup-ruby
, if it doesn't add much complexity to the action, PR welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed oneclick/rubyinstaller2#169
.github/workflows/macos.yml
Outdated
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: [ 2.7, 2.4 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add 2.6 and 2.5 to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can if you'd like. Previously, just one job was ran, and it was the default Actions Ruby.
MacOS jobs have a much lower concurrent limit that Ubuntu or Windows jobs, so I thought I'd run low/high...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
ccaeaea
to
61c8dbc
Compare
61c8dbc
to
ecb26c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
- name: Install dependencies | ||
run: bundle install | ||
- name: Run test | ||
run: rake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation changes here make it harder to read the diff, could you keep the original indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could, but it was my impression that proper yaml should have array members indented...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not sure if there is a recommendation on that, I think both styles were used in .travis.yml
back then.
I personally prefer the lesser indented variant, so it's only 4-spaces indented for steps (6 starts to feel quite deep already).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re indenting, not an issue I feel strongly about. But, since I changed the indents in .github/workflows/ubuntu-jruby.yml
, knowing the preference affects what I do with the merge conflict.
My tired old eyes prefer the indented style...
1. Remove rvm where possible, add ruby-head, misc 2. Add mingw & mswin Windows testing
ecb26c5
to
47b3454
Compare
Apologize for not mentioning it previously, but Appveyor is testing on the below. The 24-x64 & 25-x64 jobs are identical to jobs done on Actions. The two 32 bit jobs (24 & 25) cannot be done on Actions, as both the Ruby binaries and the gcc tools are unavailable. I can remove in this PR... I prefer to remove jobs in AppVeyor & Travis that are run on Actions, as they often backup CI across the whole Ruby account.
|
I think it's all right to remove redundant jobs in AppVeyor at least. |
Removed with additional commit. |
I'll merge this, I think @hsbt concerns have been addressed. |
In the past, many Ruby 'master/head' builds were not fully tested. All the builds used are built on GitHub and fully tested.