-
Notifications
You must be signed in to change notification settings - Fork 411
Add GitHub Action to build the project #601
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 Action to build the project #601
Conversation
Cool! Obviously needs fuzz targets etc but happy to move over. |
682e133
to
752a58b
Compare
752a58b
to
1585e8d
Compare
Hi, thanks much for this PR. I'm wondering, what are the advantages you were thinking that GitHub actions has over Travis? I sort of see the advantages of using both but want to understand the argument for switching better :) |
.github/workflows/build.yml
Outdated
- name: Build on Rust ${{ matrix.toolchain }} | ||
if: ${{ matrix.build-net-tokio }} != true | ||
run: RUSTFLAGS="-C link-dead-code" cargo build --verbose -p lightning |
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 be mistaken, but it looks like this step is still running on rust-stable, where it shouldn't be? And the Test on Rust
steps also seem to be running redundantly.
https://i.imgur.com/C0HYKL8.png (from your link to the runs in the PR description)
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.
Also seems to be the case for 1.39.0
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, I totally misunderstood the if:
syntax. Should look good now. Thanks.
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 is looking good, just a few outstanding comments :)
I wish the actions would run on this PR but it looks like that would only happen if you were a Collaborator
: https://i.imgur.com/ChW4gVi.png
.github/workflows/build.yml
Outdated
- toolchain: stable | ||
build-net-tokio: true | ||
- toolchain: beta | ||
build-net-tokio-tokio: true |
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.
Beta doesn't seem to be building net-tokio: https://i.imgur.com/wvQvKP6.png
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.
Typo now fixed.
.github/workflows/build.yml
Outdated
- name: Build on Rust ${{ matrix.toolchain }} | ||
if: ${{ matrix.build-net-tokio }} != true | ||
run: RUSTFLAGS="-C link-dead-code" cargo build --verbose -p lightning |
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.
Also seems to be the case for 1.39.0
@@ -0,0 +1,93 @@ | |||
name: Continuous Integration Checks |
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.
Not a dealbreaker but, wondering if there's a way to get the colors that Travis has, in github actions output? They're nice
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.
Sorted :)
Hi @valentinewallace, @TheBlueMatt mentioned some instability on Travis that is why I did the PR 😁 |
I've found travis to be pretty flaky since the acquisition, and it seems more and more like its on maintinence-mode, they fired a bunch of folks at the acquisition IIRC and a bunch of the images etc hanve't been updated since :/. |
How do we make this run? The "Checks" tab shows no checks here? I dont see any options in the repo settings to turn it on, or does it need to be on master first? |
ff3d157
to
79f9965
Compare
Same setup than Travis except for removing `rm -f target/debug/lightning-*` as I do not believe such file would exist on a fresh run. I have not setup caching at this stage. The library is small so I don't think it'd be that necessary/helpful. I'd recommend to let both CI run for a bit to compare performance and stability. The CI setup is straightforward so I do not foresee any issue with GitHub actions. Once happy, Travis file can be removed and branch protection checks can be updated to block on the GitHub actions. You can also check the [Coverage report](https://codecov.io/gh/D4nte/rust-lightning/tree/752a58bc0441a49a0513f2cad979ad9e2621312a/lightning/src/chain) to ensure it is as expected.
b984f32
to
355dbbc
Compare
As @valentinewallace mentioned, because I am not a collaborator and I am using a fork, the new workflow I bring in does not get triggered on rust-bitcoin/rust-lightning repo. This is to protect any However, the actions are triggered on my fork, so you can see the result at https://github.com/D4nte/rust-lightning/actions for the same branch. Once this is in master, I expect the checks to be triggered for any new PR, fork or not. |
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.
Looks good now! :) Thanks for the updates (+ quick turnaround).
Ready for review, you can see the runs at https://github.com/D4nte/rust-lightning/actions
Same setup than Travis except for removing
rm -f target/debug/lightning-*
as I do not believesuch file would exist on a fresh run.
I have not setup caching at this stage. The library is
small so I don't think it'd be that necessary/helpful.
I'd recommend to let both CI run for a bit to compare
performance and stability. The CI setup is straightforward
so I do not foresee any issue with GitHub actions.
Once happy, Travis file can be removed and branch
protection checks can be updated to block on the GitHub
actions.
You can also check the Coverage report to ensure it is as expected.