Skip to content
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

replace travis with Github Actions #1432

Merged
merged 2 commits into from
Mar 9, 2023

Conversation

kallewoof
Copy link
Member

@kallewoof kallewoof commented Mar 8, 2023

This ports the CI to use Github Actions on pull requests and pushes. Unfortunately it looks like you have to merge this before it takes effect. You can see the runs on my repository at https://github.com/kallewoof/bips/actions though.

For posterity, I initially did a port to Cirrus before it was pointed out that Github Actions may be better.

@kallewoof kallewoof force-pushed the 202303-travis-bye branch 8 times, most recently from 14b041b to 76c1a08 Compare March 8, 2023 02:16
@augustoproiete
Copy link

Hey @kallewoof Is there a reason why Cirrus (not super well known CI system) was chosen instead of Github Actions (which is more widely known and would seem a more natural choice given the code is already hosted on GitHub)?

@kallewoof
Copy link
Member Author

@augustoproiete Only reason being that bitcoin core is using it. Playing around with Github Actions a bit to see which one is better.

@kallewoof kallewoof force-pushed the 202303-travis-bye branch 7 times, most recently from 6dc874d to c550c95 Compare March 8, 2023 03:13
@kallewoof kallewoof changed the title replace travis with Cirrus CI replace travis with Github Actions Mar 8, 2023
@kallewoof
Copy link
Member Author

Github Actions seems better. Thanks for the nudge!

@augustoproiete
Copy link

ACK cbd78b0

Works as expected

image

@junderw
Copy link
Contributor

junderw commented Mar 8, 2023

Nit: Having all the checks in one job means that if the first check fails, you don't know if the 2nd or 3rd one fails, so sometimes you get a few extra back and forth "nope, try again." and can be annoying as a maintainer.

Other than that, ACK.

@augustoproiete
Copy link

@junderw That's not the case with GitHub actions... You can drilldown and see exactly which step of the job failed, along with debug/verbose info written to the console by the build script:

e.g.

https://github.com/augustoproiete-forks/bitcoin--bips/actions/runs/4361581418/jobs/7625593905

image

@kallewoof
Copy link
Member Author

kallewoof commented Mar 8, 2023

Hum. I think @junderw is correct here, actually. Initially I had errors in the first script and that failed (edit: the remaining scripts did not execute, it looked like). I probably shouldn't use exit 1...? Either way, splitting into multiple sounds good to me but felt slightly overkill maybe.

@kallewoof
Copy link
Member Author

@apoelstra
Copy link
Contributor

We had a similar decision between Cirrus and Github Actions for rust-bitcoin. My understanding is that Core chose to eschew Github Actions because of an abundance of caution around Github's security controls (which IIRC had been in the news recently), and in general, Github being the canonical source of truth for the repo so there's the potential for security issues with GA to be much more serious.

What we landed on was "this is probably reasonable paranoia for the reference implementation of Bitcoin's consensus logic, but probably not worth the extra hassle for other libraries, since GA is so convenient". I'd say the BIPs repo probably has the same calculus. It'd be pretty surreal if there was a security issue in GA that led to a BIP text being changed, then somehow nobody noticing for the months it took for implementations to appear and be deployed.

@augustoproiete
Copy link

@kallewoof @junderw Oh, I see now that I misread @junderw's comment - I thought he was talking about the ability to see which step failed, and not about continuing the execution when one of the steps fail.

It seems moving the execution of link-format-chk.sh to its own job would be a good idea, if buildtable.pl can be run independently (and not fail - even if links are not in the expected format)

@junderw
Copy link
Contributor

junderw commented Mar 8, 2023

"this is probably reasonable paranoia for the reference implementation of Bitcoin's consensus logic, but probably not worth the extra hassle for other libraries, since GA is so convenient"

Exactly. GA is perfectly fine for BIPs repo imo.

Also, I could have been more explicit.

By running in parallel, all tests are run. But in sequence, if the first one fails, the 2nd and 3rd one are not run so you only learn their status after fixing the first one and trying again. If parallel, you can see that all 3 are failing and fix all 3 in one commit.

@kallewoof
Copy link
Member Author

@junderw So like 685f383 ? (e.g. https://github.com/kallewoof/bips/actions/runs/4370385560 )

Looks a bit redundant, but it did indeed run the tests in parallel.

@kallewoof
Copy link
Member Author

@apoelstra Thanks for the feedback! Sounds like GA is the way to go,

@junderw
Copy link
Contributor

junderw commented Mar 9, 2023

LGTM! ACK

@kallewoof kallewoof merged commit ebea569 into bitcoin:master Mar 9, 2023
@kallewoof kallewoof deleted the 202303-travis-bye branch March 9, 2023 02:57
@Princeprince559
Copy link

f0894ded

Copy link

@Patish11 Patish11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants