CI on Linux: build, clippy without warnings, native tests #46

Manually merged
github merged 8 commits from github-bot/gh-46 into gh-pr/46/base 2026-12-01 09:05:21 +00:00 AGit
Owner

@⁠Mhyster on GitHub · 2026-12-01 03:59 UTC · original
Mhyster:ci-linux → main · +784 −580 · 105 files · 8 commits · merged 2026-12-01 09:03 UTC

Closes the TASKS.md item "Continuous integration on Linux". Pairs with #45 (a vkback test that fails about 1 run in 7 without it; independent otherwise).

What

  • .github/workflows/ci.yml (ubuntu-24.04, no GPU): tools/build.sh (the PE via cargo-xwin with diagnostics, vkback-unix, vk-store, translate-dir, rect-gs), clippy with -D warnings in all five workspaces, and the native tests (victory-shader, victory-formats, victory-core, xtask, umem, frame, vkback lib + policy).
  • Zero clippy warnings in every workspace (~300, most in greenfield, which had no lint table). greenfield and greenfield/wine now carry a copy of the root's [workspace.lints.clippy]; xtask's new lint_tables_match test fails when the copies drift (rule 3).
  • TASKS.md: the item moves to "Recently done".

Fixes are clippy's own except where they would change behaviour:

  • valu_tests.rs: clippy wants !(a < b) && !(a > b) style comparisons simplified; that changes the result for NaN, which the v_cmp_n*/v_cmp_lg reference depends on. Kept, with an allow and a comment saying why (rule 29, "suspicious but correct").
  • Code that is only dead on the native side (cfg(windows) users) got cfg/cfg_attr instead of being renamed or removed.
  • Removed: vkback's dummy_buf (always None), warm_step's unread started, xlate.rs's unused background(), unsafe blocks around safe code.
  • D3D12-path state the vkback route never reads is marked allow(dead_code) with a pointer to TASKS.md "Slim victory-gpu" rather than deleted here (its own topic).

Verification (rule 27)

