xtask: cargo xtask ci runs the CI workflow's steps locally (incl. a Windows type-check from Linux) #77

Merged
lcg007xd-c merged 2 commits from upstream-pr/77 into main 2026-11-25 23:02:04 +00:00
lcg007xd-c commented 2026-11-25 21:55:06 +00:00 (Migrated from github.com)

Imported from uiliannn/VItoriaBr. Originally posted by lcg007xd-c on 2026-11-25T21:55:06Z.


What

cargo xtask ci runs, on your machine, the same commands the CI workflow runs.

  • On Windows: the check job. That is workspace clippy (plain and --all-features) and the workspace tests.
  • Elsewhere: the portable job's clippy and tests, then the whole workspace type-checked for x86_64-pc-windows-msvc with clippy, plain and --all-features. This only type-checks, nothing is linked. So a Windows-only lint shows up before a push, not on CI. --no-windows-check leaves that part out.
  • blake3: its build script wants MSVC's assembler for the Windows target. With CARGO_FEATURE_PURE=1 it builds its portable Rust code instead, which is all a type-check needs, so the Windows check runs from Linux without MSVC.

A test reads .github/workflows/ci.yml and checks that its PORTABLE list matches the one cargo xtask ci uses, so the two can't drift apart.

Why

Main's Windows job went red today on a clippy lint that only the Windows build sees (manual_is_multiple_of in victory-gpu/src/texture.rs, since fixed in 2b33e08). From Linux, cargo xtask ci stopped at exactly that error on the commit before the fix, and with the fix every step passes.

Tests

  • cargo test -p xtask: the new portable_list_matches_the_workflow and steps_follow_the_jobs tests, plus the existing policy tests.
  • A full run of cargo xtask ci on Linux, both before the lint fix (it fails at that lint, as it should) and with the fix (all steps pass).

Not tested: running it on a Windows host, where it takes the check job's path. The steps there are the workflow's own commands.

🤖 Generated with Claude Code

<!-- greyfinch-sync:uiliannn/VItoriaBr:issue:6614537956 --> Imported from [uiliannn/VItoriaBr](https://github.com/uiliannn/VItoriaBr/pull/77). Originally posted by [lcg007xd-c](https://github.com/lcg007xd-c) on 2026-11-25T21:55:06Z. --- ## What `cargo xtask ci` runs, on your machine, the same commands the CI workflow runs. - **On Windows:** the `check` job. That is workspace clippy (plain and `--all-features`) and the workspace tests. - **Elsewhere:** the `portable` job's clippy and tests, then the whole workspace type-checked for `x86_64-pc-windows-msvc` with clippy, plain and `--all-features`. This only type-checks, nothing is linked. So a Windows-only lint shows up before a push, not on CI. `--no-windows-check` leaves that part out. - **blake3:** its build script wants MSVC's assembler for the Windows target. With `CARGO_FEATURE_PURE=1` it builds its portable Rust code instead, which is all a type-check needs, so the Windows check runs from Linux without MSVC. A test reads `.github/workflows/ci.yml` and checks that its `PORTABLE` list matches the one `cargo xtask ci` uses, so the two can't drift apart. ## Why Main's Windows job went red today on a clippy lint that only the Windows build sees (`manual_is_multiple_of` in `victory-gpu/src/texture.rs`, since fixed in 2b33e08). From Linux, `cargo xtask ci` stopped at exactly that error on the commit before the fix, and with the fix every step passes. ## Tests - `cargo test -p xtask`: the new `portable_list_matches_the_workflow` and `steps_follow_the_jobs` tests, plus the existing policy tests. - A full run of `cargo xtask ci` on Linux, both before the lint fix (it fails at that lint, as it should) and with the fix (all steps pass). Not tested: running it on a Windows host, where it takes the `check` job's path. The steps there are the workflow's own commands. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
uiliannn/VItoriaBr!77
No description provided.