Build: Linux workspace, contributor setup and CI #112

Open
Quat3rnion wants to merge 4 commits from upstream-pr/112 into main
Quat3rnion commented 2026-11-24 00:37:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T00:37:42Z.


What

Makes the workspace build and test on Linux and adds a one-command contributor setup. This combines the portable-test approach from #39 with the setup work prepared here, so #39 can be closed.

  • Gate Windows-only GPU, HLE, shader-validator and pipeline-prebuild code; keep translate and the data/shader tools usable on Linux with their DXIL and D3D12 checks disabled.
  • Use the host-aware path and storage tests from #39 instead of skipping them. Gate tests that parse the test binary as a PE image or need a host D3D12 device.
  • Add cargo xtask setup and CONTRIBUTING.md; install hooks and write a valid local config on both platforms.
  • Add a Linux CI workflow for workspace tests and the asset policy, alongside the existing Windows CI. The whole-tree formatting change was dropped to avoid conflicts with the other open PRs; the format gate stays tracked in #17.

Tested

  • cargo test --workspace --locked: 465 passed, 0 failed, 9 ignored on Linux with the pinned toolchain.
  • cargo xtask policy, cargo build --release --workspace, cargo check --workspace --all-features: pass.
  • Rebased onto main 63bcca43.

Title execution stays Windows-only. No game data used.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5463816788 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112). Originally posted by [Quat3rnion](https://github.com/Quat3rnion) on 2026-11-24T00:37:42Z. --- ## What Makes the workspace build and test on Linux and adds a one-command contributor setup. This combines the portable-test approach from #39 with the setup work prepared here, so #39 can be closed. - Gate Windows-only GPU, HLE, shader-validator and pipeline-prebuild code; keep `translate` and the data/shader tools usable on Linux with their DXIL and D3D12 checks disabled. - Use the host-aware path and storage tests from #39 instead of skipping them. Gate tests that parse the test binary as a PE image or need a host D3D12 device. - Add `cargo xtask setup` and CONTRIBUTING.md; install hooks and write a valid local config on both platforms. - Add a Linux CI workflow for workspace tests and the asset policy, alongside the existing Windows CI. The whole-tree formatting change was dropped to avoid conflicts with the other open PRs; the format gate stays tracked in #17. ## Tested - `cargo test --workspace --locked`: 465 passed, 0 failed, 9 ignored on Linux with the pinned toolchain. - `cargo xtask policy`, `cargo build --release --workspace`, `cargo check --workspace --all-features`: pass. - Rebased onto main 63bcca43. Title execution stays Windows-only. No game data used.
DaviTostes commented 2026-11-24 06:54:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T00:45:42Z.


Tested ee63908 on Arch Linux x86_64, rustc 1.98.1: pass, and it is the first branch that builds and tests on Linux without stacking #39.

  • cargo test --workspace --locked: 165 passed, 0 failed, 3 ignored (22 test binaries) — matches the PR's claim.
  • cargo fmt --all -- --check: clean (0 output).
  • main 7d33c46 still fails to build on Linux (E0425: cannot find function 'host_resource' in victory-gpu/src/resource.rs), so this is the branch that fixes it. Since it folds in #39, #39 can be closed with this one.
  • It also makes #90 closable (build state), as the description says.
  • cargo xtask policy: asset policy: 153 files ok.

No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7118404541 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7118404541). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-24T00:45:42Z. --- Tested `ee63908` on **Arch Linux x86_64, rustc 1.98.1**: **pass, and it is the first branch that builds and tests on Linux without stacking #39**. - `cargo test --workspace --locked`: **165 passed, 0 failed, 3 ignored** (22 test binaries) — matches the PR's claim. - `cargo fmt --all -- --check`: clean (0 output). - `main` `7d33c46` still fails to build on Linux (`E0425: cannot find function 'host_resource'` in `victory-gpu/src/resource.rs`), so this is the branch that fixes it. Since it folds in #39, #39 can be closed with this one. - It also makes #90 closable (build state), as the description says. - `cargo xtask policy`: `asset policy: 153 files ok`. No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent).
Sunkiller-qc commented 2026-11-24 06:54:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Sunkiller-qc on 2026-11-24T01:05:49Z.


