Skip to content

ci: build/test/check/doctor on macOS + Linux + automation smoke test#6

Merged
sepehr-safari merged 3 commits into
mainfrom
ci/pipeline
Jul 11, 2026
Merged

ci: build/test/check/doctor on macOS + Linux + automation smoke test#6
sepehr-safari merged 3 commits into
mainfrom
ci/pipeline

Conversation

@sepehr-safari

Copy link
Copy Markdown
Member

Summary

Continuous integration as the merge gate, plus an automation-driven smoke test that proves the window actually opens and renders.

Jobs

verify (macOS + Linux matrix)

  • install Zig 0.16.0 + @native-sdk/cli@0.4.1
  • native doctor (--strict on macOS)
  • native validate app.zon
  • native test -Dplatform=null — headless logic + view tests (canvas engine, no display), so they run identically on both OSes
  • native check --strict — markup + manifest against the model contract
  • native build on macOS

smoke (Linux · Xvfb) — the blessed Native SDK CI pattern

  • build with -Dautomation=true, launch under a virtual framebuffer
  • native automate waitassert the widget tree rendered non-blank (gpu_nonblank=true, buttons, header, count: 0) → assert --absent 'error event='
  • capture and upload the deterministic screenshot artifact

Testing

  • native test -Dplatform=null verified locally (headless).
  • scripts/smoke.sh verified locally on macOS (direct launch): 7/7 assertions matched, no runtime errors, screenshot delivered, clean teardown. The Linux/Xvfb path is exercised by this PR's CI run.

The script is portable — Xvfb when available (CI), direct launch otherwise (local desktop) — so the same smoke test runs everywhere.

Closes #2

Adds .github/workflows/ci.yml with two jobs:

- verify (macOS + Linux): native doctor, validate, headless null-platform
  tests (native test -Dplatform=null), and strict markup/manifest check;
  macOS also builds the release binary.
- smoke (Linux, Xvfb): builds the app with automation enabled, drives it
  headless through the embedded automation server, asserts the widget tree
  rendered non-blank, and uploads the deterministic screenshot.

scripts/smoke.sh is the portable driver — Xvfb in CI, direct launch on a
local desktop — so the same smoke test runs everywhere.

Closes #2
Run the app under a private session bus (dbus-run-session) with the
accessibility bus disabled (GTK_A11Y=none) so it no longer aborts on the
missing a11y DBus service under Xvfb. Drop the GPU-dependent gpu_nonblank
assertion — the semantics-tree and screenshot checks are GPU-independent
and sufficient. Add dbus to the job's apt packages.
Ubuntu 24.04 GitHub runners set kernel.apparmor_restrict_unprivileged_userns=1,
which blocks the user namespace bubblewrap needs to sandbox the SDK's
dbus-proxy (bwrap: setting up uid map: Permission denied). Relax the sysctl
before launching the app.
@sepehr-safari sepehr-safari merged commit eee7d7b into main Jul 11, 2026
3 checks passed
@sepehr-safari sepehr-safari deleted the ci/pipeline branch July 11, 2026 02:16
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.

ci: build/test/check/doctor on macOS + Linux + automation smoke test

1 participant