Skip to content

Linux/Wine testing: interim Linux CI subset; skip load_probe cargo build under Wine - #232

Closed
SkippySteve wants to merge 77 commits into
Marvisak:mainfrom
SkippySteve:SkippySteve/victory-pr-linux-ci
Closed

SkippySteve wants to merge 77 commits into
Marvisak:mainfrom
SkippySteve:SkippySteve/victory-pr-linux-ci

Conversation

@SkippySteve

@SkippySteve SkippySteve commented Nov 24, 2026 •

Copy link
Copy Markdown

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 by rust-toolchain.toml) for the crates that already build on Linux on current main, 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 policy
  • cargo clippy --all-targets -- -D warnings for victory-core, victory-pe, victory-formats, victory-pipeline, victory-game, victory-loader, xtask
  • cargo clippy --lib -- -D warnings for victory-shader (its test module has a helper only the Windows tests use, so the test target is dead code on Linux)
  • cargo test for all eight of the above, skipping (by exact name) only the 7 victory-pe/victory-loader tests that parse their own test binary as a PE image (an ELF on Linux). They still run on Windows.
  • Workflow linting: pinned, checksum-verified actionlint (with shellcheck) and zizmor (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

Not covered (yet)

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:

cargo xtask policy
L="-p victory-core -p victory-pe -p victory-formats -p victory-pipeline -p victory-game -p victory-loader -p xtask"
cargo clippy --all-targets --locked $L -- -D warnings
cargo clippy --lib --locked -p victory-shader -- -D warnings
cargo test --locked $L -p victory-shader -- --exact \
  --skip image::tests::parses_own_test_binary \
  --skip image::tests::rva_to_file_offset_maps_entry_point \
  --skip image::tests::rva_to_file_offset_rejects_offsets_past_4_gib \
  --skip image::tests::rejects_iat_outside_image \
  --skip prepare::tests::patches_own_test_binary \
  --skip prepare::tests::keeps_iat_slots_when_import_size_excludes_the_terminator \
  --skip prepare::tests::file_name_is_stable_per_build

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_probe builds its fixture by spawning the cargo that 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 with running cargo: ... Invalid handle. on main and 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 prebuilt hle_probe.dll and does not build one. This works on Windows too.
  • Under Wine (ntdll exports wine_get_version, the same check as in victory-hle/src/modules/xmem.rs) with no prebuilt DLL: the test prints a skipping: ... line and returns.
  • On real Windows nothing changes: it still runs nested cargo and every assertion.

Wine/Proton contributor workflow

cargo xwin test -p victory-loader --target x86_64-pc-windows-msvc --no-run
# optional: run the full end-to-end test under Wine too
cargo xwin build --manifest-path tests/fixtures/hle-probe/Cargo.toml \
  --target x86_64-pc-windows-msvc --target-dir target/fixtures
export VICTORY_HLE_PROBE_DLL="Z:$PWD/target/fixtures/x86_64-pc-windows-msvc/debug/hle_probe.dll"
wine target/x86_64-pc-windows-msvc/debug/deps/load_probe-*.exe

Evidence

Run by UMU-Proton 11.0-2e's wine with a new prefix, on Linux:

tests/load_probe.rs main (d2a4bae) this PR
no env var 1 passed, 1 failed (running cargo: Os { code: 6, ... "Invalid handle." }) 2 passed (prints the skip line)
VICTORY_HLE_PROBE_DLL set — 2 passed, with every assertion run
  • lib unit tests under Wine: 18 passed, 0 failed (no change).
  • cargo 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.
  • Native Linux cargo test -p victory-loader: load_probe.rs is #![cfg(windows)], so it is unaffected. The 3 prepare::tests failures there are already on main: 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 of victory-gpu, victory-hle and apps/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 warnings for the crates that are clean on that target today: core, pe, formats, pipeline, game, loader, shader. victory-gpu and victory-hle each have one Windows-only clippy finding on main (host.rs:267 missing SAFETY comment, xmem.rs:747 field_reassign_with_default). This PR does not touch them; they can join the list once fixed.
  • No MSVC, no linker, nothing runs. The target is already in rust-toolchain.toml. blake3's build script would call MSVC's C tools, so the job sets CARGO_FEATURE_PURE=1, which that script reads to pick its pure-Rust code. Nothing is linked, so this does not change any shipped build.
  • Unrelated to Build: gate Windows-only paths so the workspace builds and tests on Linux #235 (which makes the workspace build for Linux) and to CI: consolidate Linux and native Apple Silicon offline validation #438 (Apple).

load_probe hardening: an empty VICTORY_HLE_PROBE_DLL is now treated as unset. A path that is not a file fails with a message that names the variable and the Z: form Wine needs. Before, it failed with a bare "not found" from fs::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):