Every step of ci.yml run locally on this branch, rebased on current main (73ee0ab, after #19-#34; the last commit fixes the two warnings those brought: a doc comment #34 left without its function, and an if clippy collapses), and on this branch merged with the three other open PRs of this series: all pass. The tests need no Vulkan driver (checked with the loader pointed at none). No Vulkan validation run (rule 30): the Vulkan calls and SPIR-V stay the same; the only removed state (dummy_buf) was never set.

The PE side is linted with --all-features only: without diagnostics, victory-gpu does not build (already TASKS.md "The renderer outside diagnostics").

Findings outside this change, reported separately (rule 29): #40, #41.

🤖 Generated with Claude Code

**@⁠Mhyster** on GitHub · 2026-12-01 03:59 UTC · [original](https://github.com/vktory6/VKtory/pull/46) `Mhyster:ci-linux` → `main` · +784 −580 · 105 files · 8 commits · merged 2026-12-01 09:03 UTC Closes the TASKS.md item "Continuous integration on Linux". Pairs with #45 (a vkback test that fails about 1 run in 7 without it; independent otherwise). ## What - `.github/workflows/ci.yml` (ubuntu-24.04, no GPU): `tools/build.sh` (the PE via cargo-xwin with `diagnostics`, vkback-unix, vk-store, translate-dir, rect-gs), clippy with `-D warnings` in all five workspaces, and the native tests (victory-shader, victory-formats, victory-core, xtask, umem, frame, vkback lib + policy). - Zero clippy warnings in every workspace (~300, most in greenfield, which had no lint table). greenfield and greenfield/wine now carry a copy of the root's `[workspace.lints.clippy]`; xtask's new `lint_tables_match` test fails when the copies drift (rule 3). - TASKS.md: the item moves to "Recently done". Fixes are clippy's own except where they would change behaviour: - `valu_tests.rs`: clippy wants `!(a < b) && !(a > b)` style comparisons simplified; that changes the result for NaN, which the v_cmp_n*/v_cmp_lg reference depends on. Kept, with an allow and a comment saying why (rule 29, "suspicious but correct"). - Code that is only dead on the native side (cfg(windows) users) got `cfg`/`cfg_attr` instead of being renamed or removed. - Removed: vkback's `dummy_buf` (always `None`), `warm_step`'s unread `started`, xlate.rs's unused `background()`, unsafe blocks around safe code. - D3D12-path state the vkback route never reads is marked `allow(dead_code)` with a pointer to TASKS.md "Slim victory-gpu" rather than deleted here (its own topic). ## Verification (rule 27) Every step of ci.yml run locally on this branch, rebased on current main (73ee0ab, after #19-#34; the last commit fixes the two warnings those brought: a doc comment #34 left without its function, and an `if` clippy collapses), and on this branch merged with the three other open PRs of this series: all pass. The tests need no Vulkan driver (checked with the loader pointed at none). No Vulkan validation run (rule 30): the Vulkan calls and SPIR-V stay the same; the only removed state (`dummy_buf`) was never set. The PE side is linted with `--all-features` only: without `diagnostics`, victory-gpu does not build (already TASKS.md "The renderer outside diagnostics"). Findings outside this change, reported separately (rule 29): #40, #41. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The greenfield and wine workspaces had no lint table, so lints the root
workspace lets through on purpose (type_complexity, chunks_exact_to_as_chunks,
...) warned there: 218 + 26 warnings, of which 40 + 1 were those. The clippy
table is copied; the rustc lints are not yet (see the comment).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fixes clippy could make itself (collapsed ifs as let chains, std helpers for
hand-written ones, needless borrows, ...), then by hand:

- vkback layout.rs: `f & 0x180 == 0x80 || f & 0x180 == 0x80` repeated its
  operand; D3D12 reduction type 1 (0x80) is the comparison filter, one test.
- victory-shader valu_tests/bvh: the negated float compares stay; v_cmp_n* is
  "not (a op b)", true on NaN. double_comparisons' `a < b || a > b` -> `a != b`
  would turn v_cmp_lg true on NaN, so it is allowed at the site with the reason.
- victory-shader emit tests: names only the Windows validator reads are
  cfg(windows) or allowed off Windows (clippy --fix on Linux removed them and
  broke the Windows build).
- vkback: two unsafe blocks with no unsafe operation and two nested ones
  removed; `dummy_buf` (only ever None) and `Translator::background` (no caller)
  removed; `warm_step`'s `started` counted what pf_count counts and was unread.
- umem: `Switch::set` returns Option (its error carried nothing).
- umem sparse_speed: the commit that backs the read window is held by one
  binding from the match instead of a deferred assignment.
- too_many_arguments allowed per function, as at the 25 existing sites.
- victory-gpu: D3D12-path state the vkback route never reads is allowed as
  dead code, pointing at ROADMAP "Slim victory-gpu". ab.rs `seconds` is marked
  FIXME: nothing advances VICTORY_AB's phases (see ROADMAP).

Formatting: clippy --fix leaves collapsed chains at their old depth; those were
re-indented to rustfmt's layout. Files were not run through rustfmt as a whole
(most are not rustfmt-clean upstream).

Checked: cargo xwin clippy --workspace --all-targets --all-features (PE), the
native root crates, greenfield, greenfield/wine and translate, all with
-D warnings; tests of victory-shader, victory-formats, victory-core, xtask,
umem, frame, vkback (lib + policy) pass as before (305 + 169 + 6).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
greenfield/Cargo.toml and greenfield/wine/Cargo.toml carry copies of the root's
[workspace.lints.clippy] (a workspace reads only its own). The test compares
their settings, comments and blank lines aside, and fails on a difference
(rule 3: a copied fact needs a check).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
.github/workflows/ci.yml (ubuntu-24.04, no GPU), as TASKS.md "Continuous
integration on Linux" asks:
- tools/build.sh, the same build a run uses (PE via cargo-xwin with
  diagnostics, vkback-unix, vk-store, translate-dir, rect-gs);
- clippy -D warnings in all five workspaces (PE side with --all-features: the
  build without diagnostics does not compile, TASKS.md "The renderer outside
  diagnostics");
- the native tests: victory-shader, victory-formats, victory-core, xtask (asset
  policy, lint tables), umem, frame, vkback lib + policy. They pass with no
  Vulkan driver at all (checked with the loader pointed at no driver).

The item moves to "Recently done".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A doc comment left without its function (#34), an if that can be collapsed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 04:00:25 +00:00
github-bot changed target branch from main to gh-pr/46/base 2026-12-01 09:05:19 +00:00
github manually merged commit c1a916cceb into gh-pr/46/base 2026-12-01 09:05:21 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 09:03 UTC · original

Merged, thanks! This closes the CI task, and the lint-table check keeps the three workspaces from drifting apart.

What I did on the branch, as merge commits (no force-push):

  • Main merged in twice: today brought 14 PRs. The only conflict was ab.rs, which #53 deleted.
  • One new warning fixed: the unused st in #22's lane_loop_tests.rs. I also removed the leftover let _all = vk::ShaderStageFlags::ALL; in vkback's lib.rs instead of keeping an underscored binding (rule 33).
  • Every step of ci.yml run locally on the final tree: the PE clippy with all features, clippy in the root, greenfield, wine and translate workspaces, and the native tests. All clean. The house-scene validation run on the reference system shows no new error.

From now on, PRs get these checks on GitHub before we look at them.

**@⁠vktory6** on GitHub · 2026-12-01 09:03 UTC · [original](https://github.com/vktory6/VKtory/pull/46#issuecomment-7306155091) Merged, thanks! This closes the CI task, and the lint-table check keeps the three workspaces from drifting apart. What I did on the branch, as merge commits (no force-push): - **Main merged in twice:** today brought 14 PRs. The only conflict was `ab.rs`, which #53 deleted. - **One new warning fixed:** the unused `st` in #22's `lane_loop_tests.rs`. I also removed the leftover `let _all = vk::ShaderStageFlags::ALL;` in vkback's `lib.rs` instead of keeping an underscored binding (rule 33). - **Every step of `ci.yml` run locally** on the final tree: the PE clippy with all features, clippy in the root, greenfield, wine and translate workspaces, and the native tests. All clean. The house-scene validation run on the reference system shows no new error. From now on, PRs get these checks on GitHub before we look at them.
This discussion has been locked. Commenting is limited to contributors.
No description provided.