-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add GitHub Actions CI #406
Conversation
The main reason I submitted this PR was to achieve parity with the MRI platforms used in the main ruby/ruby CI. Having CI pass here and then cause CI failures in ruby/ruby is a PITA. The Ruby master builds used in Actions CI are fully tested, unlike the builds on other CI platforms. For the impatient, Actions CI is typically faster than Travis, even with more jobs... EDIT: When adding Actions workflow files via a PR to a repo without Actions CI, they often don't run. See https://github.com/MSP-Greg/json/actions/runs/57879745 for results. |
One file, two jobs 1. pass - Test MRI Rubies, 2.2 thru head, on Ubuntu, macOS, & Windows. Test TruffleRuby on Ubuntu & macOS. 2. fail - Test JRuby 9.2 and JRuby head on Ubuntu & macOS. All jobs are 'allow-failure'.
Rebased and updated to make use of changes to Actions matrix api See: |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu, macos, windows ] |
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.
Do not mix Linux/macOS and Windows platforms in the one workflow.
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 am curious, why do you prefer separate workflows?
I usually prefer like this if there isn't much OS-specific logic, as it avoids duplication and makes it significantly easier to maintain (1 place to change vs 3).
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 maintainability is low about mixing *nix and Windows for my experience.
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.
That may have been true in the past at the beginning of GitHub Actions, but I don't think it's the case anymore, especially with improvements in ruby/setup-ruby. In fact many gems already use such an approach and in my experience, it's successful.
From a maintainability point of view it certainly looks better to me to have the steps repeated the minimum number of times (2 times here for allowed failures, instead of 3-4 if we have one job definition per OS).
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: MSP-Greg/setup-ruby-pkgs@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.
Can you remove the your actions? The maintainers can't control it.
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.
It's needed to install ragel
in a platform-agnostic way.
MSP-Greg/setup-ruby-pkgs@v1
just uses ruby/setup-ruby
for the setting up Ruby part.
I'm happy to do one or both of the following:
|
I have no motivation about that. |
Unfortunately, Greg did reject my suggestion. |
@hsbt I don't understand why you closed this PR, could you elaborate? What's the issue with Also I don't see Greg rejecting any suggestion here. |
He refused the maintainer's requests on this and ruby/psych#444. I never collaborate with these attitude. |
Two commits:
'Rakefile - update for Windows mingw & mswin' - minor Windows specific changes to allow compiling on mingw & mswin
'Add GitHub Actions - test Ubuntu, macOS, Windows' - two workflow files
Pass - Test MRI Rubies, 2.2 thru head, on Ubuntu, macOS, & Windows. Test TruffleRuby on Ubuntu & macOS.
Fail - Test JRuby 9.2 and JRuby head on Ubuntu & macOS. All jobs are 'allow-failure'.