export CARGO_FEATURE_PURE=1
cargo check --locked --workspace --all-targets --target x86_64-pc-windows-msvc   # ok
cargo clippy --locked --all-targets --target x86_64-pc-windows-msvc \
  -p victory-core -p victory-pe -p victory-formats -p victory-pipeline \
  -p victory-game -p victory-loader -p victory-shader -- -D warnings             # clean
cargo xtask policy                                                                # 152 files ok

Without CARGO_FEATURE_PURE the 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-probe is excluded from the workspace (load_probe builds it on demand, on Windows only), so neither job compiled it. windows-target-check now runs cargo 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 build of hle-probe now passes --target <arch>-pc-windows-msvc and --locked, and reads the DLL from target/fixtures/<triple>/debug/. Before, a CARGO_BUILD_TARGET or build.target in 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. -msvc because the fixture's build script passes MSVC linker flags. Checked with cargo clippy --locked --all-targets --target x86_64-pc-windows-msvc -p victory-loader -- -D warnings (clean) and cargo check --locked --target x86_64-pc-windows-msvc on the fixture; not run on a Windows machine.

victory-gpu library linted for Windows: victory-gpu is most of the D3D12 code and was only type-checked. Its library is clippy-clean on x86_64-pc-windows-msvc; only one test is not (host.rs:267, missing SAFETY comment). windows-target-check now runs cargo 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.rs is not touched here because several open GPU PRs edit it; once that test is fixed, move victory-gpu into the --all-targets list. victory-hle (and apps/victory, which lints it as a dependency) still has the xmem.rs:747 finding and stays out. Checked locally: the step is clean (0.9 s warm), and an added unused variable in lib.rs makes it fail.

load_probe finds version.dll under %SystemRoot%: both tests copied a hard-coded C:\Windows\System32\version.dll as their stand-in title DLL, so on a Windows install that is not on C: they failed with a bare unwrap panic. The path is now built from SystemRoot (falling back to C:\Windows if it is unset), and a failed copy names both paths. The test file is the only file changed. Checked with cargo clippy --locked --all-targets --target x86_64-pc-windows-msvc -p victory-loader -- -D warnings (clean), rustfmt --check, and cargo xtask policy (152 files ok). Not run on Windows or under Wine.

Workflow hardening (both jobs): actions/checkout now uses persist-credentials: false (nothing in either job pushes, so the token no longer sits in .git/config while build scripts run). rust-cache saves only from main (save-if): PR runs restore main's cache but no longer write per-PR entries that evict it from the 10 GB quota. The Linux cargo test step 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 policy 152 files ok; the YAML parses. A rustdoc -D warnings step 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-hle and apps/victory are type-checked for Windows, but no clippy step covers them yet (the xmem.rs:747 finding), so a new unused import or dead function in that code passed CI. windows-target-check now sets RUSTFLAGS: -D warnings for the whole job, so every step, including cargo 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 with CARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": the workspace check, the three clippy steps and the hle-probe fixture are all clean on main (d2a4bae), and an unused variable added to victory-hle/src/lib.rs fails the check. cargo xtask policy: 152 files ok; the YAML parses.

