ci: run build and test for each commit in pushed range#1040
Conversation
|
@jaoleal @luisschwab take a look at this when you get a moment! |
|
This isn’t good, because it should be reproducible locally. In this case, you basically wrote everything directly in the CI, but the right approach would be to put it all in a shell script so it can be run locally and tested, since this is now part of the CI flow. Also, I think the lint should run on every commit too, and if possible, the functional tests as well. |
|
@moisesPompilio thanks for the review but here are my thoughts on it, on the shell script concern, youre right that the logic should be reproducible locally, and it actually is so the reproducibility is there, the workflow itself is just the glue that computes the push range( i've took reference from this links you can check it out - https://github.com/bitcoin/bitcoin/blob/master/.github/workflows/ci.yml https://github.com/bitcoin/bitcoin/blob/master/.github/ci-test-each-commit-exec.py on lint and functional test per commit,
P.S. - if you think lint is worth adding despite the cost tradeoff, happy to include it, just wanted to be transparent about why it was left out rather than it being oversight |
Relax, bill gates is paying for our CI |
then i'll add both lint and functional tests :) |
|
Also, we still have a lot to improve on the functional tests side. About lint, If the problem is rust build time, on floresta-nix i think can speed that up, ill go after it when we stop having more emergent priorities. For sure we can talk about that for Q3 and Q4. |
But it's better to implement the current lint and functional tests, as the improvement is on hold for now. |
Even if its noisy, what we seek here are atomic commits with concise and meaningfull changes. So the tradeoff is worth it, even if the CI takes 1 hour to run, its worth it... The idea is not to delegate for CI to catch problems, but only to publicly attest that things are correct for reviewers
Well ,partially, the script, as it is now on e2154c5, is very simplistic given what we run on our current CI, perhaps the ideal would be to delegate that to our
Yes, besides, only when we have things running that we will know the weak points to resolve.
Take a read on what i wrote on #1038, its just a sketch on what more to improve but theres already somethings being addressed... These times i also been thinking that literally running the nodes are too much, perhaps for some utreexo related stuff we coul directly use rustreexo-python-ffi ? For bitcoin core stuff we could use bitcoin kernel ? We should have a brainstorm about that. |
|
I'd rather have this done when I start the CI overhaul. |
Description and Notes
FIXES #708
this PR adds a new CI workflow that runs
cargo buildandcargo teston every intermediate commit in a push batch to ensure PR history remains fully compilablenotes:
git checkout --detachloop instead ofgit rebase --execfor better reliability in headless CI--releasemode to prevent thefloresta-rpctests from hitting the 30-second node startup timeoutHow to verify the changes you have done?
push a branch with multiple commits to your fork, the new per-commit tests action will run alongside the standard CI, logging each commit it tests and cleanly failing if an intermediate commit is broken
screenshots
below are the screenshot of the result of the per-commit tests
minor note
the below change is intentional(not ai generated), to make the start of every commit check visible