-
Notifications
You must be signed in to change notification settings - Fork 156
Use GitHub actions for CI #440
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
Conversation
r? @Emilgardis (rust_highfive has picked a reviewer for you, use r? to override) |
a2b62f0
to
639eb0d
Compare
@rust-embedded/tools This is ready now. For now this only adds GitHub Actions as the missing second factor on all PRs. It's not only much faster than Travis but also not taking up any shared resources. And there's still room for optimisation. Ultimately I'd like to get rid of Travis altogether but that's up for a separate PR/discussion. |
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.
Great! I don't have much experience with GH actions so would be good to get another pair of eyes on this.
LGTM
We discussed the details quite a bit on the matrix channel. Probably the most GHA experienced person in the team is @adamgreig. |
Generally LGTM, thanks for doing this!
I'm not sure about this. I think your intent is to stop GHA building the commit in a PR and then immediately building again once it's merged to master, but I think what actually happens here is only pushes to the master branch (including merging a PR) and only PRs targeting the master branch (most but not all PRs) will get CI. However that means PRs to non-master branches get no CI which doesn't seem desirable. Additionally, we use bors in svd2rust, which requires that CI runs on
And if we then find this does too many builds, look in to reducing them. We could also remove I noticed we also use Travis to build release binaries which are uploaded to GitHub releases; we should also do this in GHA before removing Travis entirely. We'll also want to update both bors and the repo branch protection settings to use GHA; perhaps this PR should also update bors.toml to check against GHA status instead of Travis status. |
Can we even handle those? I think bors will report an error if you attempt to do a PR not aimed at master. I'd prefer to do this step by step. For now the important thing is to get regular (and reasonably fast) CI for PRs up and running again and then we expand into other directions. |
No, if you do pull + pr it will always build PRs twice which is very wasteful, cf. the first run on the PR above: |
That's fair; I still think we require CI builds on
I don't understand what you mean by "pull + pr". What's causing the double build on that commit? Is it because you pushed to a branch on the repository (triggering branch push) and because that branch is a PR? I think my suggested config would also solve this in that case, while still allowing PRs not aimed as master and allowing bors to work:
|
Sorry, I meant "push" and "pull_request". If you do both without specifing a branch filter it will trigger twice. I'm not quite sure how that works but we can try your approach. |
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
@adamgreig Can I get a r+ now? ;) |
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.
Yep, let's give this a go!
bors r+
Build succeeded: |
Signed-off-by: Daniel Egger daniel@eggers-club.de