Skip to content

ci(macos): fix retired runner, test the DMG on a real menu bar before publishing (#165) - #186

Merged
jonocodes merged 5 commits into
mainfrom
ci/macos-dmg-dry-run
Nov 14, 2026
Merged

jonocodes merged 5 commits into
mainfrom
ci/macos-dmg-dry-run

Conversation

@jonocodes

@jonocodes jonocodes commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Part of #165. The macOS release workflow had never run. Its first run showed it was broken on main. This PR fixes that, and adds a job that installs the DMG and clicks through the real menu-bar item before anything is published, on GitHub's free macos-15 runner.

Summary

flowchart LR
    T[v* tag / manual run / PR] --> D["dmg<br/>(macos-15)<br/>just build-macos-dmg<br/>hdiutil verify"]
    D --> A["test-app<br/>(fresh macos-15)<br/>test-app.sh --pregrant"]
    A --> P["publish<br/>(ubuntu, contents: write)<br/>tags + publish=true only"]
Loading
  • macos-14 → macos-15: GitHub has retired the macos-14 image, so any v* tag on main cancels the job before any step runs.
  • publish input: with it unticked, a manual run builds and tests the DMG without creating a release. Pull requests touching the app run build + test and never publish. Only publish has contents: write.
  • test-app job runs packaging/macos/test/test-app.sh, which is also just test-macos-app on a real Mac:
pre-grant deckd's TCC rows (System Events, Accessibility, input)   # CI only
install DMG → /Applications, open           → /health on 127.0.0.1, LAN refused
read the menu (Accessibility)                → exact item list
real HID click on the status item            → screenshot of the open menu
Allow LAN access                             → LAN IP answers, ✓ shown
Allow LAN access                             → LAN IP refused, ✓ cleared
Restart server                               → new "listening on" in log, /health back
Open decks folder                            → Finder window "decks"
Open deckd surface                           → Safari window titled "deckd"
Quit deckd                                   → process gone, port freed
reinstall same DMG, relaunch                 → password + decks survive
reset System Events grant, relaunch          → screenshot of the consent prompt

It works on hosted runners because they have a real logged-in desktop, and the image grants Accessibility and Screen Recording to bash and osascript. Without --pregrant, deckd's own "wants to control System Events" prompt stays on screen and every System Events call times out. That's what happened on the first probe run.

Evidence

  • Before (macos-14), run 43459845670: cancelled after 1s, The configuration 'macos-14-arm64-us-default' is not supported.
  • After, run 43634422705 (this PR): dmg ✓, test-app ✓ (20/20 checks), publish skipped.
    ok   menu items: Open deckd surface/Open decks folder/Restart server/Allow LAN access/–/Quit deckd
    ok   LAN address 192.168.64.10 answers        ok   menu shows ✓
    ok   LAN address refused again                ok   ✓ cleared
    ok   server restarted (listening line 4)      ok   Finder window 'decks' opened
    ok   surface loaded in Safari (title 'deckd') ok   Quit: process gone, port freed
    ok   password survived the upgrade            ok   decks folder survived
    All checks passed.
    
  • The probe that established this approach is on the throwaway branch probe/macos-gui (runs 43461493467 → 43462496258).

Not covered by CI:

  • Permission grants surviving an upgrade: CI writes them in advance, and with ad-hoc signing the app's identity is a hash of its contents, so they likely won't survive. A self-signed certificate would fix that; it's a follow-up.
  • Gatekeeper quarantine on a DMG downloaded in a browser: the spctl result is only logged, informational.

Merge Danger

Door: two-way

Only CI configuration, a test script and docs change. Reverting restores the old workflow (with the dead runner).

Blast Radius: release-only

  • A failing test-app now blocks publishing. That's intended, but a flaky GUI check would hold up a release until it's re-run.
  • PRs touching packaging/macos/** or the macOS daemon modules now spend about 6 runner-minutes on macOS. That's free for public repos.
  • macos-15 comes with a newer toolchain. Nobody has run a DMG yet, so no user can be affected.

Screenshots (from the test-app job on GitHub's macos-15 runner)

Real HID click on the status item: the menu

Real HID click on the status item: the menu

Open decks folder → Finder

Open decks folder → Finder

Open deckd surface → Safari loads the password screen

Open deckd surface → Safari loads the password screen

First launch without grants: the System Events consent prompt with deckd's usage text

First launch without grants: the System Events consent prompt with deckd's usage text

@jonocodes jonocodes changed the title ci(macos): fix retired runner + artifact-only DMG builds (#165) ci(macos): fix retired runner, test the DMG on a real menu bar before publishing (#165) Nov 14, 2026
jonocodes and others added 5 commits November 14, 2026 12:25
A workflow_dispatch with publish=false builds and uploads the DMG as a
workflow artifact without creating or touching a GitHub release, so a
test build can be tried before the first real tag (#165).

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…lishing

A test-app job installs the built DMG on a fresh macos-15 runner and
drives the real menu-bar item through Accessibility
(packaging/macos/test/test-app.sh): menu items, LAN toggle on/off,
restart, open decks folder / surface, quit, upgrade in place, and a
screenshot of the first-run System Events prompt. Publishing now waits
on it, and PRs touching the app run build + test.

The runner image already grants Accessibility / Screen Recording to
bash; --pregrant writes deckd's own TCC grants so its consent prompt
doesn't block System Events. Also runnable on a real Mac via
just test-macos-app.

Co-Authored-By: Claude <noreply@anthropic.com>
… document test-app

Co-Authored-By: Claude <noreply@anthropic.com>
…moved to

Co-Authored-By: Claude <noreply@anthropic.com>
@jonocodes
jonocodes force-pushed the ci/macos-dmg-dry-run branch from 1bf603b to 1e9c7a9 Compare November 14, 2026 20:25
@jonocodes
jonocodes merged commit af60623 into main Nov 14, 2026
7 checks passed
@jonocodes
jonocodes deleted the ci/macos-dmg-dry-run branch November 14, 2026 20:29
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.

1 participant