Skip to content

ci: add a macOS build + install + link job#58

Open
vejeta wants to merge 5 commits into
sysprog21:mainfrom
vejeta:ci/macos-runner
Open

ci: add a macOS build + install + link job#58
vejeta wants to merge 5 commits into
sysprog21:mainfrom
vejeta:ci/macos-runner

Conversation

@vejeta

@vejeta vejeta commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

What

Adds a macOS CI job: build on macos-14, make install into a prefix, then
link a tiny downstream against -lX11 -lXft -lXext to prove the installed
standard-name aliases and rpath resolve the way a consumer sees them (e.g. a
native app built with --with-libx11-compat=$PREFIX).

Why

The shim exists to run X11 apps natively on macOS, but all current CI is
ubuntu-24.04, where the native paths are compiled out -- so nothing gives an
automated signal that a change still builds and links on macOS. As a concrete
example, this job asserts that make install's .so aliases resolve under
-lX11 on macOS (they do -- verified by hand -- but no CI proves it today).

Notes

  • Deliberately minimal (one runner, SDL3 backend). Happy to extend to a matrix
    (macos-13 x86_64), make check, etc. if you want.
  • I cannot run macOS Actions locally, so this PR's own CI run is the
    validation -- the job may need a tweak or two.
  • This is a proposal for your call: if you would rather not spend macOS runner
    minutes here, feel free to close it, no attachment.

Summary by cubic

Adds a macOS CI job on macos-14 that builds, installs to a temp prefix, and links a tiny probe against -lX11 -lXft -lXext. Cancels superseded PR runs; scope is X11/Xft/Xext only due to missing <X11/Xpoll.h>.

  • New Features

    • Installs sdl3, sdl3_ttf, pixman, pkgconf via Homebrew.
    • Builds with SDL_BACKEND=sdl3, installs to $RUNNER_TEMP/prefix using XCOMPAT_INSTALL_ALIASED="X11 Xft Xext".
    • Links a C probe and verifies with otool -L that it resolves to the shim.
  • Refactors

    • Uses actions/checkout@v7; untaps aws/tap to silence Homebrew’s trust notice.
    • Adds a concurrency group to cancel superseded PR runs (never on main).

Written for commit 62b38e6. Summary will update on new commits.

Review in cubic

vejeta added 2 commits July 13, 2026 12:28
The shim targets macOS but all CI runs on ubuntu-24.04, where the native
paths are compiled out. Build on a real macOS runner, exercise make install
into a prefix, and link a downstream against -lX11 -lXft -lXext so the
standard-name aliases and rpath are proven to resolve as a consumer sees them.
Building the full Xt/Xmu/Xaw alias set on a clean macOS runner needs a system
<X11/Xpoll.h> that is not present there, which is a separate concern. The core
X11 + Xft + Xext trio is what a native GUI app links, so cover that.
cubic-dev-ai[bot]

This comment was marked as resolved.

@vejeta

vejeta commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

CI is green on macos-14. The link step proves the path end-to-end: make install creates the .so aliases and a downstream links -lX11 -lXft -lXext cleanly, with otool -L showing @rpath/libX11-compat.so / libXft-compat.so / libXext-compat.so and no /opt/X11.

Separate finding while wiring this up: building the full Xt/Xmu/Xaw alias set on a clean macOS runner fails at libXt with X11/Xpoll.h not found -- it is taken from a system copy that a runner without XQuartz does not have. I scoped this job to the X11/Xft/Xext native-app core (what a native GUI links) rather than pull a libXt fix into a CI PR. Happy to file a separate issue/PR for the libXt-on-macOS header if you would like it covered.

vejeta added 3 commits July 13, 2026 12:41
Use the repo-wide actions/checkout@v7 (the lone @v4 was forcing the Node 20
deprecation warning), and untap the runner's pre-tapped aws/tap so Homebrew's
tap-trust check does not print an unrelated notice.
Match ci.yml / differential.yml so pushing to a PR cancels the in-progress
macOS run instead of stacking redundant ones; never cancels on main.
Several jobs failed in Set up job with 'Failed to resolve action download
info. Error: Service Unavailable' -- a transient GitHub Actions incident,
not a build issue. Empty commit to re-run all workflows.
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