CI: consolidate Linux and native Apple Silicon offline validation #438

Closed
pedrofort wants to merge 28 commits from upstream-pr/438 into main
pedrofort commented 2026-11-24 03:24:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pedrofort on 2026-11-24T03:24:26Z.


Objective

Consolidate native cross-platform build and offline
shader validation for Windows, Linux and Apple Silicon.

Attribution and dependencies

  • #39 by @LaunchDoesntCode: original portability approach.
  • #235 by @SkippySteve: native non-Windows workspace support.
  • SkippySteve/VIctory#2 by @elgreams: queue test-order fix.
  • #112 by @Quat3rnion: related Linux portability and CI work.
    Overlapping changes are not imported.
  • #438 by @pedrofort: native Apple Silicon CI and
    synthetic offline shader translation tests.

The dependency commits retain their original authors.
This PR is an integration candidate, not a replacement
claim for their independent contributions.

Local validation on Apple M5

Check Result
Workspace tests 271 passed, 0 failed, 5 ignored
GPU tests, sequential PASS
GPU tests, five parallel runs PASS
Workspace check, all targets/features PASS
Clippy, default and all features PASS
Asset policy PASS
Native ARM64 release build PASS
Synthetic offline CLI PASS

Scope

Windows runtime behavior is not intentionally changed.
Linux and macOS support offline tools and tests.
Native title execution is not claimed.

Updated Linux and Windows hosted CI results are pending.
No game assets or proprietary binaries.

