Repository navigation
Linux/Wine testing: interim Linux CI subset; skip load_probe cargo build under Wine - #232
SkippySteve wants to merge 77 commits into
Conversation
The test builds its fixture by running the cargo that built it. A test exe cross-built on Linux and run by Wine or Proton cannot start that host program (Invalid handle), so the test failed for a reason that has nothing to do with the loader. Under Wine it now skips with a message, unless VICTORY_HLE_PROBE_DLL names a prebuilt hle_probe.dll, which it loads instead (on Windows too).
Lint victory-core, -pe, -formats, -pipeline, -game, -loader and xtask with clippy -D warnings on all targets, and victory-shader's library. Run the tests of all of them plus victory-shader, skipping only the seven pe/loader tests that parse their own test binary as a PE image (an ELF on Linux). Those skips become no-ops once the tests are cfg(windows). Use --locked, cancel superseded runs and cap the job at 30 minutes.
…uilt-DLL error Adds a windows-target-check job: cargo check of the whole workspace (all targets) for x86_64-pc-windows-msvc, and clippy -D warnings for the crates that are clean on that target. No MSVC or linking; blake3 is told to use its pure-Rust path. load_probe now ignores an empty VICTORY_HLE_PROBE_DLL and, when the path is not a file, says so and points at the Z: form Wine needs.
A CARGO_BUILD_TARGET or build.target from the environment or a user config moved the nested build's output under a triple directory, and the test then failed reading a path that did not exist. Name the target explicitly, build --locked like CI, and say which file is missing if the build succeeds without producing it.
Its non-test targets are clippy-clean on that target; one test in host.rs is not yet, so lint lib/bins/examples rather than --all-targets.
Both tests copied a hard-coded C:\Windows\System32\version.dll as their stand-in title DLL, so they failed with a bare unwrap on a Windows install not on C:. Build the path from SystemRoot (falling back to C:\Windows) and name both paths if the copy fails.
…report all test failures
victory-hle and apps/victory are type-checked for Windows but no clippy step covers them yet, so rustc warnings there (unused imports, dead code) went unnoticed. RUSTFLAGS=-D warnings for the whole job makes every step fail on them; one job-wide value keeps a single shared build.
Only main saves the rust-cache, so cancelling a superseded main run left PRs restoring a stale cache; cancel only superseded PR runs. The hle-probe fixture is outside the workspace and rustfmt-clean today; check it so it stays that way.
victory-core, victory-pe, victory-pipeline, victory-game, victory-shader, victory and xtask are rustfmt-clean on main, as is load_probe.rs; check them so they stay that way. victory-formats, victory-loader, victory-gpu and victory-hle are not clean yet and are left out until they are.
The fixture went to <workspace>/target/fixtures regardless of CARGO_TARGET_DIR or build.target-dir, so a build with a relocated target dir still wrote into the source tree. CARGO_TARGET_TMPDIR (set by cargo for integration tests) lives under the configured target dir. Also fix the example path in the prebuilt-DLL error: the documented `cargo xwin build --manifest-path tests/fixtures/hle-probe/Cargo.toml` writes to the fixture's own target dir, not target/fixtures.
|
Thanks @SkippySteve for the Wine-aware loader test and Linux subset. I tested the open PR at head All checks passed. The Windows-gated Code: load_probe.rs, linux-subset.yml. |
actionlint catches context and expression typos, unknown keys and, via the runner's shellcheck, mistakes in run: scripts, none of which a YAML parse finds. SC2086 is ignored: the *_CRATES lists are split on purpose.
The Linux rustdoc step never documents cfg(windows) items, so broken or private intra-doc links in victory-hle, apps/victory's host and the hle-probe fixture went unchecked. Document them for x86_64-pc-windows-msvc with RUSTDOCFLAGS=-D warnings in windows-target-check (no linking). victory-shader is doc-clean on Linux but not for Windows (a Windows-only module links a private item), so it is left out here for now.
…back on its step The rustdoc steps now pass --document-private-items, so broken intra-doc links in private items' doc comments fail CI as well; private_intra_doc_links still fires. All crates in RUSTDOC_CRATES and WINDOWS_RUSTDOC_CRATES, and the hle-probe fixture, are already clean this way. The Windows rustdoc step had been inserted between the hle-probe rustfmt step and its comment; move the comment back.
…targets Their module docs linked private items (container::hash, the draw module, shader_cache's encode/decode), which rustdoc rejects in public docs; name them as code instead.
…P test's unsafe query
…s unsafe calls The fixture is outside the workspace, so it never inherited [workspace.lints] (undocumented_unsafe_blocks, unsafe_op_in_unsafe_fn, unused_must_use) and CI's fixture clippy step ran with defaults only. Repeat the lints in its Cargo.toml and document its seven FFI calls.
…in tracked text files
…ons, reserved names or characters)
…not hide a missing dependency feature Every build step compiles its crates together, so a crate that uses a dependency feature (a windows-sys Win32_* module, say) without enabling it still builds while a sibling enables it. Check each crate alone, with default and all of its own features, on Linux and for the Windows target.
…elease or a workspace member Reads Cargo.lock and the hle-probe fixture's lock with tomllib, without the network: git sources, other registries, path packages outside the workspace and missing checksums fail, as do [patch]/[replace] in the manifests and [patch]/[source]/[registries] in .cargo/config.toml.
… test writes there
… CARGO_NET_OFFLINE
…g assertions or overflow checks
…rustup and the tests' own settings need
…t that is neither run nor listed as needing outside data The cargo test step's user-id check also reads the namespaced id into a variable first, so ShellCheck's SC2312 (masked return value in a command substitution) no longer fails the actionlint step.
… a non-ASCII letter
|
@catminou4, the Wine loader tests are a separable part of this PR. I checked the current diffs: #235 and #523 overlap on Linux portability, but neither changes Bruce ran the Win64 test under Wine at The four commits from that test head through We also applied just the loader test and fixture changes to main |
The hermetic release cargo test pass now runs with --test-threads 1 so order-sensitive tests cannot pass only under parallel harness timing. The msrv job gets the same checkout-unchanged step as the other jobs so an MSRV check or build script cannot leave scratch in the tree unnoticed. Co-authored-by: Cursor <cursoragent@cursor.com>
Hermetic cargo test now keeps LC_ALL=C through env -i so libc behaviour is not tied to the runner's UTF-8 LANG. The IGNORED_HERMETIC/EXTERNAL inventory runs for the default and all-features passes too, not only release and diag. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Combo verdict at the current heads (AI-assisted; Arch Linux kernel 7.3.5, rustc 1.98.1 pinned, exit-code judged): #232 @ |
… load_probe cargo build under Wine
|
Automated triage for the maintainers. Needs work: needs the maintainer's decision. This PR changes CI: it edits To make that decision easier: VIctory builds and tests on Windows only, so please explain in the description what a Linux subset run catches that the Windows CI misses. It would also help to split the locale, umask, HOME/TMPDIR and network-isolation hardening into separate, smaller PRs. Generated by Claude Code |
Linux CI subset plus a Wine/Proton fix for the one loader test that can't run there. Both are about running the test suite off Windows. Absorbs #227.
Part 1: Linux CI subset
Adds a GitHub Actions job on
ubuntu-latest(toolchain pinned byrust-toolchain.toml) for the crates that already build on Linux on currentmain, so Linux regressions in them are caught now rather than after the full workspace builds there. No Windows SDK, no cross target, no game data.What it runs
cargo xtask policycargo clippy --all-targets -- -D warningsforvictory-core,victory-pe,victory-formats,victory-pipeline,victory-game,victory-loader,xtaskcargo clippy --lib -- -D warningsforvictory-shader(its test module has a helper only the Windows tests use, so the test target is dead code on Linux)cargo testfor all eight of the above, skipping (by exact name) only the 7victory-pe/victory-loadertests that parse their own test binary as a PE image (an ELF on Linux). They still run on Windows.actionlint(with shellcheck) andzizmor(Actions security audit: template injection, permissions, persisted credentials, impostor/vulnerable pinned action commits)--locked, superseded runs on the same ref are cancelled, 30 minute cap.Checklist
-D warningson the Linux-buildable crates (new)victory-pe,victory-loaderandxtasktests now run (were only type-checked / not covered)main(d2a4bae) and onmain+ Build: gate Windows-only paths so the workspace builds and tests on Linux #235: 96 passed, 0 failed, 3 ignored--workspace(follow-up; with Build: gate Windows-only paths so the workspace builds and tests on Linux #235,cargo clippy --workspace --all-targets --exclude victory-shader -- -D warningsis clean andcargo test --workspacegives 162 passed, 0 failed, 3 ignored on Linux). The--skipflags become no-ops then, since Build: gate Windows-only paths so the workspace builds and tests on Linux #235 makes those testscfg(windows).cargo fmt --checkfor the packages that are already rustfmt-clean (victory-core,victory-pe,victory-pipeline,victory-game,victory-shader,victory,xtask) plusload_probe.rs.victory-formats,victory-loader,victory-gpuandvictory-hleare not clean onmainyet and are left out; this PR changes CI only.Not covered (yet)
victory-gpu,victory-hle,apps/victory: they don't compile on Linux onmaintoday; Build: gate Windows-only paths so the workspace builds and tests on Linux #235 fixes that.Relation to #112 / #235
This is a stopgap subset. #112 adds broader Linux setup and CI; when it lands this workflow can be folded into it or deleted. #235 makes the rest of the workspace build on Linux; this PR does not depend on it and passes with or without it.
Tested locally on Linux with Rust 1.98.1, on this branch and on this branch merged with #235:
All pass: 96 tests passed, 3 ignored (they need reference files outside the repository). Before this change the job ran 89 tests and no clippy.
Part 2: skip load_probe's nested cargo build under Wine/Proton (was #227)
load_probe::loads_binds_and_calls_probebuilds its fixture by spawning thecargothat built the test (env!("CARGO")). When the Windows test exe is cross-built on Linux (cargo xwin test) and run by Wine or Proton, that path is a Linux program the guest cannot start, so the test fails withrunning cargo: ... Invalid handle.onmainand on every PR. I hit this while testing #214 (see my comment there). It is a red test that has nothing to do with the change being tested.Change (test file only)
VICTORY_HLE_PROBE_DLL: if set, the test loads that prebuilthle_probe.dlland does not build one. This works on Windows too.wine_get_version, the same check as invictory-hle/src/modules/xmem.rs) with no prebuilt DLL: the test prints askipping: ...line and returns.Wine/Proton contributor workflow
Evidence
Run by UMU-Proton 11.0-2e's
winewith a new prefix, on Linux:tests/load_probe.rsmain(d2a4bae)running cargo: Os { code: 6, ... "Invalid handle." })VICTORY_HLE_PROBE_DLLsetcargo xwin clippy -p victory-loader --all-targets --target x86_64-pc-windows-msvc -- -D warnings: clean.cargo xtask policy: 151 files ok. Formatted with rustfmt.cargo test -p victory-loader:load_probe.rsis#![cfg(windows)], so it is unaffected. The 3prepare::testsfailures there are already onmain: they parse their own test binary, which is ELF on Linux. This PR does not change them.Not tested: a real Windows machine (that code path is the same as before, apart from the env check). No game assets.
Part 3: type-check the Windows target from Linux
The Linux job above never compiles
cfg(windows)code, which is most ofvictory-gpu,victory-hleandapps/victory, plus the Windows-only tests (load_probe.rs, victory-shader's tests). A compile break there, like the duplicate test module fixed in #129, is caught only on a Windows machine. A second job,windows-target-check, closes that gap without a Windows runner:cargo check --locked --workspace --all-targets --target x86_64-pc-windows-msvc: the whole workspace, tests included.cargo clippy --all-targets --target x86_64-pc-windows-msvc -- -D warningsfor the crates that are clean on that target today: core, pe, formats, pipeline, game, loader, shader.victory-gpuandvictory-hleeach have one Windows-only clippy finding onmain(host.rs:267missing SAFETY comment,xmem.rs:747field_reassign_with_default). This PR does not touch them; they can join the list once fixed.rust-toolchain.toml. blake3's build script would call MSVC's C tools, so the job setsCARGO_FEATURE_PURE=1, which that script reads to pick its pure-Rust code. Nothing is linked, so this does not change any shipped build.load_probe hardening: an empty
VICTORY_HLE_PROBE_DLLis now treated as unset. A path that is not a file fails with a message that names the variable and theZ:form Wine needs. Before, it failed with a bare "not found" fromfs::read(the common mistake is a Unix/home/...path, which Wine resolves against the current drive).Tested locally (Linux, Rust 1.98.1, no MSVC installed):
Without
CARGO_FEATURE_PUREthe check fails at blake3's build script (failed to find tool "lib.exe"). Not run under Wine this round; the load_probe change only touches the env-var path.hle-probe fixture:
tests/fixtures/hle-probeis excluded from the workspace (load_probe builds it on demand, on Windows only), so neither job compiled it.windows-target-checknow runscargo clippy --locked --all-targets --target x86_64-pc-windows-msvc --manifest-path tests/fixtures/hle-probe/Cargo.toml -- -D warnings. It is clean today (0.2 s from a cold target dir). An added unused variable makes it fail, as expected. No linker is needed.load_probe fixture build pinned to its target: the nested
cargo buildof hle-probe now passes--target <arch>-pc-windows-msvcand--locked, and reads the DLL fromtarget/fixtures/<triple>/debug/. Before, aCARGO_BUILD_TARGETorbuild.targetin the environment or a user config moved the output under a triple directory and the test failed with a bare "not found" on a path that did not exist. If the build succeeds but the DLL is still missing, the assert names the path.-msvcbecause the fixture's build script passes MSVC linker flags. Checked withcargo clippy --locked --all-targets --target x86_64-pc-windows-msvc -p victory-loader -- -D warnings(clean) andcargo check --locked --target x86_64-pc-windows-msvcon the fixture; not run on a Windows machine.victory-gpu library linted for Windows:
victory-gpuis most of the D3D12 code and was only type-checked. Its library is clippy-clean onx86_64-pc-windows-msvc; only one test is not (host.rs:267, missing SAFETY comment).windows-target-checknow runscargo clippy --locked --lib --bins --examples --target x86_64-pc-windows-msvc -p victory-gpu -- -D warnings, so new warnings in the library fail CI.host.rsis not touched here because several open GPU PRs edit it; once that test is fixed, movevictory-gpuinto the--all-targetslist.victory-hle(andapps/victory, which lints it as a dependency) still has thexmem.rs:747finding and stays out. Checked locally: the step is clean (0.9 s warm), and an added unused variable inlib.rsmakes it fail.load_probe finds
version.dllunder%SystemRoot%: both tests copied a hard-codedC:\Windows\System32\version.dllas their stand-in title DLL, so on a Windows install that is not onC:they failed with a bareunwrappanic. The path is now built fromSystemRoot(falling back toC:\Windowsif it is unset), and a failed copy names both paths. The test file is the only file changed. Checked withcargo clippy --locked --all-targets --target x86_64-pc-windows-msvc -p victory-loader -- -D warnings(clean),rustfmt --check, andcargo xtask policy(152 files ok). Not run on Windows or under Wine.Workflow hardening (both jobs):
actions/checkoutnow usespersist-credentials: false(nothing in either job pushes, so the token no longer sits in.git/configwhile build scripts run).rust-cachesaves only frommain(save-if): PR runs restore main's cache but no longer write per-PR entries that evict it from the 10 GB quota. The Linuxcargo teststep adds--no-fail-fast, so a failure in one crate's tests no longer hides the rest. Checked locally: the test command still gives 96 passed, 0 failed, 3 ignored;cargo xtask policy152 files ok; the YAML parses. A rustdoc-D warningsstep was considered and left out: it needs two doc-link fixes (victory-loader/src/lib.rs:7,victory-formats/src/texture.rs:16) in files several open PRs edit.rustc warnings fail the Windows-target job:
victory-hleandapps/victoryare type-checked for Windows, but no clippy step covers them yet (thexmem.rs:747finding), so a new unused import or dead function in that code passed CI.windows-target-checknow setsRUSTFLAGS: -D warningsfor the whole job, so every step, includingcargo check --workspace --all-targets, fails on rustc warnings. It is set job-wide so all steps share one build. Dependencies are unaffected, since cargo caps their lints. Checked locally withCARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": the workspace check, the three clippy steps and the hle-probe fixture are all clean onmain(d2a4bae), and an unused variable added tovictory-hle/src/lib.rsfails the check.cargo xtask policy: 152 files ok; the YAML parses.Main runs are never cancelled; the fixture is rustfmt-checked:
cancel-in-progresswastruefor every ref, so two quick merges tomaincancelled the first run. Since onlymainsaves the rust-cache, PRs could keep restoring an old cache. It is now${{ github.event_name == 'pull_request' }}, so only a superseded PR run is cancelled.windows-target-checkalso runscargo fmt --check --manifest-path tests/fixtures/hle-probe/Cargo.toml. The fixture is outside the workspace (socargo fmt --allnever reaches it) and is rustfmt-clean today; the workspace itself is not yet, so it stays unchecked. Checked locally: the step passes, a misformatted line added to the fixture makes it fail, the YAML parses, andcargo xtask policyreports 152 files ok.Actions pinned to commit SHAs; backtraces on failure:
actions/checkoutandSwatinem/rust-cacheare pinned to full commit SHAs, with the release in a trailing comment (11d5960= v4.4.0, which@v4resolves to today;d1527c8= v2.9.3, which@v2resolves to). A tag can be moved to other code; a commit cannot. Since the release is the same, behaviour does not change. Both jobs also setRUST_BACKTRACE: 1, so a failing test or build script in a CI log shows where it panicked. Checked locally: the YAML parses, both SHAs resolve to those tags through the GitHub API, andcargo xtask policyreports 152 files ok.rustfmt for the clean packages: the Linux job now runs
cargo fmt --check -p victory-core -p victory-pe -p victory-pipeline -p victory-game -p victory-shader -p victory -p xtaskandrustfmt --check --edition 2024oncrates/victory-loader/tests/load_probe.rs(the rest ofvictory-loaderis not clean yet). Those packages are rustfmt-clean onmain(d2a4bae) today, so this only stops them regressing. It needs no build and runs right after the asset policy. Once #112's fullcargo fmt --all --checklands, this step can go. Checked locally: the step passes, a misformatted line invictory-pe/src/lib.rsorload_probe.rsmakes it fail, the YAML parses, andcargo xtask policyreports 152 files ok.load_probe's fixture builds under
CARGO_TARGET_TMPDIR: the nested hle-probe build went to<workspace>/target/fixtureswhateverCARGO_TARGET_DIRorbuild.target-dirsaid, so a build with a relocated target dir still wrote into the source tree. It now usesCARGO_TARGET_TMPDIR/hle-probe, which cargo sets for integration tests and places under the target dir in use. The prebuilt-DLL error's example path also had the wrong location: the documentedcargo xwin build --manifest-path tests/fixtures/hle-probe/Cargo.tomlwrites totests/fixtures/hle-probe/target/x86_64-pc-windows-msvc/debug/, nottarget/fixtures. The test file is the only file changed. Checked locally:cargo clippy --locked --all-targets --target x86_64-pc-windows-msvc -p victory-loader -- -D warningsis clean,rustfmt --check, the Linux test command gives 96 passed, 0 failed, 3 ignored, andcargo xtask policyreports 152 files ok. Not run on Windows.The workflow lints itself (actionlint): a YAML parse does not catch a misspelled context (
github.event_nme), an unknown key, or a brokenrun:script; GitHub only reports those when the run starts, or never if the bad branch of an expression is not taken. The Linux job now runs actionlint 1.7.7 right after the asset policy. The release tarball is pinned by version and its SHA-256 is checked withsha256sum -cbefore it runs (the same checksum as the release'schecksums.txt). actionlint passes therun:scripts to the runner's preinstalled shellcheck. SC2086 (unquoted variable) is ignored because the*_CRATESlists are split into arguments on purpose. Checked locally with actionlint 1.7.7 and shellcheck 0.10.0: the workflow is clean, the step's script runs and verifies the checksum, andgithub.event_nmeorfor f in $(ls)added to the workflow make it fail.cargo xtask policyreports 152 files ok. Not run on GitHub yet.rustdoc lints for the doc-clean crates:
cargo testruns doc tests but never builds the docs, so rustdoc's own lints (a renamed item leaving a dangling[`link`], public docs linking to a private item) go unreported. The Linux job now runscargo doc --no-deps --lockedwithRUSTDOCFLAGS=-D warningsforvictory-core,victory-pe,victory-pipeline,victory-game,victory-shaderandxtask, which are clean onmaintoday.victory-formats(a public doc links to the privateMICRO) andvictory-loader(prepareis both a function and a module) are not yet and are left out; this PR changes CI only. The actionlint download also retries (curl --retry 3) so a transient network error does not fail the job. Checked locally: the step passes, a[NoSuchItem]added tovictory-pemakes it fail, actionlint 1.7.7 is clean, andcargo xtask policyreports 152 files ok. Not run on GitHub yet.load_probe names what failed in its fixture build: the nested build runs the cargo recorded at compile time (
env!("CARGO")). A test exe cross-built on another machine and copied to a Windows box names a cargo that is not there, and the test failed with a barerunning cargo: ... not found. It now says which path is missing and to setVICTORY_HLE_PROBE_DLLinstead. A spawn error names the cargo path, and a failed build names the fixture manifest, the target triple and the exit status instead of just "building hle-probe failed". Wine behaviour is unchanged (it still skips before this point). The test file is the only file changed. Checked withcargo clippy --locked --all-targets --target x86_64-pc-windows-msvc -p victory-loader -- -D warnings(clean),rustfmt --check --edition 2024, andcargo xtask policy(152 files ok). Not run on Windows.rustdoc lints for Windows-only code: the Linux rustdoc step never sees
cfg(windows)items, so doc links invictory-hle,apps/victory's host and the hle-probe fixture went unchecked.windows-target-checknow runscargo doc --no-deps --locked --target x86_64-pc-windows-msvcwithRUSTDOCFLAGS=-D warningsforvictory-core,victory-pe,victory-pipeline,victory-game,victory-hleandvictory, plus the hle-probe fixture (nothing is linked).victory-shaderis doc-clean on Linux but not for Windows (emit/validator.rs:3links the privatesuper::container::hash), andvictory-gpulinks private items inlist.rsandshader_cache.rs, so both are left out; this PR changes CI only. Checked locally with the job'sCARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": both commands pass with no warnings,-p victory-shaderfails as expected, and actionlint 1.7.7 is clean. Not run on GitHub yet.rustdoc lints for private items too: both rustdoc steps now pass
--document-private-items, so a dangling intra-doc link in a private item's doc comment (most of the code's docs) fails CI as well.private_intra_doc_linksstill fires in this mode (checked:-p victory-formatsstill fails onMICRO). Every crate inRUSTDOC_CRATESandWINDOWS_RUSTDOC_CRATES, and the hle-probe fixture, already passes this way, so no source changes. The hle-probe rustfmt step's comment had ended up above the Windows rustdoc step; it is back on its own step. Checked locally (Windows step with the job'sCARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings"); actionlint 1.7.7 (checksum-verified) is clean. Not run on GitHub yet.victory-gpu fully linted for Windows: the one test finding that kept
victory-gpuon the--lib --bins --examplesstep (host.rs:267, anunsafeGetDesc1query with no SAFETY comment) now has its comment.victory-gpujoinsWINDOWS_CLIPPY_CRATES, socargo clippy --all-targets --target x86_64-pc-windows-msvccovers its tests too, and the separate lib-only step is gone. The host.rs change is one added comment line in the test module; none of the open PRs that edit host.rs touch that line or its context (their test-module hunks start at line 274).victory-hlestill hasxmem.rs:747and stays out. Checked locally withCARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": the widened clippy step is clean, and actionlint 1.7.7 is clean. Not run on GitHub yet.Feature-gated code is compiled and linted: every step built default features only, so the code behind
diagnostics(frame capture, the host debug layer, scripted keys, stack dumps: mostlycfg(windows)invictory-gpu,victory-hleandapps/victory) and victory-shader'shostfeature was never compiled in CI. A break there showed up only in someone's diagnostics build. Now:cargo clippy --all-targets --all-features --locked $LINUX_CRATES -- -D warnings, plus--lib --all-featuresforvictory-shader.windows-target-check:cargo check --locked --workspace --all-targets --all-features --target x86_64-pc-windows-msvc(under the job'sRUSTFLAGS=-D warnings), and the same clippy as the default step with--all-featuresforWINDOWS_CLIPPY_CRATES.The default-feature steps stay:
victory-gpuandvictory-hlealso havecfg(not(feature = "diagnostics"))code. No source changes; everything is clean on this branch today. Checked locally (Rust 1.98.1,CARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings"for the Windows target): all four commands pass, and an unused variable inside a#[cfg(feature = "diagnostics")]fn invictory-gpupasses the existing default check but fails the new all-features one. actionlint 1.7.7 (checksum-verified) is clean;cargo xtask policypasses. Not run on GitHub yet.rustdoc lints for feature-gated code: both rustdoc steps built default features only, so doc comments on
diagnosticscode (frame capture, the host debug layer, scripted keys, stack dumps; mostlycfg(windows)) and onvictory-shader'shostfeature were never linted, the same gap the clippy steps closed for--all-features. Each rustdoc step now runs a secondcargo doc --all-featureswith the same crates and flags. Every crate inRUSTDOC_CRATESandWINDOWS_RUSTDOC_CRATESalready passes this way, so no source changes. Checked locally (Windows step withCARGO_FEATURE_PURE=1); actionlint 1.7.7 (checksum-verified) is clean. Not run on GitHub yet.The hle-probe fixture gets the workspace lints: the fixture is outside the workspace, so it never inherited
[workspace.lints](undocumented_unsafe_blocks,unsafe_op_in_unsafe_fn = deny,unused_must_use = deny), and the fixture clippy step inwindows-target-checkran with clippy's defaults only. ItsCargo.tomlnow repeats those lints, with a note to keep the two in step, and its seven FFI calls that had no// SAFETY:comment now have one. Only the fixture and one workflow comment change; no open PR touches the fixture. Checked locally with the job'sCARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": before the comments, the fixture clippy step fails with 7undocumented_unsafe_blockserrors; after, it is clean, as are the fixture's rustfmt and rustdoc steps. actionlint 1.7.7 (checksum-verified) is clean andcargo xtask policyreports 152 files ok. Not run on GitHub or Windows yet.victory-hle and apps/victory linted for Windows: apart from the one
xmem.rs:747field_reassign_with_defaultfinding, both were already clippy-clean onx86_64-pc-windows-msvc, but no step linted them. Open PRs #355 and #405 fix that line, so this PR leavesxmem.rsalone.windows-target-checknow runscargo clippy --locked --all-targets [--all-features] --target x86_64-pc-windows-msvc -p victory-hle -p victory -- -D warnings -A clippy::field_reassign_with_default. Only that one lint is allowed, so any other new finding fails CI. Once the xmem fix lands, drop the-Aand move both crates intoWINDOWS_CLIPPY_CRATES. The workflow is the only file changed. Checked locally: both feature sets are clean, a seededv.len() == 0invictory-hlefails the step, and the pinned actionlint passes.Merged main again; victory-hle and apps/victory fully linted for Windows: merged
upstream/main(533b7e2) to clear the conflict. The only conflict was the SAFETY comment athost.rs:267, which main now has in its own wording; main's comment was kept, so this PR no longer toucheshost.rs. Main also removed thefield_reassign_with_defaultinxmem.rs, sovictory-hleandapps/victoryare clippy-clean for Windows with nothing allowed. Both are now inWINDOWS_CLIPPY_CRATES(every workspace member but the host-onlyxtask), and the separate step with-A clippy::field_reassign_with_defaultis gone. Checked locally on the merge with the job'sCARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": everywindows-target-checkstep passes (check, clippy, both feature sets, the hle-probe fixture, rustdoc), and so does everylinuxstep (policy, rustfmt, clippy, rustdoc, tests). actionlint and zizmor were not run locally this time; the YAML parses.rustdoc lints victory-formats and victory-loader: both were left out of
RUSTDOC_CRATESandWINDOWS_RUSTDOC_CRATESbecause their docs had warnings (e.g. theMICROlink). Main has since fixed them: both now build withRUSTDOCFLAGS=-D warnings --document-private-itemson Linux and forx86_64-pc-windows-msvc, default and--all-features. Both are added to both lists, soWINDOWS_RUSTDOC_CRATESnow covers every workspace member but the host-onlyxtask. The workflow is the only file changed. Checked locally: all four rustdoc commands pass with the new lists (Windows with the job'sCARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings"), a seeded broken intra-doc link invictory-loadernow fails the Linux step, and the pinned actionlint 1.7.12 with ShellCheck 0.11.0 (both checksum-verified) is clean. Not run on GitHub yet.Workspace lints apply everywhere: clippy and rustdoc lint with whatever
[lints]each crate declares, so a member added or edited without[lints] workspace = truesilently losesundocumented_unsafe_blocks,unsafe_op_in_unsafe_fn = denyandunused_must_use = denyand still passes. The hle-probe fixture repeats those lints by hand ("keep the two in step"), and nothing checked that it does. A newlinuxstep reads the manifests (members fromcargo metadata) with the runner's Python 3tomllib(python3 -I) and fails when a member's[lints]is anything butworkspace = true, or when the fixture's[lints]differs from the root[workspace.lints]. All 11 members and the fixture pass today, so the workflow is the only file changed. Checked locally: the step passes; changing one fixture lint level, or replacingvictory-pe's[lints] workspace = truewith its own table, makes it fail with a file annotation. actionlint 1.7.12 with ShellCheck 0.11.0 (both checksum-verified, same SHELLCHECK_OPTS) is clean. Not run on GitHub yet.Gitignored leftovers fail the checkout check too: both "Checkout unchanged by the steps above" steps used
git status, which hides ignored files, and.gitignorecovers*.bin,*.dll,*.dat,/dumps/and more. So a test writing ascratch.bininto the source tree, or a build script dropping a.dllnext to its sources, passed CI. Both steps now also list ignored files withgit ls-files -z --others --ignored --exclude-standard --directory(an ignored directory is one entry) and fail on anything other thantarget/or a fixture'stests/fixtures/*/target/. The workflow is the only file changed. Checked locally: after the asset policy, bothcargo testruns and the hle-probe fixture clippy, the step passes with only the twotarget/directories left; addingcrates/victory-pe/scratch.bin, a file name with a space, ordumps/a/bmakes it fail and list them. The pinned actionlint 1.7.12 with ShellCheck 0.11.0 (same SHELLCHECK_OPTS) and zizmor 1.32.0 (--offline), all checksum-verified, are clean. Not run on GitHub yet.MSRV is checked, not just declared: every workspace member inherits
rust-version = "1.88", but every job builds with the 1.98.1 pinned inrust-toolchain.toml. So code using a newer language feature or std API, or aCargo.lockbump to a dependency that needs a newer rustc, passed CI and broke anyone building with the version the manifests promise. A newmsrvjob reads the version from the rootCargo.toml(so the two cannot drift), fails if a member declares its ownrust-version, installs exactly that toolchain (minimal profile plus the Windows target) and runscargo check --locked --all-targetsforLINUX_CRATESand for the whole workspace onx86_64-pc-windows-msvc, default and--all-features, plus the hle-probe fixture. It iscargo checkonly: 1.88 rustc warns where 1.98.1 does not, so warnings stay with the pinned-toolchain jobs. Its target dir is inRUNNER_TEMP, so a second compiler's output never enters the shared rust-cache. The workflow is the only file changed; everything passes on 1.88 today. Checked locally by running the job's three scripts under the workflow's shell options: all pass (about a minute cold);File::lock(stable in 1.89) added tovictory-pefails with E0658, andrust-version = "1.90"invictory-pe/Cargo.tomlfails the install step naming the crate. The pinned actionlint 1.7.12 with ShellCheck 0.11.0 (same SHELLCHECK_OPTS) and zizmor 1.32.0 (--offline), all checksum-verified, are clean. Not run on GitHub yet.Package fields are inherited too: every member takes
edition,licenseandpublishfrom[workspace.package]today, and the hle-probe fixture (outside the workspace) repeats them by hand, but nothing checked either. A member that spells out its ownedition = "2024"keeps it when the root edition is bumped, and a fixtureeditionorlicensethat drifts from the workspace's goes unnoticed. The existing "Workspace lints" step inlinux(renamed "Workspace lints and package fields apply everywhere") now also fails when a member'sedition,licenseorpublishis anything but.workspace = true, or when the fixture's value differs from the root's.rust-versionis left to themsrvjob, which already checks it. All 11 members and the fixture pass today, so the workflow is the only file changed. Checked locally by running the step's script under the job's shell: it passes; replacingvictory-pe'sedition.workspace = truewithedition = "2024"and setting the fixture'slicense = "MIT"makes it fail with one file annotation for each. The shell part of the step is unchanged (only its Python heredoc grows); actionlint, ShellCheck and zizmor were not available locally, so they run on GitHub only.No stray whitespace: rustfmt only checks the rustfmt-clean packages, so trailing spaces or tabs and a last line with no newline went unchecked in workflows, TOML, docs and the crates rustfmt skips, and showed up as whitespace-only diff noise. Main is clean on both today. The existing "LF line endings, no conflict markers" step in
linux(renamed "..., no stray whitespace") now fails on either, reading from the index (git grep --cached -nIE '[[:blank:]]+$', and each non-binary entry of thegit ls-files --eollist it already walks), so a*.cmd/*.ps1working copy checked out with CRLF can neither trip nor hide it. The workflow is the only file changed. Checked locally on this branch merged into main (ffe310e) by running the step's script under the job's shell: it passes; a staged file with no final newline, or a trailing double space inREADME.md, makes it fail and list the file (with line for whitespace); a stagedx.cmdwith a CRLF working copy still passes. The pinned actionlint 1.7.12 with ShellCheck 0.11.0 (both checksum-verified, same SHELLCHECK_OPTS) is clean. Not run on GitHub yet.Each crate checked on its own: every build step compiles its crates together, so Cargo unifies their features: a crate that uses a dependency feature it does not enable (a
windows-sysWin32_*module, aserde/objectfeature) still builds while a sibling enables it, and breaks only when built alone (cargo test -pit). The Linux job now runscargo check --locked --all-targets -p <crate>and the same with--all-featuresfor eachLINUX_CRATESmember;windows-target-checkdoes the same for eachWINDOWS_CLIPPY_CRATESmember with--target x86_64-pc-windows-msvc(under the job'sRUSTFLAGS=-D warnings). Lints stay with clippy; the Linux loop only fails on build errors. Branch merged withmain(ffe310e) first. Checked locally with both step scripts run under the workflow's shell (bash -O inherit_errexit -euo pipefail, plusCARGO_FEATURE_PURE=1for Windows): both pass on every crate. DroppingWin32_System_Memoryfromvictory-gpu'swindows-sysfeatures passes the existing workspace check (victory-loader enables it) but fails the new per-crate one withE0432. Not run on GitHub yet. Note:main'svictory-shadertest module currently has two unused imports on Linux (emit/mod.rsAttr,Shader) that fail the existing Linux clippy step; that isemit, left to its owner.Tests run under umask 077: the four
cargo testruns and the hermetic#[ignore]run used the runner's umask 022, so every file a test or build script made was group- and world-readable. A test that depends on that (checking a made file's mode against 0644/0755, or copying permissions and expecting group or world bits) passed here and failed for a contributor with a restrictive umask (a hardened default or a shared box). The step now setsumask 077before making its HOME and TMPDIR, and fails unlesssh -c umaskinside theunshare … env -iwrapper prints0077, so the tests see exactly it. umask is not part of Cargo's fingerprint, so this adds no builds. The workflow is the only file changed. Checked locally: all eightLINUX_CRATESpasscargo test --lockedunderumask 077with the step's skips, and leave the TMPDIR empty; the guard prints0077throughunshare --user --map-current-user --net -- env -i, and trips under umask 022. actionlint, ShellCheck and zizmor were not available locally, so they run on GitHub only.