Skip to content

bootstrap: add bootstrap step to run stdarch-gen checks in CI - #156674

Open
xonx4l wants to merge 10 commits into
rust-lang:mainfrom
xonx4l:port-stdarch-gen
Open

bootstrap: add bootstrap step to run stdarch-gen checks in CI#156674
xonx4l wants to merge 10 commits into
rust-lang:mainfrom
xonx4l:port-stdarch-gen

Conversation

@xonx4l

@xonx4l xonx4l commented May 17, 2026

Copy link
Copy Markdown
Contributor

View all comments

This PR ports stdarch-gen checks into the bootstrap test runner as a step, so that we can run the stdarch-gen checks via x.py test.

Changes -:
-> Adds a new StdarchGenCheck bootstrap step.
-> Mirrors https://github.com/rust-lang/stdarch/blob/f71ac102d30d5d1957277cbffc6ba631b67bffd1/.github/workflows/main.yml#L309-L333 (check-stdarch-gen job)
-> stdarch-gen-arm uses a nightly only feature (#![feature(pattern)]) but bootstrap's cargo runs on the beta toolchain thus we set RUSTC_BOOTSTRAP=1 on the child process so it builds.
-> The generators call out to rustfmt to format their output so rustfmt needs to be on PATH. So added bootstrap's rustfmt to PATH before each run. If rustfmt isn't available, the step fails early and tells the user to set rustfmt = true in bootstrap.toml .

r? @Kobzol

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels May 17, 2026
@rustbot

rustbot commented May 17, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented May 26, 2026

Copy link
Copy Markdown
Collaborator

stdarch is developed in its own repository. If possible, consider making this change to rust-lang/stdarch instead.

cc @Amanieu, @folkertdev, @sayantn

@Kobzol Kobzol left a comment

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.

Thank you! I left some comments, the most important one is the question about why things are copied over.

View changes since this review

Comment thread src/bootstrap/src/core/build_steps/test.rs
Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
@rust-bors

This comment has been minimized.

@rustbot

rustbot commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Comment thread src/bootstrap/src/core/build_steps/test.rs Outdated
Comment thread src/bootstrap/src/core/build_steps/test.rs
Comment thread src/bootstrap/src/core/build_steps/test.rs
Comment thread src/bootstrap/src/core/build_steps/test.rs
@Kobzol

Kobzol commented Aug 14, 2026

Copy link
Copy Markdown
Member

@bors try jobs=x86_64-gnu

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 14, 2026
bootstrap: add bootstrap step to run stdarch-gen checks in CI


try-job: x86_64-gnu
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2026
@rust-bors

rust-bors Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

💔 Test for bb3dc02 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Kobzol

Kobzol commented Aug 15, 2026

Copy link
Copy Markdown
Member

@bors try jobs=x86_64-gnu

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 15, 2026
bootstrap: add bootstrap step to run stdarch-gen checks in CI


try-job: x86_64-gnu
@rust-bors

rust-bors Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 397f471 (397f471d92c294d6660a9fc4392f5a6fa1cef566)
Base parent: b4116af (b4116af55fbe359273e2af9e5846a334606d9d6d)

@Kobzol Kobzol left a comment

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.

Thank you! Left one more comment, otherwise LGTM.

@bors delegate

View changes since this review

}
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]

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.

Could you please add a comment on top of this struct, to briefly explain what these tests do? Thanks!

@rust-bors

rust-bors Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

✌️ @xonx4l, you can now approve this pull request!

If @Kobzol told you to "r=me" after making some further change, then please make that change and post @bors r=Kobzol.

View changes since this delegation.

@xonx4l

xonx4l commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

@bors r=Kobzol

@rust-bors

rust-bors Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b2e0185 has been approved by Kobzol

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 16, 2026
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 16, 2026
bootstrap: add bootstrap step to run stdarch-gen checks in CI

This PR ports stdarch-gen checks into the bootstrap test runner as a step, so that we can run the stdarch-gen checks via x.py test.