AI-assisted implementation with ChatGPT.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6573906380 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/438). Originally posted by [pedrofort](https://github.com/pedrofort) on 2026-11-24T03:24:26Z. --- ## Objective Consolidate native cross-platform build and offline shader validation for Windows, Linux and Apple Silicon. ## Attribution and dependencies - #39 by @LaunchDoesntCode: original portability approach. - #235 by @SkippySteve: native non-Windows workspace support. - SkippySteve/VIctory#2 by @elgreams: queue test-order fix. - #112 by @Quat3rnion: related Linux portability and CI work. Overlapping changes are not imported. - #438 by @pedrofort: native Apple Silicon CI and synthetic offline shader translation tests. The dependency commits retain their original authors. This PR is an integration candidate, not a replacement claim for their independent contributions. ## Local validation on Apple M5 | Check | Result | |---|---| | Workspace tests | 271 passed, 0 failed, 5 ignored | | GPU tests, sequential | PASS | | GPU tests, five parallel runs | PASS | | Workspace check, all targets/features | PASS | | Clippy, default and all features | PASS | | Asset policy | PASS | | Native ARM64 release build | PASS | | Synthetic offline CLI | PASS | ## Scope Windows runtime behavior is not intentionally changed. Linux and macOS support offline tools and tests. Native title execution is not claimed. Updated Linux and Windows hosted CI results are pending. No game assets or proprietary binaries. AI-assisted implementation with ChatGPT.
catminou4 commented 2026-11-24 06:53:02 +00:00 (Migrated from github.com)

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

Review: APPROVED


Verified the full Apple Silicon workflow locally on real Apple Silicon (macOS 26, arm64), rustc 1.98.1 (aarch64-apple-darwin), at head 4e107dd:

  • cargo xtask policy: 153 files ok
  • cargo check --workspace --all-targets --locked: clean (stricter than the workflow's --workspace)
  • cargo test --workspace --locked: all suites pass — 162 passed, 0 failed, 3 ignored (the PE-binary tests gated off non-Windows)
  • cargo build --workspace --release --locked: ok; file target/release/victory → Mach-O 64-bit executable arm64
  • bash tests/offline-cli.sh target/release/victory: OFFLINE CLI SMOKE TEST: PASS (DXIL container validation included; the two needs Windows errors are the expected skips)

The workflow does what it says and passes end-to-end on the exact head commit.

<!-- greyfinch-sync:Marvisak/VIctory:review:6034732193 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/438#pullrequestreview-6034732193). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T06:35:35Z. **Review:** APPROVED --- Verified the full Apple Silicon workflow locally on real Apple Silicon (macOS 26, arm64), rustc 1.98.1 (aarch64-apple-darwin), at head 4e107dd: - `cargo xtask policy`: 153 files ok - `cargo check --workspace --all-targets --locked`: clean (stricter than the workflow's `--workspace`) - `cargo test --workspace --locked`: all suites pass — 162 passed, 0 failed, 3 ignored (the PE-binary tests gated off non-Windows) - `cargo build --workspace --release --locked`: ok; `file target/release/victory` → Mach-O 64-bit executable arm64 - `bash tests/offline-cli.sh target/release/victory`: OFFLINE CLI SMOKE TEST: PASS (DXIL container validation included; the two `needs Windows` errors are the expected skips) The workflow does what it says and passes end-to-end on the exact head commit.
SkippySteve commented 2026-11-24 06:55:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T03:28:40Z.


I ran this on Linux x86_64 (Arch, Rust 1.98.1, Python 3.14) at 74cf6bc. The new script is not tied to macOS, so it also works as a Linux check.

Check Result
cargo xtask policy 153 files ok
cargo test --workspace --locked 162 passed, 0 failed, 3 ignored (same counts as your M5)
cargo clippy --workspace --all-targets --locked --exclude victory-shader -- -D warnings clean
cargo build --workspace --release --locked ELF x86-64
bash tests/offline-cli.sh target/release/victory PASS: 3 containers, 1 duplicate skipped, 2 of 2 compute programs emitted, both .dxil have valid structure (1248 and 2136 bytes), --validate and --pipelines both stop with needs Windows (D3D12 / dxil.dll)
same script on the debug binary PASS

Notes (none of them block):

  1. Stacking. The diff against main contains all of #235 (17 files, +108/−10) as well as your commit. If this merges first, #235 lands with it. Either rebase after #235 merges, or say in the description that merging this also merges #235.
  2. TMPDIR in the source tree. If TMPDIR points inside the checkout, victory-core's policy::tests::accepts_unrelated_directories fails by design: it refuses temp paths in the repo. Runners use a temp dir outside the checkout, so CI is not affected. This is only a warning for anyone who reproduces locally with a tmp dir in the worktree, which I first did.
  3. Triggers. The workflow runs on both push: and pull_request: with no branch filter. The concurrency group is github.ref, which differs between the two events (refs/heads/… vs refs/pull/N/merge). So a branch in this repo with an open PR runs the macOS job twice. Adding branches: [main] under push would avoid that. macOS minutes cost more than Linux minutes.
  4. tests/offline-cli.sh is mode 100644. That is fine because CI calls it with bash, but chmod +x would let people run tests/offline-cli.sh <bin> directly.
  5. Linux CI. Once #235 is in, the same cargo test --workspace plus bash tests/offline-cli.sh target/release/victory steps could go into the Linux job (#232 is the interim Linux subset). That would give the offline translator x86-64 Linux coverage too. This can be a follow-up.

I did not test on Windows, on macOS, or on a hosted runner. I used no game files: the script makes its own synthetic shaders.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121134726 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/438#issuecomment-7121134726). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T03:28:40Z. --- I ran this on Linux x86_64 (Arch, Rust 1.98.1, Python 3.14) at `74cf6bc`. The new script is not tied to macOS, so it also works as a Linux check. | Check | Result | |---|---| | `cargo xtask policy` | 153 files ok | | `cargo test --workspace --locked` | 162 passed, 0 failed, 3 ignored (same counts as your M5) | | `cargo clippy --workspace --all-targets --locked --exclude victory-shader -- -D warnings` | clean | | `cargo build --workspace --release --locked` | ELF x86-64 | | `bash tests/offline-cli.sh target/release/victory` | **PASS**: 3 containers, 1 duplicate skipped, 2 of 2 compute programs emitted, both `.dxil` have valid structure (1248 and 2136 bytes), `--validate` and `--pipelines` both stop with `needs Windows (D3D12 / dxil.dll)` | | same script on the debug binary | PASS | Notes (none of them block): 1. **Stacking.** The diff against `main` contains all of #235 (17 files, +108/−10) as well as your commit. If this merges first, #235 lands with it. Either rebase after #235 merges, or say in the description that merging this also merges #235. 2. **TMPDIR in the source tree.** If `TMPDIR` points inside the checkout, `victory-core`'s `policy::tests::accepts_unrelated_directories` fails by design: it refuses temp paths in the repo. Runners use a temp dir outside the checkout, so CI is not affected. This is only a warning for anyone who reproduces locally with a tmp dir in the worktree, which I first did. 3. **Triggers.** The workflow runs on both `push:` and `pull_request:` with no branch filter. The concurrency group is `github.ref`, which differs between the two events (`refs/heads/…` vs `refs/pull/N/merge`). So a branch in this repo with an open PR runs the macOS job twice. Adding `branches: [main]` under `push` would avoid that. macOS minutes cost more than Linux minutes. 4. `tests/offline-cli.sh` is mode 100644. That is fine because CI calls it with `bash`, but `chmod +x` would let people run `tests/offline-cli.sh <bin>` directly. 5. **Linux CI.** Once #235 is in, the same `cargo test --workspace` plus `bash tests/offline-cli.sh target/release/victory` steps could go into the Linux job (#232 is the interim Linux subset). That would give the offline translator x86-64 Linux coverage too. This can be a follow-up. I did not test on Windows, on macOS, or on a hosted runner. I used no game files: the script makes its own synthetic shaders.
DaviTostes commented 2026-11-24 06:55:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-24T03:55:25Z.


Verified 4e107dd on Arch Linux x86_64 (rustc 1.98.1) — this is the first PR I have seen that makes the workspace usable off Windows:

  • cargo build --workspace: ok (debug, 30 s).
  • cargo test --workspace --no-fail-fast: 162 passed, 0 failed, 3 ignored across the workspace. (Before this line of work, victory-gpu was the blocker on Linux.)
  • bash tests/offline-cli.sh target/debug/victory: OFFLINE CLI SMOKE TEST: PASS. The two Error: needs Windows (D3D12 / dxil.dll) lines are the expected off-Windows paths, not failures.
  • No textual conflict with #312 (git merge-tree --write-tree pr438 pr312 clean).

Not covered: the macOS/aarch64 target and the workflow itself (this machine is x86-64 Linux, no Apple runner), and title data (none here). Still, the cfg(not(windows)) path the Apple job depends on is exercised end to end.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121545031 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/438#issuecomment-7121545031). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-24T03:55:25Z. --- Verified `4e107dd` on **Arch Linux x86_64** (rustc 1.98.1) — this is the first PR I have seen that makes the workspace usable off Windows: - `cargo build --workspace`: **ok** (debug, 30 s). - `cargo test --workspace --no-fail-fast`: **162 passed, 0 failed, 3 ignored** across the workspace. (Before this line of work, `victory-gpu` was the blocker on Linux.) - `bash tests/offline-cli.sh target/debug/victory`: **OFFLINE CLI SMOKE TEST: PASS**. The two `Error: needs Windows (D3D12 / dxil.dll)` lines are the expected off-Windows paths, not failures. - No textual conflict with #312 (`git merge-tree --write-tree pr438 pr312` clean). Not covered: the macOS/aarch64 target and the workflow itself (this machine is x86-64 Linux, no Apple runner), and title data (none here). Still, the `cfg(not(windows))` path the Apple job depends on is exercised end to end.
pedrofort commented 2026-11-24 06:55:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pedrofort on 2026-11-24T03:56:58Z.


@SkippySteve @DaviTostes Thanks for the independent validation and detailed feedback!

I've addressed the workflow and script suggestions in commit 4e107dd, including duplicate CI triggers, temporary directory handling and executable permissions.

All three smoke test scenarios passed on my Apple M5. It's great to see the updated commit also passing on Arch Linux with 162 tests and no failures.

I'll rebase once #235 lands to keep the diff focused and preserve proper attribution for SkippySteve's portability work.

I also agree on reusing the offline smoke test for Linux CI as a follow-up.

Really appreciate your contributions and testing!

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121568260 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/438#issuecomment-7121568260). Originally posted by [pedrofort](https://github.com/pedrofort) on 2026-11-24T03:56:58Z. --- @SkippySteve @DaviTostes Thanks for the independent validation and detailed feedback! I've addressed the workflow and script suggestions in commit `4e107dd`, including duplicate CI triggers, temporary directory handling and executable permissions. All three smoke test scenarios passed on my Apple M5. It's great to see the updated commit also passing on Arch Linux with 162 tests and no failures. I'll rebase once #235 lands to keep the diff focused and preserve proper attribution for SkippySteve's portability work. I also agree on reusing the offline smoke test for Linux CI as a follow-up. Really appreciate your contributions and testing!
upstream-sync changed title from [PR #438] CI: native Apple Silicon builds and synthetic offline shader tests to [PR #438] CI: consolidate Linux and native Apple Silicon offline validation 2026-11-24 21:01:41 +00:00
pedrofort commented 2026-11-24 21:03:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pedrofort on 2026-11-24T20:34:09Z.


Additional offline regression coverage validated on Apple M5
at 98e01ff90e15d80899d9d6117822b1d9df63cd41.

  • 12 deterministic translation runs: jobs=1,2,4,64,
    three runs per worker count.
  • Multiple synthetic containers in one file exercise
    actual per-file parallel translation.
  • Identical SHA-256 multisets across all runs.
  • DXBC part overlap, DXIL program bounds and LLVM
    bitcode header checks.
  • GitHub Actions job summaries and synthetic diagnostic
    logs retained on failure.

The previous consolidated candidate passed 271 workspace
tests, with 0 failures and 5 ignored. This follow-up changes
only tests and CI, not production Rust code.

Thanks to the portability contributors and previous
independent reviewers. Further Linux/macOS retesting
is welcome.

AI-assisted with ChatGPT. No game assets.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7143746138 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/438#issuecomment-7143746138). Originally posted by [pedrofort](https://github.com/pedrofort) on 2026-11-24T20:34:09Z. --- Additional offline regression coverage validated on Apple M5 at `98e01ff90e15d80899d9d6117822b1d9df63cd41`. - 12 deterministic translation runs: jobs=1,2,4,64, three runs per worker count. - Multiple synthetic containers in one file exercise actual per-file parallel translation. - Identical SHA-256 multisets across all runs. - DXBC part overlap, DXIL program bounds and LLVM bitcode header checks. - GitHub Actions job summaries and synthetic diagnostic logs retained on failure. The previous consolidated candidate passed 271 workspace tests, with 0 failures and 5 ignored. This follow-up changes only tests and CI, not production Rust code. Thanks to the portability contributors and previous independent reviewers. Further Linux/macOS retesting is welcome. AI-assisted with ChatGPT. No game assets.
upstream-sync closed this pull request 2026-11-25 00:05:27 +00:00
Marvisak commented 2026-11-25 00:06:57 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers. Closing because it is outside the project's scope (VIctory targets Windows hosts; ports, launchers and tooling for other platforms are not being taken).

Re-packages #235 and adds macOS/Apple Silicon and Linux CI workflows with a 330-line shell test: a bundle, and CI for hosts the project does not target.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148077466 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/438#issuecomment-7148077466). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:02:48Z. --- Automated triage for the maintainers. Closing because it is outside the project's scope (VIctory targets Windows hosts; ports, launchers and tooling for other platforms are not being taken). Re-packages #235 and adds macOS/Apple Silicon and Linux CI workflows with a 330-line shell test: a bundle, and CI for hosts the project does not target. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

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!438
No description provided.