Skip to content

ci: migrate GitHub Actions to cargo rbmt#540

Open
satsfy wants to merge 4 commits intorust-bitcoin:masterfrom
satsfy:rbmt-migration
Open

ci: migrate GitHub Actions to cargo rbmt#540
satsfy wants to merge 4 commits intorust-bitcoin:masterfrom
satsfy:rbmt-migration

Conversation

@satsfy
Copy link
Copy Markdown
Contributor

@satsfy satsfy commented Apr 7, 2026

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:

  • gate async TLS code on the async feature in bitreq
  • fix the webpki-roots cfg name in bitreq
  • add workspace and per-crate rbmt metadata
  • migrate rust.yaml to cargo rbmt
  • rename lint-integtation-tests.sh to lint-integration-tests.sh

tcharding
tcharding previously approved these changes Apr 8, 2026
Copy link
Copy Markdown
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1ddbb2b

@tcharding
Copy link
Copy Markdown
Member

Thanks man, top effort! @nyonson if you get a second could you take a look at this please?

pub fn as_str(&self) -> &str { &self.serialization }

/// Returns `true` if the URL scheme is "https" or "wss".
#[allow(dead_code)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")].

///
/// 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)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, this is only used when std, so please cfg-gate on that rather than allowing dead code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced #[allow(dead_code)] with #[cfg(feature = "std")] here too.

fail-fast: false
matrix:
dep: [minimal, recent]
toolchain: [stable, nightly, msrv]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @nyonson, do you remember if [workspace.metadata.rbmt.toolchains] can be overridden with crate-specific config?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

satsfy added a commit to satsfy/corepc that referenced this pull request Apr 9, 2026
satsfy added a commit to satsfy/corepc that referenced this pull request Apr 9, 2026
satsfy added a commit to satsfy/corepc that referenced this pull request Apr 9, 2026
fail-fast: false
matrix:
dep: [minimal, recent]
toolchain: [stable, nightly, msrv]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Contributor Author

@satsfy satsfy Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious for feedback on rbmt, does the fuzz package not play nice here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package jsonrpc-fuzz is included and works with rbmt ok from what I've seen.

Copy link
Copy Markdown
Contributor

@nyonson nyonson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK: fff9fcf

rbmt stuff looks good to me! I don't have context on the other stuff.

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.
@luisschwab
Copy link
Copy Markdown

Just need to fix the lint CI error, otherwise LGTM

satsfy added 3 commits April 9, 2026 15:05
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.
@satsfy
Copy link
Copy Markdown
Contributor Author

satsfy commented Apr 9, 2026

Addressed all review comments after the force-pushes and cut a fair amount of LOC.

@satsfy satsfy requested review from luisschwab and tcharding April 9, 2026 18:59
@satsfy satsfy requested a review from tnull April 9, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move CI to cargo-rbmt

5 participants