Skip to content

CI builds and tests with the toolchain the project supports (Xcode 27.1) - #421

Closed
v0lumehi wants to merge 1 commit into
seedds:mainfrom
v0lumehi:ci-xcode-27
Closed

v0lumehi wants to merge 1 commit into
seedds:mainfrom
v0lumehi:ci-xcode-27

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Result: this PR's CI run on xcode-27 is green in every job (build check 5m07s, host tests 1m46s, tool tests 2m10s, iOS app 1m19s; about as long as on macos-26). The build check's toolchain step shows Xcode 27.1, Build version 27A9275 and Apple metal version 32023.921 (metalfe-32023.921.6), the lock's compiler, and --check-metal passes. The jobs waited a few minutes in the queue for the preview image.

Part of #313 ("A clear platform scope": the build Mac's toolchain).

Problem

The project supports one toolchain:

But every macOS job in tests.yml runs on GitHub's macos-26 image with its default Xcode 26.6. So CI checks a compiler the project doesn't support, and can miss a regression with the one it does.

It already showed: in the sanitizer job of #412, Xcode 26.6 inlined functions that 27.1 doesn't, and TSan reported known races under other function names, so their suppressions didn't match.

Change

  • The four macOS jobs run on the xcode-27 image. That's macOS 27 with Xcode 27.0, 27.1 (default) and 27.2 RC (runner-images#14404).
  • DEVELOPER_DIR names Xcode 27.1 by path, so the image's default moving to 27.2 doesn't move CI.
  • The build check starts with the toolchain: it prints xcodebuild -version and xcrun metal --version, then runs own_compilers.py --check-metal, which fails when the runner's Metal compiler isn't the lock's.
  • dm/tools/tests/test_ci_toolchain.py keeps the names in step: the Xcode in DEVELOPER_DIR is the one README and the NSP script name, and every macOS job runs on that Xcode's image (xcode-<major>). Raising the toolchain is one change across all of them, like the ruff / pyright pins.
  • docs/development.md (Continuous integration) explains it.

Risk

  • xcode-27 is a preview image. GitHub warns about possible queueing and instability. If that hurts, a job can go back to macos-26 for a while; the test would then say so.
  • This also drops CI coverage of Xcode 26.x. If you want the host to keep building with Xcode 26, one extra job on macos-26 would do that. That's your call; I left it out because README names 27.1 only.
  • GitHub's Macs are still virtual and have no Metal 4 (Run-time shader capture without Metal 4 (virtual Macs / CI): Balatro can't pack on GitHub's macos-26 runner #112), so the Metal tests stay local either way.

Checked

  • test_ci_toolchain.py passes as committed and fails with Xcode_27.2.app in the workflow (two checks). Lint ratchet 0 new; test_docs OK; the YAML parses.
  • own_compilers.py --check-metal passes on this Mac (Xcode 27.1, Apple metal version 32023.921) with the system Python 3.9, which is all the runner's step needs.
  • This PR's own CI run is the first on xcode-27, so its result shows whether the image works for every job.

README tells players to install Xcode 27.1, dmsh_chain.lock holds its Metal
compiler, and the NSP script stops on any other, but every macOS job in
tests.yml ran on GitHub's macos-26 image with its default Xcode 26.6. CI so
checked a compiler the project does not support, and could miss a
regression with the one it does. It showed in the sanitizer job of seedds#412:
Xcode 26.6 inlined functions that Xcode 27.1 does not, and TSan reported
known races under other names.

The four macOS jobs now run on the xcode-27 image (macOS 27, a preview image
GitHub offers since July), with DEVELOPER_DIR naming Xcode 27.1 by path, so
the image's default moving to 27.2 does not move CI. The build check starts
by printing the Xcode and Metal versions and running own_compilers.py
--check-metal, which fails when the runner's Metal compiler is not the
lock's.

test_ci_toolchain.py keeps the names in step: the Xcode in DEVELOPER_DIR is
README's and the NSP script's, and every macOS job runs on its image
(xcode-<major>). Checked: it fails with 27.2 in the workflow and passes as
committed; --check-metal passes with the system Python 3.9 on this Mac.
seedds added a commit that referenced this pull request Oct 27, 2026
Integrate the sanitizer targets, HID fixture correction and pinned Xcode
27.1 CI toolchain from #412, #443 and #421. Select the matching runner for
the new sanitizer job as well as the four existing jobs.

