From 1fc4bcba1170ea5824326eec9204c355d52796fc Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Tue, 17 Mar 2026 01:44:42 -0700 Subject: [PATCH] Add macOS 26 (Tahoe) compat tests, skip zig build via stub (#1590) Zig 0.15.2's MachO linker can't resolve libSystem on macOS 26 (the version number jump from 15 to 26 breaks zig's SDK handling). The unit tests don't need the CLI helper binary at runtime, so we skip the zig build on macOS 26 by setting CMUX_SKIP_ZIG_BUILD=1, which creates a stub binary to satisfy the Xcode Run Script file check. Smoke test (full app build + launch) is skipped on macOS 26 since it needs the real CLI helper. Co-authored-by: Lawrence Chen Co-authored-by: Claude Opus 4.6 (1M context) --- .github/workflows/ci-macos-compat.yml | 8 ++++++++ scripts/build-ghostty-cli-helper.sh | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/ci-macos-compat.yml b/.github/workflows/ci-macos-compat.yml index 4682df7b..a0c72b11 100644 --- a/.github/workflows/ci-macos-compat.yml +++ b/.github/workflows/ci-macos-compat.yml @@ -17,6 +17,11 @@ jobs: - os: warp-macos-15-arm64-6x timeout: 20 smoke: true + skip_zig: false + - os: warp-macos-26-arm64-6x + timeout: 20 + smoke: false + skip_zig: true # zig 0.15.2 MachO linker can't resolve libSystem on macOS 26 runs-on: ${{ matrix.os }} timeout-minutes: ${{ matrix.timeout }} steps: @@ -62,6 +67,7 @@ jobs: ./scripts/download-prebuilt-ghosttykit.sh - name: Install zig + if: ${{ !matrix.skip_zig }} run: | ZIG_REQUIRED="0.15.2" if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then @@ -114,6 +120,8 @@ jobs: done - name: Run unit tests + env: + CMUX_SKIP_ZIG_BUILD: ${{ matrix.skip_zig && '1' || '0' }} run: | set -euo pipefail SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" diff --git a/scripts/build-ghostty-cli-helper.sh b/scripts/build-ghostty-cli-helper.sh index ac8cda4b..d38e641c 100755 --- a/scripts/build-ghostty-cli-helper.sh +++ b/scripts/build-ghostty-cli-helper.sh @@ -53,6 +53,16 @@ if [[ -z "$OUTPUT_PATH" ]]; then exit 1 fi +# Allow CI to skip the zig build (e.g., macOS 26 where zig 0.15.2 can't link). +# Creates a stub binary so the Xcode Run Script file-existence check passes. +if [[ "${CMUX_SKIP_ZIG_BUILD:-}" == "1" ]]; then + echo "Skipping zig CLI helper build (CMUX_SKIP_ZIG_BUILD=1)" + mkdir -p "$(dirname "$OUTPUT_PATH")" + printf '#!/bin/sh\necho "ghostty CLI helper stub (zig build skipped)" >&2\nexit 1\n' > "$OUTPUT_PATH" + chmod +x "$OUTPUT_PATH" + exit 0 +fi + if [[ "$UNIVERSAL" == "true" && -n "$TARGET_TRIPLE" ]]; then echo "--universal and --target are mutually exclusive" >&2 usage >&2