-
Notifications
You must be signed in to change notification settings - Fork 267
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
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
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
@@ -996,6 +996,7 @@ impl str::FromStr for Keypair { | |||
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).
@@ -37,20 +37,16 @@ jobs: | |||
- x86_64-unknown-linux-musl | |||
# - x86_64-unknown-netbsd # error in tests "error: test failed, to rerun pass '--lib'", disabled for now | |||
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. |
Kix is away till Monday he told me, there is no rush on this one anyways. |
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 bdb8bc3
Will try to review the last commit tomorrow.
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 |
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
|
||
# Run cargo fmt | ||
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
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! |
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
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
Patch 1 is now on its own in #728
Re-write CI using the new maintainer tools script. A few things to note:
Cross
job inrust.yaml
as well ascross.yaml
, remove the one inrust.yaml
.extra_tests.sh
for 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.sh
script.