release: build app against macOS 26 SDK for parity with nightly (port #5077) - #5167
austinywang wants to merge 1 commit into
Conversation
Port the #5077 dual-Xcode selection from nightly.yml into release.yml so the official release links the app against the macOS 26 SDK (adopting Liquid Glass on Tahoe) instead of whatever Xcode happens to be the runner default. Both workflows run on the macOS 15 runner because zig 0.15.2 cannot cross-link the universal Ghostty CLI helper's x86_64 slice against the macOS 26 SDK. #5022 (c491143) moved both nightly and release off the macOS 26 runner; #5077 (4fdaa0a) added the SDK-aware Xcode selection to nightly only, leaving release on the pre-#5077 lexicographic `find | sort | tail -n 1` picker with no macOS 26 guarantee. - Select Xcode: rank every /Applications/Xcode*.app by numeric macOS SDK version; use the newest >=26 SDK Xcode for the app (APP_DEVELOPER_DIR) and the newest pre-26 Xcode for the helper (HELPER_DEVELOPER_DIR); hard-fail if either is missing. - Build the universal Ghostty CLI helper separately under the pre-26 Xcode. - Build the app with CMUX_SKIP_ZIG_BUILD=1 so it inherits the macOS 26 Xcode. - Inject the real universal helper before the existing arch-verification step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe macOS release workflow is refactored to independently manage Xcode toolchain selection by macOS SDK version, build a universal Ghostty CLI helper binary separately, inject it into the app bundle, and skip redundant in-Xcode compilation. ChangesmacOS Release Workflow Refactor
Sequence DiagramsequenceDiagram
participant Toolchain as Toolchain Selection
participant Helper as Helper Build
participant Validate as Validation
participant App as App Build
participant Inject as Injection
Toolchain->>Toolchain: Select SDK >= 26 for app
Toolchain->>Toolchain: Select pre-26 SDK for helper
Toolchain->>Helper: Provide HELPER_DEVELOPER_DIR
Helper->>Helper: Compile universal binary
Helper->>Validate: Output helper
Validate->>Validate: Verify arm64 + x86_64
Toolchain->>App: Provide DEVELOPER_DIR
App->>App: Build app (CMUX_SKIP_ZIG_BUILD=1)
App->>Inject: App bundle ready
Inject->>Inject: Copy helper to Resources/bin/ghostty
Inject->>Validate: Validate injected binary
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 18✅ Passed checks (18 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Superseded by #5042 ("Build release app with macOS 26 SDK", commit 0b4c138), which already landed the macOS-26-SDK release build on main and even asserts This PR was drafted against a stale base (89a9bfb, before #5042 merged) and ports nightly's single-runner two-Xcode mechanism, which #5042 deliberately replaced with a cleaner split: a macOS 15 helper-build job that uploads the universal Ghostty CLI helper as an artifact, plus a macOS 26 app-build job (CMUX_SKIP_ZIG_BUILD=1) that installs it. Closing as redundant. |
Greptile SummaryThis PR ports the macOS 26 SDK Xcode selection from
Confidence Score: 4/5The two-Xcode split logic and injection flow are a faithful port of the nightly workflow and are safe to merge; the only gap is a missing runtime regression test for the injected helper binary. The Xcode selection function, arch assertions, injection step, and CMUX_SKIP_ZIG_BUILD guard all mirror nightly exactly and are mechanically correct. The one divergence is that the bundled Ghostty theme picker helper regression test present in nightly was not ported: the release workflow only asserts the helper binary is present and has the right arch slices, not that it actually runs. A structurally valid but broken helper would pass the release gates and ship. .github/workflows/release.yml — specifically the post-injection verification steps between "Inject universal Ghostty CLI helper" and "Verify binary architectures". Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Select Xcode\nsdk_rank each Xcode*.app] --> B{≥26 SDK found?}
B -- No --> FAIL1[❌ Hard fail\nno Liquid Glass]
B -- Yes --> C{Pre-26 SDK found?}
C -- No --> FAIL2[❌ Hard fail\nzig cross-link impossible]
C -- Yes --> D[DEVELOPER_DIR=APP_DEVELOPER_DIR\nHELPER_DEVELOPER_DIR=pre-26 Xcode\nwritten to GITHUB_ENV]
D --> E[Install build deps\nrust / zig / create-dmg]
E --> F[Build universal Ghostty CLI helper\nDEVELOPER_DIR=HELPER_DEVELOPER_DIR\nlipo arch assertion arm64 + x86_64]
F --> G[Build universal app via xcodebuild\nDEVELOPER_DIR=APP_DEVELOPER_DIR macOS 26 SDK\nCMUX_SKIP_ZIG_BUILD=1]
G --> H[Inject universal Ghostty CLI helper\ninstall -m 755 → Contents/Resources/bin/ghostty]
H --> I[Verify binary architectures\nlipo on app + CLI + helper]
I --> J[Sign → Notarize → Upload]
style FAIL1 fill:#f66
style FAIL2 fill:#f66
Reviews (1): Last reviewed commit: "release: build app with macOS 26 SDK for..." | Re-trigger Greptile |
| - name: Inject universal Ghostty CLI helper | ||
| if: steps.guard_release_assets.outputs.skip_all != 'true' | ||
| run: | | ||
| set -euo pipefail | ||
| APP_DIR="build-universal/Build/Products/Release/cmux.app" | ||
| if [ ! -d "$APP_DIR" ]; then | ||
| echo "Built app not found at $APP_DIR" >&2 | ||
| exit 1 | ||
| fi | ||
| DEST="$APP_DIR/Contents/Resources/bin/ghostty" | ||
| mkdir -p "$(dirname "$DEST")" | ||
| install -m 755 /tmp/cmux-ghostty-helper-universal "$DEST" | ||
| echo "Injected Ghostty CLI helper architectures: $(lipo -archs "$DEST")" |
There was a problem hiding this comment.
Missing Ghostty helper regression test after injection
The nightly workflow runs ./tests/test_bundled_ghostty_theme_picker_helper.sh immediately after the inject step to verify the helper actually executes correctly inside the app bundle. The release workflow skips straight to "Verify binary architectures" (which checks arch slices) and then the pre-existing [ -x "$HELPER_BINARY" ] existence check — neither of which exercises the helper's runtime behaviour. The PR description says it "mirrors nightly.yml exactly", so this test appears to have been overlooked during the port. A broken but structurally valid helper binary would pass both checks and ship in a release.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
What
Ports the macOS‑26‑SDK Xcode selection from
nightly.yml(PR #5077) intorelease.yml, so the official release builds the app against the macOS 26 SDK (adopting Liquid Glass on Tahoe) instead of whatever Xcode happens to be the runner's default. This gives the official release parity with nightly on the runner/SDK used.Why
Both workflows run on the macOS 15 runner (
MACOS_RUNNER_15) because zig 0.15.2 cannot cross‑link the universal Ghostty CLI helper's x86_64 slice against the macOS 26 SDK.c4911439e) moved both nightly and release off the macOS 26 runner onto the macOS 15 runner — so both started building against a macOS 15 SDK.4fdaa0a2a) added SDK‑aware Xcode selection tonightly.ymlonly.release.ymlwas left on the pre‑Nightly: build app with Xcode 26 SDK so Tahoe gets Liquid Glass #5077 lexicographicfind | sort | tail -n 1picker with no macOS‑26 guarantee.Net effect today: a release links against whatever Xcode is
/Applications/Xcode.appon the runner, with no explicit macOS‑26 selection or hard‑fail guard — so it can ship without Liquid Glass on Tahoe. This PR closes that gap.Changes to
release.yml/Applications/Xcode*.appby numeric macOS SDK version; pick the newest ≥26‑SDK Xcode for the app (APP_DEVELOPER_DIR) and the newest pre‑26 Xcode for the helper (HELPER_DEVELOPER_DIR); hard‑fail if either is missing.DEVELOPER_DIR=HELPER_DEVELOPER_DIR), with a lipo arch assertion.CMUX_SKIP_ZIG_BUILD=1so the in‑Xcode zig helper is skipped and the app inherits the macOS‑26DEVELOPER_DIR.Mirrors
nightly.ymlexactly except: release keeps its ownsteps.guard_release_assets.outputs.skip_allguards and its release app icon (noAppIcon-Nightly).Notes
release.ymluses no composite action or reusable workflow, so these four in‑file edits are the complete port.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need. Autofix is disabled.Note
Medium Risk
Changes only CI packaging for official releases; wrong Xcode selection or a failed helper inject could ship a broken or non-universal
ghosttybinary before notarization.Overview
Ports the nightly dual-Xcode macOS release pipeline into
release.ymlso tagged releases build the app against the macOS 26+ SDK (Liquid Glass on Tahoe) instead of whichever Xcode the runner picks by default.Select Xcode now scans all
Xcode*.appinstalls, ranks SDK versions numerically, setsDEVELOPER_DIRto the newest 26+ Xcode for the app andHELPER_DEVELOPER_DIRto the newest pre-26 Xcode for Zig, and fails the job if either bucket is missing.New steps build the universal Ghostty CLI helper under the pre-26 toolchain (with
lipoarch checks), setCMUX_SKIP_ZIG_BUILD=1on the Releasexcodebuildso in-Xcode Zig does not cross-link x86_64 against SDK 26, then inject that helper intocmux.appbefore the existing architecture verification and signing.Reviewed by Cursor Bugbot for commit ac9284f. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Build the release app with the macOS 26 SDK to match nightly, ensuring Liquid Glass on Tahoe and removing reliance on the runner’s default Xcode. Adds dual-Xcode selection so the app links against 26+ while the Ghostty CLI helper links against a pre-26 SDK.
DEVELOPER_DIR), newest pre-26 for the helper (HELPER_DEVELOPER_DIR); hard-fail if missing.CMUX_SKIP_ZIG_BUILD=1so the app build inherits the macOS 26 SDK and skips the in-Xcode zig helper.nightly.ymlbehavior while keeping existing release guards and icon.Written for commit ac9284f. Summary will update on new commits.
Summary by CodeRabbit