The Linux gating and xtask setup look useful. One practical issue: the "format the workspace once" step puts a lot of pure reformatting (e.g. xma/tables.rs +820/-356) in with the cfg changes across 46 files. That makes the real changes harder to review, and the PR now conflicts with main and with many of the open PRs. Could the cargo fmt --all go in a separate last commit (or PR) that is redone right before merge, with this PR keeping only the gating, setup and CI? The fmt check in CI could then land together with that commit.

Static review, not built or run.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7118750597 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7118750597). Originally posted by [Sunkiller-qc](https://github.com/Sunkiller-qc) on 2026-11-24T01:05:49Z. --- The Linux gating and `xtask setup` look useful. One practical issue: the "format the workspace once" step puts a lot of pure reformatting (e.g. `xma/tables.rs` +820/-356) in with the cfg changes across 46 files. That makes the real changes harder to review, and the PR now conflicts with main and with many of the open PRs. Could the `cargo fmt --all` go in a separate last commit (or PR) that is redone right before merge, with this PR keeping only the gating, setup and CI? The fmt check in CI could then land together with that commit. Static review, not built or run.
CesarLopesO commented 2026-11-24 06:55:00 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by CesarLopesO on 2026-11-24T01:33:49Z.


I independently validated PR #112 on Debian 13 (Trixie).

Environment:

  • OS: Debian GNU/Linux 13.7
  • Kernel: 6.12.117+deb13-amd64
  • Architecture: x86_64
  • Rust: 1.98.1
  • Cargo: 1.98.1

Results:

  • cargo fmt --all -- --check — passed
  • cargo test --workspace --locked — 165 passed, 0 failed, 3 ignored
  • cargo xtask policy — passed (153 files OK)

The workspace compiled successfully on Debian 13. Some non-fatal compiler warnings were reported.

Working tree remained clean throughout testing.

Thanks for making Linux development more accessible!

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119223958 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7119223958). Originally posted by [CesarLopesO](https://github.com/CesarLopesO) on 2026-11-24T01:33:49Z. --- I independently validated PR #112 on Debian 13 (Trixie). **Environment:** - OS: Debian GNU/Linux 13.7 - Kernel: 6.12.117+deb13-amd64 - Architecture: x86_64 - Rust: 1.98.1 - Cargo: 1.98.1 **Results:** - `cargo fmt --all -- --check` — passed - `cargo test --workspace --locked` — 165 passed, 0 failed, 3 ignored - `cargo xtask policy` — passed (153 files OK) The workspace compiled successfully on Debian 13. Some non-fatal compiler warnings were reported. Working tree remained clean throughout testing. Thanks for making Linux development more accessible!
CesarLopesO commented 2026-11-24 06:55:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by CesarLopesO on 2026-11-24T01:38:39Z.


Additional independent validation — Debian 13

I performed an independent validation of the Linux contributor setup on Debian GNU/Linux 13.7.

Environment:

  • Debian 13.7
  • Kernel 6.12.117-amd64
  • x86_64
  • Rust 1.98.1

Results:

  • cargo fmt --all -- --check — passed.
  • cargo test --workspace --locked — 165 passed, 0 failed, 3 ignored.
  • cargo xtask policy — passed (153 files OK).
  • cargo xtask setup — successfully installed the Git hooks and generated the local configuration.
  • cargo xtask policy --staged — passed.
  • Verified that the pre-commit hook automatically rejects a staged file outside the asset-policy allowlist. The attempted commit was correctly blocked.
  • Repository working tree clean after testing.

The Git pre-commit integration works as expected on Debian 13.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119305227 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7119305227). Originally posted by [CesarLopesO](https://github.com/CesarLopesO) on 2026-11-24T01:38:39Z. --- ### Additional independent validation — Debian 13 I performed an independent validation of the Linux contributor setup on Debian GNU/Linux 13.7. **Environment:** - Debian 13.7 - Kernel 6.12.117-amd64 - x86_64 - Rust 1.98.1 **Results:** - `cargo fmt --all -- --check` — passed. - `cargo test --workspace --locked` — 165 passed, 0 failed, 3 ignored. - `cargo xtask policy` — passed (153 files OK). - `cargo xtask setup` — successfully installed the Git hooks and generated the local configuration. - `cargo xtask policy --staged` — passed. - Verified that the pre-commit hook automatically rejects a staged file outside the asset-policy allowlist. The attempted commit was correctly blocked. - Repository working tree clean after testing. The Git pre-commit integration works as expected on Debian 13.
SkippySteve commented 2026-11-24 06:55:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T01:41:10Z.


For reference: #235 only adds the cfg gates from #39, rebased onto current main. It's meant to go alongside this PR, not replace it. Once it merges, this PR can rebase onto it and drop the overlapping changes.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119346343 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7119346343). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T01:41:10Z. --- For reference: #235 only adds the cfg gates from #39, rebased onto current main. It's meant to go alongside this PR, not replace it. Once it merges, this PR can rebase onto it and drop the overlapping changes.
LazyHatGuy commented 2026-11-24 06:55:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by LazyHatGuy on 2026-11-24T02:50:40Z.


I have verified #112 on Garuda Linux, following the example from @CesarLopesO

Environment

  • Commit: ee63908d50295af044b7950ae5693e49fe88e357
  • OS: Garuda Linux x86_64
  • Kernel: Linux 7.3.5-zen1-1-zen
rustc --version
rustc 1.100.0 (0ef1bc386 2026-11-09) (Arch Linux rust 1:1.100.0-1)
rustc --version
rustc 1.100.0 (0ef1bc386 2026-11-09) (Arch Linux rust 1:1.100.0-1)

Results

  • cargo fmt --all -- --check -> Exit 0
  • cargo-summary test --workspace --locked -> TEST OK total=168 passed=165 failed=0 ignored=3 in 1.3s
  • cargo xtask policy -> asset policy: 153 files ok
  • cargo xtask policy --staged -> asset policy: 0 files ok
  • cargo xtask setup -> Installs hooks sucessfully
<!-- greyfinch-sync:Marvisak/VIctory:comment:7120530923 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7120530923). Originally posted by [LazyHatGuy](https://github.com/LazyHatGuy) on 2026-11-24T02:50:40Z. --- I have verified #112 on Garuda Linux, following the example from @CesarLopesO ### Environment - Commit: `ee63908d50295af044b7950ae5693e49fe88e357` - OS: Garuda Linux x86_64 - Kernel: Linux 7.3.5-zen1-1-zen ```shell rustc --version rustc 1.100.0 (0ef1bc386 2026-11-09) (Arch Linux rust 1:1.100.0-1) ``` ```shell rustc --version rustc 1.100.0 (0ef1bc386 2026-11-09) (Arch Linux rust 1:1.100.0-1) ``` ### Results - `cargo fmt --all -- --check` -> Exit 0 - `cargo-summary test --workspace --locked` -> TEST OK total=168 passed=165 failed=0 ignored=3 in 1.3s - `cargo xtask policy` -> asset policy: 153 files ok - `cargo xtask policy --staged` -> asset policy: 0 files ok - `cargo xtask setup` -> Installs hooks sucessfully
catminou4 commented 2026-11-24 06:56:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:54:10Z.


Heads-up for triage: this overlaps heavily with #235 + #523, which are currently the portability candidates being reviewed (I verified #523's head 0012266 compiles and passes the full macOS-buildable suite green). If #235/#523 land first, most of this PR's Linux-workspace changes will be redundant — worth checking the delta against those two before review effort.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7124407862 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7124407862). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T06:54:10Z. --- Heads-up for triage: this overlaps heavily with #235 + #523, which are currently the portability candidates being reviewed (I verified #523's head `0012266` compiles and passes the full macOS-buildable suite green). If #235/#523 land first, most of this PR's Linux-workspace changes will be redundant — worth checking the delta against those two before review effort.
sebastianspicker commented 2026-11-24 11:04:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by sebastianspicker on 2026-11-24T10:48:58Z.


The format pass here moves two // SAFETY: comments away from their unsafe blocks. Once this is rebased onto the current ci.yml (Windows clippy with -D warnings, and the workspace sets undocumented_unsafe_blocks = "warn"), clippy fails on both. At ee63908:

  • crates/victory-gpu/src/list.rs:1450: the comment sits above assert!(, and the unsafe block is now on the next line.
  • crates/victory-gpu/src/watch.rs:363: the same, with assert_eq!(.

I hit exactly these two after formatting 8e79c80 and running cargo clippy --target x86_64-pc-windows-msvc --workspace --all-targets -- -D warnings (clippy 0.1.98, cross-checked from macOS with cargo-xwin). Moving the block into a let keeps the comment attached, and rustfmt leaves it alone:

// SAFETY: the list is ours.
let uploads = unsafe { &(*list.cast::<List>()).uploads };
assert!(uploads.lock().unwrap().is_empty());
// SAFETY: the bytes just read.
let bytes = unsafe { std::slice::from_raw_parts((view + 100) as *const u8, 13) };
assert_eq!(bytes, b"from the disk");

With those two changes, both clippy runs from ci.yml (plain and --all-features) pass for the Windows target, and cargo fmt --all -- --check passes with rustfmt 1.98.1.

Two smaller things:

  • The format pass also reflows the 16 tables in crates/victory-formats/src/xma/tables.rs to one entry per line (SCALE alone becomes 121 lines). If the 8-per-row layout is worth keeping, #[rustfmt::skip] on each table does it.
  • The Garuda verification above used the distro's rustc 1.100. A non-rustup cargo ignores rust-toolchain.toml, and clippy 0.1.100 reports needless_range_loop in xma.rs and lower.rs that 0.1.98 does not, so results from a distro toolchain don't quite match CI.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7129281224 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7129281224). Originally posted by [sebastianspicker](https://github.com/sebastianspicker) on 2026-11-24T10:48:58Z. --- The format pass here moves two `// SAFETY:` comments away from their `unsafe` blocks. Once this is rebased onto the current `ci.yml` (Windows clippy with `-D warnings`, and the workspace sets `undocumented_unsafe_blocks = "warn"`), clippy fails on both. At `ee63908`: - `crates/victory-gpu/src/list.rs:1450`: the comment sits above `assert!(`, and the `unsafe` block is now on the next line. - `crates/victory-gpu/src/watch.rs:363`: the same, with `assert_eq!(`. I hit exactly these two after formatting `8e79c80` and running `cargo clippy --target x86_64-pc-windows-msvc --workspace --all-targets -- -D warnings` (clippy 0.1.98, cross-checked from macOS with cargo-xwin). Moving the block into a `let` keeps the comment attached, and rustfmt leaves it alone: ```rust // SAFETY: the list is ours. let uploads = unsafe { &(*list.cast::<List>()).uploads }; assert!(uploads.lock().unwrap().is_empty()); ``` ```rust // SAFETY: the bytes just read. let bytes = unsafe { std::slice::from_raw_parts((view + 100) as *const u8, 13) }; assert_eq!(bytes, b"from the disk"); ``` With those two changes, both clippy runs from `ci.yml` (plain and `--all-features`) pass for the Windows target, and `cargo fmt --all -- --check` passes with rustfmt 1.98.1. Two smaller things: - The format pass also reflows the 16 tables in `crates/victory-formats/src/xma/tables.rs` to one entry per line (`SCALE` alone becomes 121 lines). If the 8-per-row layout is worth keeping, `#[rustfmt::skip]` on each table does it. - The Garuda verification above used the distro's rustc 1.100. A non-rustup `cargo` ignores `rust-toolchain.toml`, and clippy 0.1.100 reports `needless_range_loop` in `xma.rs` and `lower.rs` that 0.1.98 does not, so results from a distro toolchain don't quite match CI. AI-assisted.
Marvisak commented 2026-11-25 01:07:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:17:00Z.


Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: apps/victory/src/translate.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148346559 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7148346559). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:17:00Z. --- <!-- victory-triage v1 head=89be655114315bb72a423390951ac59ae81ca3e1 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `apps/victory/src/translate.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/112:upstream-pr/112'
git switch 'upstream-pr/112'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/112'
git switch 'upstream-pr/112'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/112'
git switch 'upstream-pr/112'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/112'
git switch 'main'
git merge --squash 'upstream-pr/112'
git switch 'main'
git merge --ff-only 'upstream-pr/112'
git switch 'main'
git merge 'upstream-pr/112'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!112
No description provided.