ci: migrate GitHub Actions to cargo rbmt#540
ci: migrate GitHub Actions to cargo rbmt#540satsfy wants to merge 4 commits intorust-bitcoin:masterfrom
Conversation
|
Thanks man, top effort! @nyonson if you get a second could you take a look at this please? |
bitreq/src/url.rs
Outdated
| pub fn as_str(&self) -> &str { &self.serialization } | ||
|
|
||
| /// Returns `true` if the URL scheme is "https" or "wss". | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
I think we currently only use this when
#[cfg(all(feature = "proxy", feature = "std"))]
Please apply the same cfg-gate here rather than allowing dead code.
There was a problem hiding this comment.
Nice, I changed the config gate. But those methods are used in std builds even without proxy. If I remove the proxy it causes CI errors. So I replaced #[allow(dead_code)] with #[cfg(feature = "std")].
bitreq/src/url.rs
Outdated
| /// | ||
| /// The returned string includes the leading `/` (if present) and the `?` | ||
| /// separator (if there's a query string). Returns "/" if the path is empty. | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
Same here, this is only used when std, so please cfg-gate on that rather than allowing dead code.
There was a problem hiding this comment.
Replaced #[allow(dead_code)] with #[cfg(feature = "std")] here too.
| fail-fast: false | ||
| matrix: | ||
| dep: [minimal, recent] | ||
| toolchain: [stable, nightly, msrv] |
There was a problem hiding this comment.
Where is the msrv toolchain defined? While a global MSRV might work out right now, I'm not sure this will always be the case as bitreq's TLS dependencies might for example bump MSRV at some point. Would the entire ecosystem / all crates then fine with bumping MSRV, even if they don't share the same dependencies?
There was a problem hiding this comment.
cc @nyonson, do you remember if [workspace.metadata.rbmt.toolchains] can be overridden with crate-specific config?
There was a problem hiding this comment.
The msrv is implicitly picked up from the rust-version keys in the package manifests. As of today, cargo-rbmt has a limitation where it only works in workspaces with 1 msrv. This can be fixed if needed, just a bit of complexity which hasn't been necessary.
There was a problem hiding this comment.
cc @nyonson, do you remember if [workspace.metadata.rbmt.toolchains] can be overridden with crate-specific config?
I was planning to migrate Floresta to cargo-rbmt soon. This would be handy, since the lib crates probably have lower MSRV than the binary itself.
There was a problem hiding this comment.
Thanks for the discussion. For this PR, this is effectively a no-op. I’m happy to follow up with per-crate msrv support once we need it, or once cargo-rbmt supports it.
There was a problem hiding this comment.
Trackin it over here: https://git.rust-bitcoin.org/rust-bitcoin/rust-bitcoin-maintainer-tools/issues/119
| fail-fast: false | ||
| matrix: | ||
| dep: [minimal, recent] | ||
| toolchain: [stable, nightly, msrv] |
There was a problem hiding this comment.
FWIW I am not sure how valuable testing on the nighlty toolchain is, but doesn't hurt either. Some recent discussion over here: rust-bitcoin/rust-psbt#87 (comment)
There was a problem hiding this comment.
This PR aims to not modify the previous CI job list, which included nightly. I suppose nightly is here as early warning for upcoming compiler or toolchain changes.
| run: | | ||
| ./maintainer-tools/ci/run_task.sh lint | ||
| ./contrib/lint-integtation-tests.sh | ||
| cargo rbmt --lock-file ${{ matrix.dep }} lint \ |
There was a problem hiding this comment.
Just curious for feedback on rbmt, does the fuzz package not play nice here?
There was a problem hiding this comment.
package jsonrpc-fuzz is included and works with rbmt ok from what I've seen.
Add workspace and per-crate rbmt configuration needed to drive the new CI tasks. Record the rbmt toolchain and integration metadata, teach lint about expected duplicate dependencies in selected crates, and remove the old clippy msrv setting now that toolchain metadata lives in rbmt configuration.
|
Just need to fix the lint CI error, otherwise LGTM |
Migrate the GitHub Actions workflow from the maintainer-tools shell entrypoints to cargo rbmt. Read the pinned rbmt version from the repository, consolidate the Stable/Nightly/MSRV test jobs into a single toolchain/lockfile matrix, and scope test and lint runs to the packages that build without a bitcoind version feature. Fix the misspelled lint-integtation-tests.sh script name in the workflow and justfile.
Add `#[cfg(feature = "std")]` to URL helper methods used only in std builds.
Rename contrib/lint-integtation-tests.sh to lint-integration-tests.sh and update the justfile reference to match.
|
Addressed all review comments after the force-pushes and cut a fair amount of LOC. |
Fixes #538
This PR migrates the CI workflow from the maintainer-tools shell entrypoints to cargo rbmt, joins Stable/Nightly/MSRV test jobs into a single toolchain/lockfile matrix and makes the supporting library changes needed for checks to pass cleanly.
Summary:
webpki-rootscfg name in bitreqrust.yamlto cargo rbmtlint-integtation-tests.shtolint-integration-tests.sh