Fix Rust release workflow toolchain#314
Closed
vinitkumar wants to merge 1 commit into
Closed
Conversation
Contributor
Reviewer's GuidePins the Rust toolchain version (1.96.0) across Rust wheel build and CI workflows, ensures those workflows install that toolchain explicitly before builds/tests, aligns CI tests with the default cargo test invocation, and documents the behavior in the architecture docs. Flow diagram for pinned Rust toolchain in CI and release workflowsflowchart TD
subgraph Release_Workflow
REnv[Set env RUST_VERSION=1.96.0]
RInstall[Install Rust using setup-rust-toolchain with toolchain=RUST_VERSION]
RMaturin[Run maturin-action Build wheels]
REnv --> RInstall --> RMaturin
end
subgraph CI_Workflow
CIEnv[Set env RUST_VERSION=1.96.0]
CIInstallLint[Install Rust with toolchain=RUST_VERSION and components rustfmt, clippy]
CILint[Run cargo fmt and cargo clippy]
CIInstallTest[Install Rust with toolchain=RUST_VERSION]
CITest[Run cargo test]
CIEnv --> CIInstallLint --> CILint
CIEnv --> CIInstallTest --> CITest
end
REnv -. shares RUST_VERSION .- CIEnv
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The Rust toolchain installation step is duplicated several times in
build-rust-wheels.yml; consider extracting it into a reusable YAML anchor or composite action to keep the workflow DRY and easier to update when the toolchain changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Rust toolchain installation step is duplicated several times in `build-rust-wheels.yml`; consider extracting it into a reusable YAML anchor or composite action to keep the workflow DRY and easier to update when the toolchain changes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo testpathWhy
The
rust-v0.3.0release workflow failed because GitHub-hosted runners defaulted to rustc 1.95.0, whilejson2xml_rs0.3.0 correctly requires rustc 1.96. The release workflow needs to install the crate's pinned toolchain before maturin builds wheels.Validation
cargo fmt --checkcargo test: 46 passedlat check: passedSummary by Sourcery
Pin the Rust toolchain version in CI and release workflows to ensure consistent builds and tests with the crate’s required compiler version.
Build:
CI:
cargo test.Documentation: