Skip to content

CI: run the tests on every pull request (upstream's tests.yml plus the launchers), newest actions, Dependabot - #48

Merged
LNPANDY merged 3 commits into
LNPANDY:mainfrom
v0lumehi:ci-tests
Oct 27, 2026
Merged

LNPANDY merged 3 commits into
LNPANDY:mainfrom
v0lumehi:ci-tests

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

No workflow here runs a test on a pull request. pr-scope checks file ownership, and the daily health check builds the host and runs its unit tests once a day. The launcher's swift test, the Qt tests and the Python tool tests ran nowhere. upstream's tests.yml never came along because .github is not synced, although docs/agents/06-dev-loop.md describes it.

What this adds

.github/workflows/tests.yml runs on every pull request, on pushes to main, and by hand. It contains upstream's tests.yml unchanged:

  • host unit tests and ThreadSanitizer
  • the CPU-only gfx tests
  • the Python tool tests (dm/tools/tests, dm/ios/tests, dm/gfx/tests)
  • Mac host builds for an NVN, a Vulkan and an OpenGL profile
  • the iOS compile check and the smoke project

Plus two jobs for the fork:

  • Mac launcher: swift build -c release and swift test in frontend/.
  • Qt front end: frontend-qt/tests.

Action versions: the newest releases, pinned by commit SHA with the tag in a comment, as upstream pins them. That is actions/checkout v7.0.1, actions/setup-python v7.1.0, actions/setup-dotnet v6.0.0 and actions/upload-artifact v7.0.2, on macos-26.

The other five workflows, which used checkout@v4, setup-python@v5 and upload-artifact@v4, now use the same pins.

pr-scope diffs from the merge base. It compared the base branch's tip with the PR's head (two dots), so every commit main gained after a PR branched counted as the PR's. #51 failed on env_switches.py and docs/agents/README.md, which main had just changed. It now uses three dots, as its own comment already said, and checks out the history it needs for that.

.github/dependabot.yml opens one grouped PR a week when an action releases, so the pins stay current.

One launcher test fix: testCompletedBuildAppearsAutomaticallyInCollection checked model.done as soon as the library listed the app. On GitHub's runner the library got there first, so the test failed there and only there. It now waits for the model to settle.

First runs (on my fork)

Run 40486737621: five of six jobs pass. The Tool tests job fails on three files, all of them fork problems that already exist on main:

Test Cause Fixed by
test_docs.py README anchors broken by the heading emoji; dead links to docs/geometry-metal-research.md and dm/ios/ENTITLEMENTS.md #40 and #41, then the next sync
test_image_atomic_bounds.py the committed spirv-cross is 100644 here: the sync wrote files without their mode #41, then the next sync
test_env_switches.py docs/WORK-IN-PROGRESS.md names DM_TOUCH_PREVIEW (and DM_PROF), which nothing reads any more see below

Found on the way: the Mac touch preview is gone

9112dda added DM_TOUCH_PREVIEW to dm/host/front_mac.m (93 lines, using touchpad_geometry.h). front_mac.m is neither in OURS nor PATCHED, so the sync 8ed25b4 took upstream's file and dropped it, the case #29 describes. touchpad_geometry.h and its test are still in the tree, but nothing uses them. WORK-IN-PROGRESS.md still lists the feature as done. Should it come back through a patcher, or go upstream? Either way the doc line goes; I left it alone because the choice is yours.

Until those land, the Tool tests job stays red on every PR. That is accurate, and the three causes above are its whole list.

@LNPANDY

LNPANDY commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Probe.

@v0lumehi

Copy link
Copy Markdown
Collaborator Author

The Tool tests job here fails on four test files: test_romfs_startup, test_profile_pack, test_env_switches and test_nro_header. Each one fails on a fork change, not on this workflow. #51 fixes all four. A dry run of this PR with #51 passes Tool tests: https://github.com/v0lumehi/NX2Apple/actions/runs/40489457905

v0lumehi added a commit to v0lumehi/NX2Apple that referenced this pull request Oct 27, 2026
…llow the fork, across syncs

With the tests running in CI (LNPANDY#48) and the x bits back, four test files
failed on main, each on a fork change upstream's file does not know:

- test_romfs_startup compiles main.m's RomFS locator alone; the fork's
  locator reads id and romfs_marker through dm_profile(), which the
  fixture did not stub. The fixture gets one.
- test_profile_pack expects the RomFS in the IPA; the fork packs the
  slim IPA by default (DM_FULL_ROMFS=1 packs it), so it checks that the
  RomFS stays out.
- docs/env_switches.tsv had no rows for DM_FULL_ROMFS and DM_PROFILE,
  which only the fork reads; the sync drops them when upstream rewrites
  the table. They are back.
- test_nro_header asserted a call in patch_nso.py that the sync fe56176
  replaced. It is not put back: an NRO's text starts at memory offset 0
  with its header inside, so segs[0][1] never skipped the header; the
  real bound (0x80) belongs upstream, and issue LNPANDY#14 is open again.

The two iOS tests and the switch table are carriers now: a patcher each,
idempotent, reproducing this tree from upstream's files. The NRO test is
in OURS. A sync run with --old = --new ends SYNC OK.
v0lumehi added a commit to v0lumehi/NX2Apple that referenced this pull request Oct 27, 2026
… across syncs

With the tests running in CI (LNPANDY#48), three test files failed on main, each
on a fork change upstream's file does not know:

- test_romfs_startup compiles main.m's RomFS locator alone; the fork's
  locator reads id and romfs_marker through dm_profile(), which the
  fixture did not stub. The fixture gets one.
- test_profile_pack expects the RomFS in the IPA; the fork packs the
  slim IPA by default (DM_FULL_ROMFS=1 packs it), so it checks that the
  RomFS stays out.
- test_env_switches: docs/env_switches.tsv loses the rows of the switches
  only the fork reads (DM_FULL_ROMFS, DM_PROFILE) whenever upstream
  rewrites the table; 9f7d421 put them back, and a patcher keeps them.

The two iOS tests and the switch table are carriers: a patcher each,
idempotent, reproducing this tree from upstream's files. The NRO test is
in OURS (it tests the fork's patch_nso.py carrier). A sync run with
--old = --new ends SYNC OK.
v0lumehi added a commit to v0lumehi/NX2Apple that referenced this pull request Oct 27, 2026
… across syncs

With the tests running in CI (LNPANDY#48), three test files failed on main, each
on a fork change upstream's file does not know:

- test_romfs_startup compiles main.m's RomFS locator alone; the fork's
  locator reads id and romfs_marker through dm_profile(), which the
  fixture did not stub. The fixture gets one.
- test_profile_pack expects the RomFS in the IPA; the fork packs the
  slim IPA by default (DM_FULL_ROMFS=1 packs it), so it checks that the
  RomFS stays out.
- test_env_switches: docs/env_switches.tsv loses the rows of the switches
  only the fork reads (DM_FULL_ROMFS, DM_PROFILE) whenever upstream
  rewrites the table; 9f7d421 put them back, and a patcher keeps them.

The two iOS tests and the switch table are carriers: a patcher each,
idempotent, reproducing this tree from upstream's files. The NRO test is
in OURS (it tests the fork's patch_nso.py carrier). A sync run with
--old = --new ends SYNC OK.
@LNPANDY

LNPANDY commented Oct 27, 2026

Copy link
Copy Markdown
Owner

The Tool tests failure in this branch is not the workflows — it is a rebase that has not happened yet.

test_profile_pack.py still asserts the upstream behaviour:

self.assertEqual(archive.read('Payload/DmIOS.app/romfs/marker'), b'romfs')

but this fork packs the slim IPA (the RomFS goes to Documents/games/<id>/), so there is no romfs/ in the payload — KeyError: There is no item named 'Payload/DmIOS.app/romfs/marker', six times, once per (game, IOS_PULL, archive) parameter combination.

That assertion was already fixed on main by PR #51 (patch_test_profile_pack, merged as dc3511ed), which makes the same test assert the RomFS is absent and carriers it across syncs. It landed after this branch was cut.

I merged today's main into your branch locally and everything is green:

  • test_profile_pack alone: OK
  • the whole tool suite: 352 passed, 17 skipped, 0 failed
  • swift build -c release: clean

So a rebase onto main should turn this PR green with no change of your own. If the tests.yml run still shows failures after that, they are mine to look at and not yours.

One thing worth doing while you are here, since this PR is the one that makes CI run on every PR: daily-health.yml and sync-upstream.yml both had a bug I fixed in fa1fb215 — gh issue create picked seedds/nxnative as its target because the job adds an upstream remote, so every failure report was silently lost (Resource not accessible by integration (createIssue)). The fix is -R "${{ github.repository }}" on the call. Your branch predates it; the merge brings it in.

…e actions current

No workflow ran a test on a pull request: pr-scope checks file
ownership, and the daily health check builds the host and runs its unit
tests once a day. upstream's tests.yml (seedds/nxnative) never came
along because .github is not synced, though docs/agents/06-dev-loop.md
describes it. This takes it as it is: host unit tests and ThreadSanitizer,
CPU-only gfx tests, the Python tool tests, Mac host builds for an NVN, a
Vulkan and an OpenGL profile, the iOS source compile and smoke project.
Two jobs are the fork's: the Mac launcher (swift build -c release, swift
test) and the Qt front end's tests.

The actions are the newest releases, pinned by commit SHA with the tag
in a comment (checkout v7.0.1, setup-python v7.1.0, setup-dotnet v6.0.0,
upload-artifact v7.0.2) on macos-26; dependabot.yml raises them weekly in
one grouped pull request.
…library lists the app

testCompletedBuildAppearsAutomaticallyInCollection checked model.done and
model.running as soon as the library listed the app. On GitHub's macOS
runner the library got there first, and both checks failed; on a faster
Mac the order hid it. The test now waits for the model to settle too.
…m the merge base

The five older workflows used actions/checkout@v4, setup-python@v5 and
upload-artifact@v4; they take the same pins as tests.yml (checkout
v7.0.1, setup-python v7.1.0, upload-artifact v7.0.2, by commit SHA), and
Dependabot keeps all of them current. checkout v6 moved the persisted
token to a file under RUNNER_TEMP; git push in sync-upstream.yml works
on as before (the action's notes: no workflow changes required).

pr-scope compared the base branch's tip with the PR's head (two dots), so
every commit main gained after a PR branched counted as the PR's: LNPANDY#51
failed on env_switches.py and docs/agents/README.md, which main had just
changed. It diffs from the merge base now (three dots, as its comment
said), with the history checked out for it.
@v0lumehi

Copy link
Copy Markdown
Collaborator Author

Rebased onto main (7532965), with no conflicts and no change of my own needed. #51's test fixes and your -R "${{ github.repository }}" fix in daily-health.yml and sync-upstream.yml are both in. The newer action pins in those two files sit on top of your fix and leave it as it is. Thanks for checking the suite locally.

@LNPANDY
LNPANDY merged commit 3715741 into LNPANDY:main Oct 27, 2026
6 checks passed
LNPANDY added a commit that referenced this pull request Oct 27, 2026
The update machinery was already here — checkAppUpdate finds the newest release, performAppUpdate
downloads it, swaps the bundle and relaunches — but the only signal was a status line naming a
tag. A user whose app worked had no way to judge whether the new version mattered, so "Update to
v0.4.8" was a leap of faith, and most people took the leap only when something broke.

Now a found update opens a sheet: the version they have, the one on offer, the release notes for
their interface language, Open the release page, Later, and Update now. It opens from the launch
check and from Check for updates, so an old install learns what changed without visiting GitHub.

The notes are the release body, which this project writes in both languages
(docs/RELEASE-NOTES-GUIDE.md). UpdateSheet.lines splits them by the `**中文**` / `**English**`
markers rather than by looking for Han characters — the first version did the latter and handed an
English reader the Chinese paragraph, because that line contains both. A body with no markers is
shown whole instead of being split in half.

Six tests cover the split, including the two cases that failed on the first attempt (a monolingual
body, and inline **bold** inside a marked paragraph). Checked against the real v0.4.7 body: 19 lines
each way, aligned.

appVersion 0.4.7 → 0.4.8: today's merges (#28, #48, #54–#57, #59, #60 and the #52/#53 fixes) were
shipping under a version number that also names the 0.4.7 release, so a bug report could not say
which one it came from.
@v0lumehi
v0lumehi deleted the ci-tests branch November 1, 2026 05:10
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