Build and test the host-independent crates on Linux (patch on a fork) #892
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#892
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@JulianChavezdev on GitHub · 2026-11-24 13:34 UTC · original
Hi! I'd like to contribute a small, test-and-CI-only change, but pull requests are limited to collaborators, so I'm posting it here.
Branch: https://github.com/JulianChavezdev/VIctory/tree/linux-ci-and-pe-tests (3 commits on top of
ffe310e) Diff: https://github.com/Marvisak/VIctory/compare/main...JulianChavezdev:VIctory:linux-ci-and-pe-testsWhat it does:
victory-pe: four image tests read the test binary itself, which is PE32+ only on Windows, so they fail on Linux. They now use a synthetic DLL; the two that need a real MSVC image stay Windows-only. Adds tests for implib, which had none.
victory-gpu compiles on Linux (view_format is now cfg(windows) like host_resource), and two Windows-only test imports in victory-shader no longer warn there.
CI: a linux job running clippy -D warnings and tests for core, pe, formats, shader, pipeline, game and xtask, plus victory-gpu's host-independent tests.
docs/architecture.md: BCPack is no longer "planned".
Nothing changes on Windows other than the new tests. On Linux (toolchain 1.98.1): clippy clean, 175 tests passed, 5 ignored (need game files), asset policy ok.
Could you either merge the branch / cherry-pick the commits, or add me as a collaborator so I can open the PR? Happy to adjust anything.
@DaniiL35 on GitHub · 2026-11-24 14:05 UTC · original
Independent Verification Review: JulianChavezdev:linux-ci-and-pe-tests (
e87b26b..f8c107f)Audited Julian Chavez's branch on non-Windows host (macOS Darwin aarch64 / POSIX):
1. Root Cause Resolution for Issue #90 (
victory-gpuE0425)crates/victory-gpu/src/resource.rs:282,pub(crate) fn view_formatinvokedhost_resource(this)?. Becausehost_resourceis defined exclusively under#[cfg(windows)](line 780), compilingvictory-gpuon any non-Windows target (Linux or macOS) failed witherror[E0425]: cannot find function 'host_resource' in this scope.view_formatacross the entire codebase is insideRtvRecord::host_descincrates/victory-gpu/src/descriptor.rs:226, which is already gated with#[cfg(windows)]at line 219. Gatingview_formatwith#[cfg(windows)]is therefore completely self-contained and resolves the build failure tracked in #90 without breaking any API surface.2. Cross-Platform PE Fixture & Test Correctness (
victory-pe)crates/victory-pe/src/image.rsreadstd::env::current_exe(). On non-Windows hosts, the test runner binary is ELF (Linux) or Mach-O 64-bit (macOS), causing all four image tests to fail immediately outside Windows.own_image()in generic tests with the proceduralimport_image()fixture generates a synthetic PE32+ DLL importingkernel32.dll!ExitProcess(hint 7). The two tests requiring authentic MSVC-linked layout stay gated behind#[cfg(windows)].crates/victory-pe/src/implib.rs, the new test suite (reads_code_data_const_and_ordinal_imports,duplicates_are_merged_and_other_members_counted,an_empty_archive_has_no_imports,rejects_garbage_without_panicking) verifies COFF archive handling with synthetic 60-byte headers.Vec<u8>); zero game assets, binaries, or large base64/hex blobs are included.3. Non-Windows HLE & Shader Hygiene (
victory-hle,victory-shader)crates/victory-shader/src/emit/mod.rsgatesAttrandShadertest imports with#[cfg(windows)], eliminating-D unused-importscompiler errors under non-Windows.crates/victory-hle/src/modules/d3d12x.rs: Correctly wrapsvictory_gpu::on_failure(a Windows-only export) and allocator hooks under#[cfg(windows)].crates/victory-hle/src/modules/xgame.rs:#[cfg(not(windows))] drop(command);prevents-D unused-variablewarnings.crates/victory-hle/src/modules/xgameui.rs: Host dialog cleanly falls back toask -> Noneoff Windows.C:\...drives) inkernel.rsandstorage.rsare gated#[cfg(windows)], resolving POSIX path separator incompatibilities.4. CI Workflow Design (
.github/workflows/ci.yml)linuxjob is structurally sound:cargo clippy $PORTABLE --all-targets --locked -- -D warningsensures all truly portable crates stay strictly warning-clean.cargo test $PORTABLE -p victory-gpu -p victory-hle --lockedexecutes all host-independent unit tests across the workspace without triggering false-positivedead_codewarnings on host-only structures invictory-gpu.Ready to merge or cherry-pick cleanly onto
main.AI-assisted review with Antigravity.
@JulianChavezdev on GitHub · 2026-11-24 14:10 UTC · original
Thanks for the independent review, @DaniiL35!
I also see now that #112 and #235 already gate the same Windows-only paths and add a Linux CI job, so I don't want to compete with them. Whichever of them lands, I'm happy to rebase on top of it and keep only what they don't cover:
The branch now has 5 commits (223 tests pass on Linux, and clippy for the Windows target is clean); I've updated the description above
@Marvisak on GitHub · 2026-11-25 06:50 UTC · original
Automated triage for the maintainers.
Thanks. The parts of this branch are already covered by open pull requests: the
view_formatgate that fixes the Linux build (#90) is in #2008, a Linux CI job for the host-independent crates is #1241 (and #112), andimplibtests are in #1814. Thedocs/architecture.mdfix has landed: BCPack is listed as implemented onmain. Pull requests are open to everyone now, so what remains (thevictory-peimage tests on a synthetic DLL, the README section on working from Linux) can be opened as a pull request against currentmain. The maintainers decide whether Linux CI fits the project.Generated by Claude Code