diff options
| author | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-30 20:20:15 +0100 |
|---|---|---|
| committer | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-30 20:24:47 +0100 |
| commit | d99ba5c095c0a66f27bd0b9418756f6ef1cfaed3 (patch) | |
| tree | ee34e6ae10e3e4859c8c9dab58d25a353820d8d5 /docs/testing.md | |
| parent | f462c263e97094bb37b4f459f5aa5d07af34e98c (diff) | |
| parent | 51dbc5b58e0e7886ddfeed1b0c75e5289c14372c (diff) | |
Merge main: drop the macos job as main does, keep this PR's runtime.yml path filters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/testing.md')
| -rw-r--r-- | docs/testing.md | 65 |
1 files changed, 56 insertions, 9 deletions
diff --git a/docs/testing.md b/docs/testing.md index c4eb86980..de3a6c89c 100644 --- a/docs/testing.md +++ b/docs/testing.md | |||
| @@ -83,6 +83,52 @@ Run `main` the same way for comparison (`git checkout main`, rebuild, run). Then | |||
| 83 | one line per mode, in the form `<GPU>, <driver>, Windows <build>: X of Y passed, K skipped, F failed (native); | 83 | one line per mode, in the form `<GPU>, <driver>, Windows <build>: X of Y passed, K skipped, F failed (native); |
| 84 | main at <commit>: ...`, plus any `FAIL` lines that differ from `main`. | 84 | main at <commit>: ...`, plus any `FAIL` lines that differ from `main`. |
| 85 | 85 | ||
| 86 | #### A runtime pull request, red and green on your fork's CI | ||
| 87 | |||
| 88 | A C++ pull request to `runtime/` can be checked red and green on the Runtime workflow of your own fork, with the | ||
| 89 | compiler the CI provides, when you cannot build it locally. It uses your fork's Actions minutes, not the project's. | ||
| 90 | Starting a run on a fork is described in | ||
| 91 | [Without a compiler: a CI-built runtime](#without-a-compiler-a-ci-built-runtime). A fork run does not replace the pull | ||
| 92 | request's own CI here, nor someone else's verification: it is one more data point. | ||
| 93 | |||
| 94 | 1. **Bring your fork's `main` up to date** (`git push <fork> origin/main:main`). "Run workflow" lists only a | ||
| 95 | workflow that exists on the fork's default branch. | ||
| 96 | 2. **Make two branches from the same `main` commit**, and write that commit down: | ||
| 97 | - `ci-green/<N>`: `main` plus the pull request, `git merge --no-ff pr-<N>`. | ||
| 98 | - `ci-red/<N>`: `main` plus only the pull request's test and how it is built: the test file(s) **and** the | ||
| 99 | test's registration in `runtime/CMakeLists.txt` (`add_executable` / `add_test`). Apply that part of the pull | ||
| 100 | request's diff (`git diff <merge-base> pr-<N> -- runtime/CMakeLists.txt | git apply --3way`) rather than checking | ||
| 101 | out the pull request's whole `CMakeLists.txt`, which would also undo what `main` has added since. | ||
| 102 | 3. **Commit the red side's test before pushing.** `git apply --3way` only stages the CMake lines: stage the test | ||
| 103 | file(s) as well, check with `git diff --cached` that the staged change is just the test and its registration, | ||
| 104 | and commit it on `ci-red/<N>`. Without that commit the pushed branch is still the plain `main` commit, and the | ||
| 105 | red run has no such test. | ||
| 106 | 4. **Push both branches to the fork and start the runs**: | ||
| 107 | `gh workflow run runtime.yml --repo <you>/<fork> --ref ci-green/<N>`, the same with `ci-red/<N>`, then | ||
| 108 | `gh run list --repo <you>/<fork>` for their ids. A pull request that only adds tests has nothing to remove for | ||
| 109 | red: run `main` itself as the red side. | ||
| 110 | |||
| 111 | When the red side proves nothing: | ||
| 112 | |||
| 113 | - **The test includes a file the pull request adds** (a new header next to the code): the red branch does not | ||
| 114 | compile (`fatal error: ... No such file or directory`). That shows the test needs the new code, not that it catches | ||
| 115 | the bug. Write "red: does not build without the pull request's new file", not "red: fails". | ||
| 116 | - **The test and its CMake lines alone pass on `main`**: the test does not exercise the change, or `main` already | ||
| 117 | behaves. Report "no red". | ||
| 118 | - **The test is not registered**: if the CMake lines stay on the green side only, the red build has no such test and | ||
| 119 | `ctest` cannot fail it. Check that the test's name is in the red run's `ctest` output. | ||
| 120 | |||
| 121 | Reading the result: open the `windows` job, step "CPU runtime tests" | ||
| 122 | (`ctest --test-dir runtime/build --output-on-failure --timeout 300`). Each test is a line | ||
| 123 | `k/T Test #i: <name> .... Passed` (or `***Failed`, `***Not Run (Disabled)`); the summary is | ||
| 124 | `100% tests passed out of R`, then the tests that did not run and, on a failure, `The following tests FAILED:`. | ||
| 125 | `R` excludes disabled tests, so report "R/R passed, D disabled (out of T)". A threaded timing test can fail once | ||
| 126 | on a shared runner: rerun that side before calling it a regression. Other jobs (`macos`, `linux-gpu-tools`, | ||
| 127 | `wine`) can be red on `main` too; compare with `main`'s latest Runtime run before blaming the pull request. | ||
| 128 | |||
| 129 | Comment on the pull request with the two run links, the `main` commit, and per side the test's own line and the | ||
| 130 | summary (red: ...; green: ...). | ||
| 131 | |||
| 86 | ## What you need | 132 | ## What you need |
| 87 | 133 | ||
| 88 | - **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so | 134 | - **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so |
| @@ -735,15 +781,16 @@ differences. | |||
| 735 | 781 | ||
| 736 | ## Macs in CI | 782 | ## Macs in CI |
| 737 | 783 | ||
| 738 | The `macos` job in `.github/workflows/runtime.yml` builds the runtime on GitHub's `macos-26` arm64 runner and runs | 784 | The `macos` job in `.github/workflows/runtime.yml` is currently disabled: the suite passes on real Apple Silicon |
| 739 | `ctest` and `run_gpu_tests.py` on MoltenVK on pushes to `main`, the daily schedule, and `workflow_dispatch`. The runner is a VM | 785 | hardware, while the hosted `macos-26` arm64 VM runner hits MoltenVK/paravirtual-device failures and macOS CI is |
| 740 | whose Metal device is "Apple Paravirtual device" (Metal family Mac2, not Apple7): MoltenVK runs on it with 32-wide | 786 | deferred for now. When enabled, it builds the runtime on `macos-26` and runs `ctest` and `run_gpu_tests.py` on |
| 741 | subgroups, so the wave64 and "32 lanes on request" tests skip there (about 75 of 190 in November 2026), and Mesa's | 787 | MoltenVK. The runner is a VM whose Metal device is "Apple Paravirtual device" (Metal family Mac2, not Apple7): |
| 742 | KosmicKrisp finds no device. `macos-15` can't build the runtime: Xcode 16's libc++ has no floating-point | 788 | MoltenVK runs on it with 32-wide subgroups, so the wave64 and "32 lanes on request" tests skip there (about 75 of |
| 743 | `std::from_chars`. A test known to fail on MoltenVK is listed in the step's `EXPECTED_FAILURES` with the pull | 789 | 190 in November 2026), and Mesa's KosmicKrisp finds no device. `macos-15` can't build the runtime: Xcode 16's libc++ |
| 744 | request or coordination-issue finding that tracks it; it still runs, and `scripts/ci_expected_failures.py` fails the step | 790 | has no floating-point `std::from_chars`. A test known to fail on MoltenVK is listed in the step's `EXPECTED_FAILURES` |
| 745 | on any other failure. It takes `FAILED_LIST EXIT_STATUS [EXPECTED ...]`, answers `--help`, and reports a list it cannot | 791 | with the pull request or coordination-issue finding that tracks it; it still runs, and |
| 746 | read or a non-numeric status as one line with exit code 2. | 792 | `scripts/ci_expected_failures.py` fails the step on any other failure. It takes `FAILED_LIST EXIT_STATUS [EXPECTED ...]`, |
| 793 | answers `--help`, and reports a list it cannot read or a non-numeric status as one line with exit code 2. | ||
| 747 | 794 | ||
| 748 | ## GPUs without fragment barycentrics (NVIDIA Volta, Pascal and older) | 795 | ## GPUs without fragment barycentrics (NVIDIA Volta, Pascal and older) |
| 749 | 796 | ||