Decode audio command headers without alignment assumptions and validate
their extents before consuming them. Finish AudioUnit construction before
publishing an output to lifecycle and watchdog readers. Publish pthread
handles under the scheduler lock and serialize startup, priority and QoS
fields with their readers. Remove all three real-bug suppressions.

Add unaligned/truncated header coverage, an output-publication assertion
and priority/QoS registration checks, including QoS-enabled TSan CI cases.
Document the mechanisms and retain only fixture/framework exceptions.

Plain host, ASan/UBSan, TSan, 40 QoS startup stress runs, the complete Metal
graphics suite, 525 Python tests (20 skipped), lint, all 178 iOS source
compiles and the unsigned synthetic iOS app build passed. Gameplay
regression results are reported with the PR follow-up.

Fixes #409
Fixes #410
Fixes #411

Co-authored-by: v0lumehi <[email protected]>
@seedds

seedds commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Applied directly to main in ce99604, with v0lumehi credited as co-author.

All five jobs, including #412's new sanitizer job, now use xcode-27 with Xcode 27.1 selected by DEVELOPER_DIR. The build job prints the compiler versions and checks Metal against dmsh_chain.lock. The consistency test exposed the fifth-job integration gap before that runner was corrected, and all three toolchain tests pass afterward.

Main CI: main tests (all five jobs passed); lint passed

Local host/sanitizer tests, 525 Python tests (20 skipped), lint, 178 iOS source compiles and an unsigned synthetic iOS app build passed. The mounted Metal compiler exactly matches both lock entries. The combined game report and sanitizer root fixes are documented in the completed validation report. Closing because the supported-toolchain configuration is now on main.

@seedds seedds closed this Oct 27, 2026
Know-It-All-Brother pushed a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
Integrate the sanitizer targets, HID fixture correction and pinned Xcode
27.1 CI toolchain from seedds#412, seedds#443 and seedds#421. Select the matching runner for
the new sanitizer job as well as the four existing jobs.

Decode audio command headers without alignment assumptions and validate
their extents before consuming them. Finish AudioUnit construction before
publishing an output to lifecycle and watchdog readers. Publish pthread
handles under the scheduler lock and serialize startup, priority and QoS
fields with their readers. Remove all three real-bug suppressions.

Add unaligned/truncated header coverage, an output-publication assertion
and priority/QoS registration checks, including QoS-enabled TSan CI cases.
Document the mechanisms and retain only fixture/framework exceptions.

Plain host, ASan/UBSan, TSan, 40 QoS startup stress runs, the complete Metal
graphics suite, 525 Python tests (20 skipped), lint, all 178 iOS source
compiles and the unsigned synthetic iOS app build passed. Gameplay
regression results are reported with the PR follow-up.

Fixes seedds#409
Fixes seedds#410
Fixes seedds#411

Co-authored-by: v0lumehi <[email protected]>
lucaszhongsj pushed a commit to lucaszhongsj/nxnative that referenced this pull request Nov 19, 2026
On the iPhone a running game had no way back to the launcher: the
player had to close the app in the app switcher. Two ways now open a
quit prompt over the game, the Mac's (home_quit_mac.h) in look: "Quit
<game>?", a note, and Quit and Cancel pills of one fixed width in every
language.

- The in-game menu (the gear) ends with "Quit <game>", destructive and
  on its own. The gear stays while a controller hides the other touch
  controls, so this works with touch and with a controller.
- Holding a controller's Home button for 2 s opens it too, as on the
  Mac (home_quit.h). The host already claims Home. iOS 27 respects the
  claim when the Home button setting for apps lets the app decide, and
  the log names the setting once.

A tap on Quit or A quits. A tap on Cancel or outside the card, B or a
new press of Home closes it. While it is open the game is told it lost
the focus and gets no input, as on the Mac.

Quitting ends the process. One game runs per process (dm_profile() and the
host's early loading run once), so the engine cannot hand the window back to a launcher. The cloud saves
go out as when the app goes to the background, then the host ends as
on SIGTERM (dm_host_shutdown). iOS cannot start an app again by itself,
so the player opens it again from the Home Screen. DM_HOME_QUIT_TEXT
carries the texts, as on the Mac.

quit_prompt.h is Core Animation and Core Text only, so
tests/quit_prompt checks its layout, hits and touch steps on the Mac in
six languages and can draw it to PNGs (QP_CAPTURE_DIR).

Upstream-Status: forwarded seedds#1115
Reason: Players on the iPhone need a way back to the launcher from a running game: Quit in the in-game menu and the Home hold (seedds#421)
Issue: LNPANDY/NX2Apple#421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants