Build: Linux workspace, contributor setup and CI #112

Open
github-bot wants to merge 3 commits from github-bot/gh-112 into main AGit
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 00:37 UTC · original
Quat3rnion:contribution-setup → main · +333 −63 · 18 files · 3 commits · open

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 and HLE code; keep translate usable on Linux with its 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.
  • 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: 219 passed, 0 failed, 5 ignored on Linux with the pinned toolchain.
  • cargo xtask policy, cargo build --release --workspace, cargo check --workspace --all-features: pass.
  • Rebased onto main ffe310e.

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

**@⁠Quat3rnion** on GitHub · 2026-11-24 00:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/112) `Quat3rnion:contribution-setup` → `main` · +333 −63 · 18 files · 3 commits · open ## 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 and HLE code; keep `translate` usable on Linux with its 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. - 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`: 219 passed, 0 failed, 5 ignored on Linux with the pinned toolchain. - `cargo xtask policy`, `cargo build --release --workspace`, `cargo check --workspace --all-features`: pass. - Rebased onto main ffe310e. Title execution stays Windows-only. No game data used.
Gate Windows-only GPU and HLE code, keep the data and shader tools usable, and adapt path-dependent tests to the host platform. No game data is needed.
Add cargo xtask setup, a CONTRIBUTING guide, the Linux target, and make the pre-commit hook executable.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:50:39 +00:00
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-24 00:45 UTC · original

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).

**@⁠DaviTostes** on GitHub · 2026-11-24 00:45 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7118404541) 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).
Author
Owner

@⁠Sunkiller-qc on GitHub · 2026-11-24 01:05 UTC · original

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.

**@⁠Sunkiller-qc** on GitHub · 2026-11-24 01:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7118750597) 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.
Author
Owner

@⁠CesarLopesO on GitHub · 2026-11-24 01:33 UTC · original

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** on GitHub · 2026-11-24 01:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7119223958) 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!
Author
Owner

@⁠CesarLopesO on GitHub · 2026-11-24 01:38 UTC · original

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.

**@⁠CesarLopesO** on GitHub · 2026-11-24 01:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7119305227) ### 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.
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 01:41 UTC · original

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.

**@⁠SkippySteve** on GitHub · 2026-11-24 01:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7119346343) 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.
Author
Owner

@⁠LazyHatGuy on GitHub · 2026-11-24 02:50 UTC · original · edited 2026-11-24 02:55 UTC

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
**@⁠LazyHatGuy** on GitHub · 2026-11-24 02:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7120530923) · edited 2026-11-24 02:55 UTC 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
Author
Owner

@⁠catminou4 on GitHub · 2026-11-24 06:54 UTC · original

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.

**@⁠catminou4** on GitHub · 2026-11-24 06:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7124407862) 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.
Author
Owner

@⁠sebastianspicker on GitHub · 2026-11-24 10:48 UTC · original

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.

**@⁠sebastianspicker** on GitHub · 2026-11-24 10:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7129281224) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:17 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 00:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/112#issuecomment-7148346559) <!-- 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 has changes conflicting with the target branch.
  • apps/victory/src/translate.rs
  • crates/victory-hle/src/modules/xgameui.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/112/head:github-bot/gh-112'
git switch 'github-bot/gh-112'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-112'
git switch 'github-bot/gh-112'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-112'
git switch 'github-bot/gh-112'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-112'
git switch 'main'
git merge --squash 'github-bot/gh-112'
git switch 'main'
git merge --ff-only 'github-bot/gh-112'
git switch 'main'
git merge 'github-bot/gh-112'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!112
No description provided.