Main runs are never cancelled; the fixture is rustfmt-checked: cancel-in-progress was true for every ref, so two quick merges to main cancelled the first run. Since only main saves 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-check also runs cargo fmt --check --manifest-path tests/fixtures/hle-probe/Cargo.toml. The fixture is outside the workspace (so cargo fmt --all never 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, and cargo xtask policy reports 152 files ok.

Actions pinned to commit SHAs; backtraces on failure: actions/checkout and Swatinem/rust-cache are pinned to full commit SHAs, with the release in a trailing comment (11d5960 = v4.4.0, which @v4 resolves to today; d1527c8 = v2.9.3, which @v2 resolves 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 set RUST_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, and cargo xtask policy reports 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 xtask and rustfmt --check --edition 2024 on crates/victory-loader/tests/load_probe.rs (the rest of victory-loader is not clean yet). Those packages are rustfmt-clean on main (d2a4bae) today, so this only stops them regressing. It needs no build and runs right after the asset policy. Once #112's full cargo fmt --all --check lands, this step can go. Checked locally: the step passes, a misformatted line in victory-pe/src/lib.rs or load_probe.rs makes it fail, the YAML parses, and cargo xtask policy reports 152 files ok.


load_probe's fixture builds under CARGO_TARGET_TMPDIR: the nested hle-probe build went to <workspace>/target/fixtures whatever CARGO_TARGET_DIR or build.target-dir said, so a build with a relocated target dir still wrote into the source tree. It now uses CARGO_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 documented cargo xwin build --manifest-path tests/fixtures/hle-probe/Cargo.toml writes to tests/fixtures/hle-probe/target/x86_64-pc-windows-msvc/debug/, not target/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 warnings is clean, rustfmt --check, the Linux test command gives 96 passed, 0 failed, 3 ignored, and cargo xtask policy reports 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 broken run: 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 with sha256sum -c before it runs (the same checksum as the release's checksums.txt). actionlint passes the run: scripts to the runner's preinstalled shellcheck. SC2086 (unquoted variable) is ignored because the *_CRATES lists 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, and github.event_nme or for f in $(ls) added to the workflow make it fail. cargo xtask policy reports 152 files ok. Not run on GitHub yet.


rustdoc lints for the doc-clean crates: cargo test runs 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 runs cargo doc --no-deps --locked with RUSTDOCFLAGS=-D warnings for victory-core, victory-pe, victory-pipeline, victory-game, victory-shader and xtask, which are clean on main today. victory-formats (a public doc links to the private MICRO) and victory-loader (prepare is 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 to victory-pe makes it fail, actionlint 1.7.7 is clean, and cargo xtask policy reports 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 bare running cargo: ... not found. It now says which path is missing and to set VICTORY_HLE_PROBE_DLL instead. 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 with cargo clippy --locked --all-targets --target x86_64-pc-windows-msvc -p victory-loader -- -D warnings (clean), rustfmt --check --edition 2024, and cargo 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 in victory-hle, apps/victory's host and the hle-probe fixture went unchecked. windows-target-check now runs cargo doc --no-deps --locked --target x86_64-pc-windows-msvc with RUSTDOCFLAGS=-D warnings for victory-core, victory-pe, victory-pipeline, victory-game, victory-hle and victory, plus the hle-probe fixture (nothing is linked). victory-shader is doc-clean on Linux but not for Windows (emit/validator.rs:3 links the private super::container::hash), and victory-gpu links private items in list.rs and shader_cache.rs, so both are left out; this PR changes CI only. Checked locally with the job's CARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": both commands pass with no warnings, -p victory-shader fails 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_links still fires in this mode (checked: -p victory-formats still fails on MICRO). Every crate in RUSTDOC_CRATES and WINDOWS_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's CARGO_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-gpu on the --lib --bins --examples step (host.rs:267, an unsafe GetDesc1 query with no SAFETY comment) now has its comment. victory-gpu joins WINDOWS_CLIPPY_CRATES, so cargo clippy --all-targets --target x86_64-pc-windows-msvc covers 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-hle still has xmem.rs:747 and stays out. Checked locally with CARGO_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: mostly cfg(windows) in victory-gpu, victory-hle and apps/victory) and victory-shader's host feature was never compiled in CI. A break there showed up only in someone's diagnostics build. Now:

  • Linux job: cargo clippy --all-targets --all-features --locked $LINUX_CRATES -- -D warnings, plus --lib --all-features for victory-shader.
  • windows-target-check: cargo check --locked --workspace --all-targets --all-features --target x86_64-pc-windows-msvc (under the job's RUSTFLAGS=-D warnings), and the same clippy as the default step with --all-features for WINDOWS_CLIPPY_CRATES.

The default-feature steps stay: victory-gpu and victory-hle also have cfg(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 in victory-gpu passes the existing default check but fails the new all-features one. actionlint 1.7.7 (checksum-verified) is clean; cargo xtask policy passes. Not run on GitHub yet.

rustdoc lints for feature-gated code: both rustdoc steps built default features only, so doc comments on diagnostics code (frame capture, the host debug layer, scripted keys, stack dumps; mostly cfg(windows)) and on victory-shader's host feature were never linted, the same gap the clippy steps closed for --all-features. Each rustdoc step now runs a second cargo doc --all-features with the same crates and flags. Every crate in RUSTDOC_CRATES and WINDOWS_RUSTDOC_CRATES already passes this way, so no source changes. Checked locally (Windows step with CARGO_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 in windows-target-check ran with clippy's defaults only. Its Cargo.toml now 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's CARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": before the comments, the fixture clippy step fails with 7 undocumented_unsafe_blocks errors; after, it is clean, as are the fixture's rustfmt and rustdoc steps. actionlint 1.7.7 (checksum-verified) is clean and cargo xtask policy reports 152 files ok. Not run on GitHub or Windows yet.

victory-hle and apps/victory linted for Windows: apart from the one xmem.rs:747 field_reassign_with_default finding, both were already clippy-clean on x86_64-pc-windows-msvc, but no step linted them. Open PRs #355 and #405 fix that line, so this PR leaves xmem.rs alone. windows-target-check now runs cargo 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 -A and move both crates into WINDOWS_CLIPPY_CRATES. The workflow is the only file changed. Checked locally: both feature sets are clean, a seeded v.len() == 0 in victory-hle fails 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 at host.rs:267, which main now has in its own wording; main's comment was kept, so this PR no longer touches host.rs. Main also removed the field_reassign_with_default in xmem.rs, so victory-hle and apps/victory are clippy-clean for Windows with nothing allowed. Both are now in WINDOWS_CLIPPY_CRATES (every workspace member but the host-only xtask), and the separate step with -A clippy::field_reassign_with_default is gone. Checked locally on the merge with the job's CARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings": every windows-target-check step passes (check, clippy, both feature sets, the hle-probe fixture, rustdoc), and so does every linux step (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_CRATES and WINDOWS_RUSTDOC_CRATES because their docs had warnings (e.g. the MICRO link). Main has since fixed them: both now build with RUSTDOCFLAGS=-D warnings --document-private-items on Linux and for x86_64-pc-windows-msvc, default and --all-features. Both are added to both lists, so WINDOWS_RUSTDOC_CRATES now covers every workspace member but the host-only xtask. The workflow is the only file changed. Checked locally: all four rustdoc commands pass with the new lists (Windows with the job's CARGO_FEATURE_PURE=1 RUSTFLAGS="-D warnings"), a seeded broken intra-doc link in victory-loader now 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 = true silently loses undocumented_unsafe_blocks, unsafe_op_in_unsafe_fn = deny and unused_must_use = deny and still passes. The hle-probe fixture repeats those lints by hand ("keep the two in step"), and nothing checked that it does. A new linux step reads the manifests (members from cargo metadata) with the runner's Python 3 tomllib (python3 -I) and fails when a member's [lints] is anything but workspace = 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 replacing victory-pe's [lints] workspace = true with 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 .gitignore covers *.bin, *.dll, *.dat, /dumps/ and more. So a test writing a scratch.bin into the source tree, or a build script dropping a .dll next to its sources, passed CI. Both steps now also list ignored files with git ls-files -z --others --ignored --exclude-standard --directory (an ignored directory is one entry) and fail on anything other than target/ or a fixture's tests/fixtures/*/target/. The workflow is the only file changed. Checked locally: after the asset policy, both cargo test runs and the hle-probe fixture clippy, the step passes with only the two target/ directories left; adding crates/victory-pe/scratch.bin, a file name with a space, or dumps/a/b makes 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 in rust-toolchain.toml. So code using a newer language feature or std API, or a Cargo.lock bump to a dependency that needs a newer rustc, passed CI and broke anyone building with the version the manifests promise. A new msrv job reads the version from the root Cargo.toml (so the two cannot drift), fails if a member declares its own rust-version, installs exactly that toolchain (minimal profile plus the Windows target) and runs cargo check --locked --all-targets for LINUX_CRATES and for the whole workspace on x86_64-pc-windows-msvc, default and --all-features, plus the hle-probe fixture. It is cargo check only: 1.88 rustc warns where 1.98.1 does not, so warnings stay with the pinned-toolchain jobs. Its target dir is in RUNNER_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 to victory-pe fails with E0658, and rust-version = "1.90" in victory-pe/Cargo.toml fails 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, license and publish from [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 own edition = "2024" keeps it when the root edition is bumped, and a fixture edition or license that drifts from the workspace's goes unnoticed. The existing "Workspace lints" step in linux (renamed "Workspace lints and package fields apply everywhere") now also fails when a member's edition, license or publish is anything but .workspace = true, or when the fixture's value differs from the root's. rust-version is left to the msrv job, 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; replacing victory-pe's edition.workspace = true with edition = "2024" and setting the fixture's license = "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 the git ls-files --eol list it already walks), so a *.cmd/*.ps1 working 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 in README.md, makes it fail and list the file (with line for whitespace); a staged x.cmd with 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-sys Win32_* module, a serde/object feature) still builds while a sibling enables it, and breaks only when built alone (cargo test -p it). The Linux job now runs cargo check --locked --all-targets -p <crate> and the same with --all-features for each LINUX_CRATES member; windows-target-check does the same for each WINDOWS_CLIPPY_CRATES member with --target x86_64-pc-windows-msvc (under the job's RUSTFLAGS=-D warnings). Lints stay with clippy; the Linux loop only fails on build errors. Branch merged with main (ffe310e) first. Checked locally with both step scripts run under the workflow's shell (bash -O inherit_errexit -euo pipefail, plus CARGO_FEATURE_PURE=1 for Windows): both pass on every crate. Dropping Win32_System_Memory from victory-gpu's windows-sys features passes the existing workspace check (victory-loader enables it) but fails the new per-crate one with E0432. Not run on GitHub yet. Note: main's victory-shader test module currently has two unused imports on Linux (emit/mod.rs Attr, Shader) that fail the existing Linux clippy step; that is emit, left to its owner.


Tests run under umask 077: the four cargo test runs 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 sets umask 077 before making its HOME and TMPDIR, and fails unless sh -c umask inside the unshare … env -i wrapper prints 0077, 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 eight LINUX_CRATES pass cargo test --locked under umask 077 with the step's skips, and leave the TMPDIR empty; the guard prints 0077 through unshare --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.

SkippySteve added 2 commits November 23, 2026 20:39
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).
@SkippySteve SkippySteve changed the title CI: interim Linux check/test for crates that already build Linux/Wine testing: interim Linux CI subset; skip load_probe cargo build under Wine Nov 24, 2026
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.
SkippySteve added 11 commits November 23, 2026 22:42
…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.
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.
@jeremygold02

Copy link
Copy Markdown
Contributor

Thanks @SkippySteve for the Wine-aware loader test and Linux subset. I tested the open PR at head 75db3aa52d625a9ec63c4f49b9bd9e1e7aac119d with:

cargo test --locked -p victory-loader --test load_probe -- --test-threads=1
git diff --check d2a4bae1f49533ef5cb512fd1b1ba1513f2e1989 HEAD
python -c "import yaml; from pathlib import Path; yaml.safe_load(Path('.github/workflows/linux-subset.yml').read_text(encoding='utf-8'))"

All checks passed. The Windows-gated load_probe target passed both loads_binds_and_calls_probe and maps_a_title_dll_the_title_loads_itself, exercising the stand-in title’s prepare/load/bind/call flow and title-DLL mapping. The diff check was clean and the new workflow parses as YAML. These checks do not execute the GitHub Actions workflow or launch a real title/game; the loader target uses the repository’s probe fixture.

Code: load_probe.rs, linux-subset.yml.

SkippySteve added 6 commits November 24, 2026 00:01
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.
@ghost ghost mentioned this pull request Nov 24, 2026
SkippySteve added 4 commits November 24, 2026 00:46
…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.
SkippySteve added 14 commits November 24, 2026 05:11
…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.
…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.
@MichaelSmithAI

MichaelSmithAI commented Nov 24, 2026 •

Copy link
Copy Markdown

@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 crates/victory-loader/tests/load_probe.rs or the hle-probe fixture.

Bruce ran the Win64 test under Wine at ab9dec3. With no probe DLL configured, the prepare/bind/call case printed a skip and the late-load case ran. With VICTORY_HLE_PROBE_DLL pointing to a source-built fixture, both cases executed and passed. The no-DLL run also prints “2 passed” in Cargo’s summary because the skip returns normally. The skip message distinguishes those runs.

The four commits from that test head through 78d1449 change only the Linux workflow. The loader result therefore applies to the current loader code. The broader CI additions can be reviewed independently. Diff since the tested head

We also applied just the loader test and fixture changes to main ffe310e, leaving its CI files untouched. With the prebuilt probe, both Win64 Wine tests executed and passed on that combination.

SkippySteve and others added 3 commits November 24, 2026 06:21
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>
@Headache3318

Copy link
Copy Markdown

Combo verdict at the current heads (AI-assisted; Arch Linux kernel 7.3.5, rustc 1.98.1 pinned, exit-code judged): #232 @ 2c83383a applies cleanly on top of #235 @ 5d40ad81 over ffe310e (local merges 37cb1787 then aabc57ce): cargo check --workspace --all-targets exit 0, clippy -- -D warnings exit 0 with zero warnings, and #232's load_probe test compiles AND runs green on Linux — #90's compile blocker is cleared and this PR's own artifacts are proven innocent of the queue failures (its 5-file patch touches no victory-gpu line; the force-push ab9dec3a→2c83383a does not change that verdict).
The workspace test still never completes on the combo: rc 124 at 1800 s; with the hanging test skipped, 267 passed / 3 failed / 5 ignored across 23 binaries (fail-fast stops at 81/3), and the 3 failures + the hang sit entirely in #235's own new queue::host_free_tests (failures at queue.rs:594/611/641, E_POINTER 0x80004001 where S_OK or 0x80070057 expected) — matching 0xKaji's and elgreams' reports, so #232's merge decision turns on #235 fixing its gated queue tests, not on #232.

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs work: needs the maintainer's decision. This PR changes CI: it edits .github/workflows/ci.yml and adds a 1,149-line .github/workflows/linux-subset.yml, plus a new test fixture crate (tests/fixtures/hle-probe) and changes to crates/victory-loader/tests/load_probe.rs. CI workflows are left to the maintainer, so this triage can't recommend it on its own.

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

@SkippySteve SkippySteve closed this by deleting the head repository Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants