-
Notifications
You must be signed in to change notification settings - Fork 306
CI: Re-write using maintainer tools #699
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
CI: Re-write using maintainer tools #699
Conversation
6d5723c to
a70ff50
Compare
|
I don't know what the windows cross problem is, it exists on |
a70ff50 to
5280f73
Compare
|
Can you explain what i the point of this PR? I don't understand it, I just see a bunch of seemingly unrelated and unimportant changes. |
|
@Kixunil I haven't read it yet because it's in a draft state with red Xs, but the point is to unify the CI scripts across all the repos in this ecosystem because they do a lot of things are were constantly getting out of sync. |
c6ce901 to
f7a6d64
Compare
Kixunil
left a comment
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'm really not in the mood to review the last commit rn, sorry.
src/key.rs
Outdated
| type Err = Error; | ||
|
|
||
| #[allow(unused_variables, unreachable_code)] // When built with no default features. | ||
| #[allow(clippy::diverging_sub_expression)] // Because of panic. |
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 disagree, we should just disable FromStr impl if neither global-context nor alloc is available.
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 can do that, will do it as a separate PR because its unrelated.
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.
Can we put it in front of this one?
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.
Sure, will do.
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.
Yeah, oops, we should've filed an issue for this. The panic thing was there to avoid a major version bump at some point in the past but we should've fixed it properly as soon as we were ready to do a major one. (Maybe we need a new label for this? "Must be addressed by next major rev" or something?)
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 don't see how that was helpful since the code was broken anyway under that configuration, it just blew up during runtime rather than compile time.
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.
Only if the user actually called the function (and didn't catch the panic).
If we'd changed things to fail at compile time then previously-compiling code would have stopped compiling.
As for "why change the code at all then" it was to fix #491, in #492 (the previous code always failed, and with a C abort even, not a panic).
| steps: | ||
| - name: Checkout Crate | ||
| uses: actions/checkout@v2 | ||
| - name: "Checkout repo" |
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.
IME quotes are unusual in GH actions ant thus I think they're harder to read.
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.
Do you want me to remove all quotes from all of our GitHub actions files?
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 think that every string on YAML should be quoted.
@Kixunil don't know if you already seen this but here are a bunch of good arguments: https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell
(PS: I wish we could do GH Actions using TOML, I honestly think YAML is very very easy to shoot yourself in the foot...)
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 knew YAML is bad but I didn't know it's that bad. I'd make an exception for the name: field since it just contains a human-readable name but if you want to use some kind of linter and ban it entirely, it's fine.
|
Note to self, check that |
30535f1 to
e9bb412
Compare
|
Force push includes intalling |
ddf1209 to
f12fd75
Compare
|
In f12fd75: We should reenable the disabled msan test. It's a year old and probably whatever incompatibility was causing it has gone away. Also I don't see any confusion about xargo in the commit message or content. |
|
Gentle bump |
|
Before I review it, did you fix the SSOT stuff? |
|
Let me check another day (its Friday arvo now for me), I did not realize there was an SSOT issue with this PR. |
|
It's already Friday?! Shit! |
|
I'm also not aware of any SSOT thing, but:
|
|
I mean crate list. I haven't looked into it yet. |
I come from the future, didn't you know? |
|
Will re-spin, thanks. |
We have a `Cross` job in `rust.yml` and also a `cross` workflow. The workflow is a superset of the job, remove the redundant job.
As we do in other places stop using the `actions` runner and use the `dtolnay` one to checkout toolchain. While we are at it, use double quotes for `name` fields (this is a small stylistic thing I have been introducing in an effort to make the yaml files a bit easier to read).
ee458d8 to
8101442
Compare
This uses # Dot for single crate in workspace to test.
CRATES=(".")I'm not sure how you'd like me to improve on that, but it does introduce the same maintenance burden that we are trying to eliminate with rust-bitcoin/rust-bitcoin#3201 |
storopoli
left a comment
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 8101442
justfile
Outdated
| cargo clippy --all-targets --all-features -- --deny warnings | ||
| cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings | ||
|
|
||
| # Run cargo fmt |
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.
All of the others have . at the end
| # Run cargo fmt | |
| # Run cargo fmt. |
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.
Fixed, thanks.
justfile
Outdated
| fmt: | ||
| cargo +$(cat ./nightly-version) fmt --all | ||
|
|
||
| # Check the formatting |
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.
| # Check the formatting | |
| # Check the formatting. |
520b1dc to
7402490
Compare
storopoli
left a comment
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 7402490
d600a6c Feature gate the Keypair::FromStr impl (Tobin C. Harding) Pull request description: Currently we are panicing if neither `global-context` or `alloc` features are enabled. We do not need to do so, we can just disable the whole impl of `FromStr`. This was pulled out of #699. ACKs for top commit: apoelstra: ACK d600a6c successfully ran local tests Kixunil: ACK d600a6c Tree-SHA512: 940bec95ce732b4bc482e23da114cb03b767780f93777621c9d0985d1288e36756bdf6f050172eac00f89b6f39aa0efdb30cc77425b6f87505659c8c012981ca
|
In 7402490 The |
Re-write CI using the new maintainer tools script. A few things to note: - Put sanitizer and wasm jobs in their own scripts - Utilize `extra_tests.sh` for additional feature combos - We are exceeding the 20 job limit, see the README Unless I'm made a mistake this shouldn't reduce the test coverage in any way.
7402490 to
aee0cfc
Compare
|
Ah yes, thanks. I used the just merged rust-bitcoin/rust-bitcoin-maintainer-tools#13 |
|
And it appears to work - WIN! |
storopoli
left a comment
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 aee0cfc
apoelstra
left a comment
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 aee0cfc successfully ran local tests
…tools
aee0cfcbf96791f7d97065688e1ef59fa75992cc CI: Re-write using maintainer tools (Tobin C. Harding)
89facea27f2c85f89c3149ffba8f0e5a1729cfb3 Rewrite cross to use dtolnay runner (Tobin C. Harding)
06689433304ec573340074e7b177ae86f86033c0 CI: Remove cross job (Tobin C. Harding)
Pull request description:
Patch 1 is now on its own in #728
Re-write CI using the new maintainer tools script. A few things to note:
- Currently we have `Cross` job in `rust.yaml` as well as `cross.yaml`, remove the one in `rust.yaml`.
- Put sanitizer and wasm jobs in their own scripts
- Utilize `extra_tests.sh` for additional feature combos
- We are exceeding the 20 job limit, see the README
Unless I'm made a mistake this shouldn't reduce the test coverage in any way (except sanitizer mentioned below).
I commented out the MSAN stuff same as we did in `hashes`. I'm not sure what is the status of that but it seems to be failing still - did not look into it.
Please note, I do not know _why_ the xargo stuff is run from in the ASAN job currently, but this PR keep it that way - adding it to the `sanitizer.sh` script.
ACKs for top commit:
storopoli:
ACK aee0cfcbf96791f7d97065688e1ef59fa75992cc
apoelstra:
ACK aee0cfcbf96791f7d97065688e1ef59fa75992cc successfully ran local tests
Tree-SHA512: ab828c19c9189bb3af7e517deafca1adf606d3e9db81a890b12125bb9923b6f9f3b8e2ab7afc538aa58aa62958e38f07e6418ccfa985c06595a1b6dbeca247b6
…tools
aee0cfcbf96791f7d97065688e1ef59fa75992cc CI: Re-write using maintainer tools (Tobin C. Harding)
89facea27f2c85f89c3149ffba8f0e5a1729cfb3 Rewrite cross to use dtolnay runner (Tobin C. Harding)
06689433304ec573340074e7b177ae86f86033c0 CI: Remove cross job (Tobin C. Harding)
Pull request description:
Patch 1 is now on its own in #728
Re-write CI using the new maintainer tools script. A few things to note:
- Currently we have `Cross` job in `rust.yaml` as well as `cross.yaml`, remove the one in `rust.yaml`.
- Put sanitizer and wasm jobs in their own scripts
- Utilize `extra_tests.sh` for additional feature combos
- We are exceeding the 20 job limit, see the README
Unless I'm made a mistake this shouldn't reduce the test coverage in any way (except sanitizer mentioned below).
I commented out the MSAN stuff same as we did in `hashes`. I'm not sure what is the status of that but it seems to be failing still - did not look into it.
Please note, I do not know _why_ the xargo stuff is run from in the ASAN job currently, but this PR keep it that way - adding it to the `sanitizer.sh` script.
ACKs for top commit:
storopoli:
ACK aee0cfcbf96791f7d97065688e1ef59fa75992cc
apoelstra:
ACK aee0cfcbf96791f7d97065688e1ef59fa75992cc successfully ran local tests
Tree-SHA512: ab828c19c9189bb3af7e517deafca1adf606d3e9db81a890b12125bb9923b6f9f3b8e2ab7afc538aa58aa62958e38f07e6418ccfa985c06595a1b6dbeca247b6
Patch 1 is now on its own in #728
Re-write CI using the new maintainer tools script. A few things to note:
Crossjob inrust.yamlas well ascross.yaml, remove the one inrust.yaml.extra_tests.shfor additional feature combosUnless I'm made a mistake this shouldn't reduce the test coverage in any way (except sanitizer mentioned below).
I commented out the MSAN stuff same as we did in
hashes. I'm not sure what is the status of that but it seems to be failing still - did not look into it.Please note, I do not know why the xargo stuff is run from in the ASAN job currently, but this PR keep it that way - adding it to the
sanitizer.shscript.