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

Manually merged
github merged 2 commits from gh-pr/77/head into gh-pr/77/base 2026-11-26 03:43:18 +00:00
Owner

@⁠lcg007xd-c on GitHub · 2026-11-25 21:55 UTC · original
lcg007xd-c:feat/xtask-ci → main · +179 −2 · 4 files · 2 commits · merged 2026-11-25 23:02 UTC

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

**@⁠lcg007xd-c** on GitHub · 2026-11-25 21:55 UTC · [original](https://github.com/uiliannn/VItoriaBr/pull/77) `lcg007xd-c:feat/xtask-ci` → `main` · +179 −2 · 4 files · 2 commits · merged 2026-11-25 23:02 UTC ## 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)
On Windows: the check job (workspace clippy, with and without all
features, and the workspace tests). Elsewhere: the portable job's clippy
and tests, then the workspace type-checked for x86_64-pc-windows-msvc
(clippy, no linking), so a Windows-only lint is found before a push
instead of by CI. blake3's build script wants MSVC's assembler for that
target; with CARGO_FEATURE_PURE=1 it builds its portable code, which is
all a type-check needs. --no-windows-check leaves that step out.

A test keeps the portable crate list in step with the workflow's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:43:16 +00:00
github manually merged commit b0a00b8c32 into gh-pr/77/base 2026-11-26 03:43:18 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.