CI: the crates that run anywhere are tested on Linux too #165
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!165
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-165"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@illuminatedfellow on GitHub · 2026-11-25 18:12 UTC · original
illuminatedfellow:ci/linux-portable-tests→main· +21 −0 · 4 files · 3 commits · closed without mergingWhat
One commit, three files, 20 lines added:
.github/workflows/ci.yml: a second job,portable, onubuntu-latest. It runs the tests ofvictory-core,victory-formats,victory-pipeline,victory-gameandvictory-shader, then those ofvictory-gpuone at a time (--test-threads=1). The Windows job is unchanged.crates/victory-gpu/src/resource.rs:view_formatis#[cfg(windows)]. It reads the host resource, which only Windows builds have, and its one caller (descriptor.rs,host_desc) is already Windows-only.crates/victory-gpu/src/list.rs: the testlists_are_cut_at_waits_that_follow_workis#[cfg(windows)]. It callscrate::host,submittedandhost_list, which are Windows-only.Nothing changes in a Windows build: both items are only used from Windows-only code.
Why
victory-gpudid not build off Windows: those two places were the only errors (cargo check --workspace --all-targetson Linux). With them gated, the crate builds and 35 of its tests run on Linux. That covers the frame pacing, timeline, queue, descriptor and list code that is not behindcfg(windows).The Linux job is quicker than the Windows one. It also catches Windows-only code that slips into these crates' portable parts, as these two did.
Why one at a time for victory-gpu
Run together on Linux,
queue::tests::present_runs_after_a_queues_waitfailed in 2 of 3 runs. This is the race described in #116: the tests' threads pump each other's queues. #132 addresses it. One at a time it passed 15 of 15 local runs and on GitHub Actions. Once #132 is in,--test-threads=1can go.Not included
victory-peandvictory-loader: their tests parse the test binary itself as a PE file, so they fail on Linux by design.victory-hleand the app: they do not build off Windows yet (severalcfg(windows)modules are used ungated). #41 covers that, along with much more. This PR is a smaller step that does not conflict with it.xtask:repository_passes_policyfails onmaineverywhere (lower.rsis over the size limit).victory-gpuhas about 40 dead-code warnings there (code only Windows uses), so-D warningswould fail.Tested
rust-toolchain.toml: the job's two commands pass. 264 tests: core 11, formats 24 (4 ignored), pipeline 4, game 2, shader 185 + 3, gpu 35.ubuntu-latest: theportablejob passed with the same counts.main(the 10victory-shaderlints #3 fixes, and behind them about 47 more invictory-gpu). None of them are in the lines changed here. On a fork-only branch where clippy does not stop the job,cargo test --workspacegave:victory-gpu113 passed, 0 failed, 4 ignored (this includeslists_are_cut_at_waits_that_follow_work, gated here, andframe::tests::statistics_return_none_and_are_counted), core 11, formats 24, game 2, the app 1. It then stopped at the fivexmemtests invictory-hlethat fail onmaintoo (#2, #8), so the crates after it did not run on Windows; this change does not touch them. The run ismainplus #3's clippy fix, both of my PRs, and clippy set not to stop the job.cargo clippy --target x86_64-pc-windows-msvcwith and without--all-features: no new warnings in the changed files.No game files were used. The game was not run: nothing here reaches it.
000ffdd) into ci/linux-portable-tests f5f9e2addd@KernelSmoker on GitHub · 2026-11-25 18:29 UTC · original
Independent verification on PR head
3041798(Bazzite Linux 45 x86_64, Rust 1.98.1):portablejob commands (with--offline --locked):cargo test --locked -p victory-core -p victory-formats -p victory-pipeline -p victory-game -p victory-shader: 229 passed, 0 failed, 11 ignored (victory-core11,victory-formats24 / 4 ignored,victory-game2,victory-pipeline4,victory-shader185 / 6 ignored +resource_tracking3 / 1 ignored).cargo test --locked -p victory-gpu -- --test-threads=1: 35 passed, 0 failed, 1 ignored (5/5 serial runs passed; 5/5 parallel runs also passed here). Total: 264 passed, 0 failed, matching the PR description.victory-pe(3 passed, 4 failed) andvictory-loader(0 passed, 3 failed) compile cleanly on Linux and fail only the tests that parsecurrent_exe()as PE (Malformed("Unknown file magic")on ELF).xtaskcompiles cleanly on Linux (3 passed, 1 failed:policy::tests::repository_passes_policyoncrates/victory-shader/src/emit/lower.rs, 630652 > 524288 bytes, matchingmain).victory-hleandvictoryfail to compile on Linux due to ungated Windows modules.resource::view_formathas a single caller (crates/victory-gpu/src/descriptor.rs, inside#[cfg(windows)] fn host_desc).cargo check --workspace --all-targets --locked --target x86_64-pc-windows-gnupassed both with default features and with--all-features, with no new warnings inresource.rsorlist.rs(cross-target check in the Fedora 45 container, not a native Windows/MSVC run).--features diagnosticsalso builds and passes all tests on Linux forvictory-core(11),victory-shader(185 + 3), andvictory-gpu(35 with--test-threads=1), in case you wantportableto guarddiagnostics-gated Linux paths as well.No game files were used and the game was not launched.
@illuminatedfellow on GitHub · 2026-11-25 19:03 UTC · original
Thank you for checking it on another machine and for the note on
--features diagnostics. I'll leave the job as it is unless Belobug prefers it covered too; it is one more line if so.@illuminatedfellow on GitHub · 2026-11-25 19:11 UTC · original
Updated for the current
main:readout.rs(50a9fa4) useswindows::Win32::Foundation::RECTand is only called fromhost.rs, sovictory-gpustopped building on Linux again and this job would have failed. I mergedmain(000ffdd) into the branch and gatedmod readoutwith#[cfg(windows)], likehost(4a33b31). Nothing changes on Windows; the job's commands pass again locally (264 tests).@KernelSmoker on GitHub · 2026-11-25 19:15 UTC · original
Re-verified updated PR head
4a33b31(after mergingmain000ffddand gatingmod readout): bothportablejob commands pass on Bazzite Linux 45 (Rust 1.98.1) with 264 passed, 0 failed (victory-core11,victory-formats24 / 4 ignored,victory-game2,victory-pipeline4,victory-shader185 + 3 / 7 ignored,victory-gpu35 / 1 ignored with--test-threads=1).Pull request closed