Changes -:
-> Adds a new `StdarchGenCheck` bootstrap step.
-> Mirrors `https://github.com/rust-lang/stdarch/blob/f71ac102d30d5d1957277cbffc6ba631b67bffd1/.github/workflows/main.yml#L309-L333` (check-stdarch-gen job)
-> `stdarch-gen-arm` uses a nightly only feature (`#![feature(pattern)]`) but bootstrap's cargo runs on the beta toolchain thus we set `RUSTC_BOOTSTRAP=1` on the child process so it builds.
-> The generators call out to `rustfmt` to format their output so `rustfmt` needs to be on `PATH`. So added bootstrap's rustfmt  to `PATH` before each run. If rustfmt isn't available, the step fails early and tells the user to set `rustfmt = true` in `bootstrap.toml` .

r? @Kobzol
rust-bors Bot pushed a commit that referenced this pull request Aug 16, 2026
Rollup of 12 pull requests

Successful merges:

 - #160529 (Upgrade and deduplicate dependencies)
 - #161017 (Library: enforce clippy deref lints in CI)
 - #156674 (bootstrap: add bootstrap step to run stdarch-gen checks in CI)
 - #161006 ([CI] Build newer `binutils` before building `gcc`)
 - #161141 (Add documentation for BPF targets)
 - #161157 (bootstrap: Move several items out of the crate root)
 - #161053 (Add regression test for borrow of array drop type in const)
 - #161073 (Add regression test for path printing with infinitely many visible names)
 - #161099 (Add regression test for unstable def_ident_span fingerprint with incremental recompilation)
 - #161146 (Switch to c8a EC2 runner for auto merges)
 - #161148 ([rustdoc] Put back one removed flaky GUI test (which hopefully isn't flaky anymore))
 - #161150 (add crashtests [4/N])
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 16, 2026
bootstrap: add bootstrap step to run stdarch-gen checks in CI

This PR ports stdarch-gen checks into the bootstrap test runner as a step, so that we can run the stdarch-gen checks via x.py test.

Changes -:
-> Adds a new `StdarchGenCheck` bootstrap step.
-> Mirrors `https://github.com/rust-lang/stdarch/blob/f71ac102d30d5d1957277cbffc6ba631b67bffd1/.github/workflows/main.yml#L309-L333` (check-stdarch-gen job)
-> `stdarch-gen-arm` uses a nightly only feature (`#![feature(pattern)]`) but bootstrap's cargo runs on the beta toolchain thus we set `RUSTC_BOOTSTRAP=1` on the child process so it builds.
-> The generators call out to `rustfmt` to format their output so `rustfmt` needs to be on `PATH`. So added bootstrap's rustfmt  to `PATH` before each run. If rustfmt isn't available, the step fails early and tells the user to set `rustfmt = true` in `bootstrap.toml` .

r? @Kobzol
rust-bors Bot pushed a commit that referenced this pull request Aug 16, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #160529 (Upgrade and deduplicate dependencies)
 - #161017 (Library: enforce clippy deref lints in CI)
 - #156674 (bootstrap: add bootstrap step to run stdarch-gen checks in CI)
 - #161006 ([CI] Build newer `binutils` before building `gcc`)
 - #161141 (Add documentation for BPF targets)
 - #161157 (bootstrap: Move several items out of the crate root)
 - #161053 (Add regression test for borrow of array drop type in const)
 - #161073 (Add regression test for path printing with infinitely many visible names)
 - #161099 (Add regression test for unstable def_ident_span fingerprint with incremental recompilation)
 - #161103 (cleanup: rip out unnecessary `iter().last()` and `iter().next()`)
 - #161146 (Switch to c8a EC2 runner for auto merges)
 - #161148 ([rustdoc] Put back one removed flaky GUI test (which hopefully isn't flaky anymore))
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #161179 (comment)

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 16, 2026
@rust-bors

rust-bors Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#161179), which was unapproved.

View changes since this unapproval

@Kobzol

Kobzol commented Aug 16, 2026

Copy link
Copy Markdown
Member

Hmm, I wonder if we should only do the check on Linux. It would be nice to improve the error message to show the actual diff of what changed, rather than saying that the diff is not clean.

Could you please check what is different there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants