-
Notifications
You must be signed in to change notification settings - Fork 286
Improve CI script #420
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
Improve CI script #420
Conversation
Ha! This reverts changes I made in |
Do we have to revert that? Why shouldn't the wasm also run on stable, beta and nightly? (1.29.0 is probably too old). I think we may want to contemplate moving |
The bit that was reverted was having WASM as a separate job, not that it was only run with the stable toolchain - so the stated aim of this PR (to make it clearer what runs when) was a success! I know basically zero about WASM, including whether or not we want to test with stable and nightly. If you think there is benefit in that then I'll add it to this PR.
I think we want to test as well, especially considering we (I) have been trying to add rustdoc tests that give good coverage of the public API. |
I am not sure I see the benefit of testing with
The point of compiling and testing a library crate against stable, beta and nightly is that you get a 6 (beta) - 12 (nightly) week notice when something merges into rustc that breaks what you are doing in your library. That is relevant regardless of the target architecture you compile for, be it x86, aarch64 or wasm. Typically, I would only mark CI runs against |
I'm liking this point, from now on I'm only going to run
Ouch, lets not do that :)
hmm, interesting, I like the sound of this also. Its above my pay grade to do such admin changes, @apoelstra are you interested in slackening off the merge requirements? (Require stable and MSRV builds to pass, stable tests to pass, and allow nightly/beta builds/tests to be red.) |
I would like to continue running tests on 1.29.0. This hasn't caused us much trouble in the past and anyway we're increasing 1.29 to 1.41 soon so the trouble it has caused us should go away soon. I would worry otherwise that the library might build ok on 1.29.0, but not build with |
Isn't the timeline for this, like, now? Do we need to care about it anymore? |
@TheBlueMatt yep, as soon as we get the new rust-bitcoin release out (I believe this is blocked only on rust-bitcoin/rust-bitcoin#796) |
Since I've not got a great track record on CI pipeline changes I've split everything up into individual patches to make review more likely to catch any mistakes (incl. the justification of each patch given in the commit messages). |
f3126b4
to
6808416
Compare
Totally re-worked the PR, re-written the PR message. |
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.
ACK 6808416
This all seems good/uncontroversial to me.
I don't know why I closed this, bit savage yesterday cleaning up stale branches I guess. Could you please re-open it @apoelstra if there is a button to do so ( |
I don't think GitHub allows this but you can always open a new PR :) |
Cool, thanks man. |
I have a reopen button. Kinda weird that you don't, when it's your PR and you closed it.. |
Last time I did this the explanation was I couldn't re-open because I'd force pushed but for this one that did not apply. My current guess is only maintainers can re-open. Not to worry. |
Remove single character of trailing whitespace.
Rebase includes:
|
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.
Nice re-write!
.github/workflows/rust.yml
Outdated
@@ -9,6 +9,8 @@ jobs: | |||
steps: | |||
- name: Checkout Crate | |||
uses: actions/checkout@v2 | |||
- name: Install clang # Needed for ASan. |
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.
- name: Install clang # Needed for ASan. | |
- name: Install clang for ASan |
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.
Ha! That's nicer. Will use.
.github/workflows/rust.yml
Outdated
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly |
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.
toolchain: nightly | |
toolchain: ${{ matrix.rust }} |
Need to actually use the matrix variable :)
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.
Nice reviewing, thanks man. Will re-spin tomorrow.
In line with the `Tests` job and for the fact that this job does stuff with the nightly toolchain other than bench. Re-name nightly CI job from `bench_nightly`to `Nightly`.
We use a matrix with a single element, this is unnecessary.
The address sanitizer job is silently failing at the moment because we do not install clang. Install clang so the address sanitizer job can run. Do not fix the silent failure, that will be done later on.
We have a separate CI job for things that require a nightly toolchain. Building the docs requires a nightly toolchain (because of `--cfg docsrc` flag). It makes more sense to run the docs build in the `Nightly` job instead of hidden in the `Tests` job. Do the docs build in the `Nightly` job instead of in the `Tests` job.
WASM is supported by Rust 1.30. We can therefore run the WASM tests on any all the toolchains except MSRV (1.29.0). This has benefit of catching nightly/beta issues before they get to stable. Done as a separate CI job since it is conceptually different to the `Tests` job. Run WASM for nightly, beta, and stable toolchains.
Changes in force push:
|
d2e1f8c Move panic test to top of script (Tobin Harding) Pull request description: In `test.sh` we have a test that checks for a panic by greping the output of `cargo test --exact 'tests::test_panic_raw_ctx_should_terminate_abnormally'`. If we put this test at the top of the script right after we run `cargo test` we are guaranteed to not trigger a re-build. ### Note to reviewers I just noticed this patch somehow snuck into #420, all other changes in that PR are to `.github/workflows/rust.yml` so this change does not fit in there. Hence raising it as a separate PR. ACKs for top commit: apoelstra: ACK d2e1f8c Tree-SHA512: 90ad7a8762a6fd977345f347f0aa8b0979a7576585000b6d80624c0672b7de457dec471dc63b2e7fa4c3f52143d0f6fd1f4031a70f85c9fab4b7c22a787c438b
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.
ACK 58db1b6
@thomaseizinger looks like your nits were addressed -- ok if I merge this? |
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.
ACK 58db1b6
Merge away! :) |
97dc0ea Run correct clang --version (Tobin Harding) a3582ff test.sh: Use set -e to exit on failure (Tobin Harding) 7bec31c test.sh: explicitly return 0 (Tobin Harding) Pull request description: Change the test script to exit with non-zero status code if any command fails. The `test.sh` script is silently failing, that means changes causing failures are slipping through our CI pipeline and being merged. Resolves: #419 ## Note Just the last 3 patches, the first 6 are from #420. re-base just shows it works on top of 420, it is going to have to be rebased again when 420 merges. ACKs for top commit: apoelstra: ACK 97dc0ea Tree-SHA512: b86a6876d8c45a2b90b7b3c8adbc08ad6f49b430b1cfaec31cd2de8441cb96af39c63da02b98d6ed71dfab045d466d71d3757297886b5e44ebb6cbaeb4ed32dd
Improve the CI pipeline. Done while investigating #419. This PR now only includes the GitHub actions changes, I'm moving the
test.sh
changes to a #422 because they cannot be merged yet.(Please note, this PR has been heavily re-worked so discussion below may be confusing to reviewers new to the PR.)