Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Build GhosttyKit.xcframework
run: |
cd ghostty
zig build -Demit-xcframework=true -Demit-macos-app=false -Dxcframework-target=native -Doptimize=ReleaseFast
zig build -Demit-xcframework=true -Demit-macos-app=false -Dxcframework-target=universal -Doptimize=ReleaseFast
cd ..
rm -rf GhosttyKit.xcframework
cp -R ghostty/macos/GhosttyKit.xcframework GhosttyKit.xcframework
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
if: steps.guard_release_assets.outputs.skip_all != 'true'
run: |
cd ghostty
zig build -Demit-xcframework=true -Demit-macos-app=false -Doptimize=ReleaseFast
zig build -Demit-xcframework=true -Demit-macos-app=false -Dxcframework-target=universal -Doptimize=ReleaseFast
cd ..
rm -rf GhosttyKit.xcframework
cp -R ghostty/macos/GhosttyKit.xcframework GhosttyKit.xcframework
Expand Down
3 changes: 2 additions & 1 deletion GhosttyTabs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@
"-framework",
Carbon,
);
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.cmuxterm.app;
PRODUCT_NAME = cmux;
SPARKLE_PUBLIC_KEY = "avjcgKibf1FTvhIjLBxhd+0HSpsXU4D0IGlVk8cgqRc=";
Expand Down Expand Up @@ -836,6 +836,7 @@
"@executable_path/../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 14.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = cmux;
PRODUCT_MODULE_NAME = cmux_cli;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
16 changes: 13 additions & 3 deletions scripts/build-sign-upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,23 @@ done
echo "Pre-flight checks passed"

# --- Build GhosttyKit (if needed) ---
# Always rebuild if the existing xcframework is missing the x86_64 slice,
# which happens when setup.sh seeds a native-only (arm64) build.
NEED_BUILD="false"
if [ ! -d "GhosttyKit.xcframework" ]; then
echo "Building GhosttyKit..."
cd ghostty && zig build -Demit-xcframework=true -Demit-macos-app=false -Dxcframework-target=native -Doptimize=ReleaseFast && cd ..
NEED_BUILD="true"
elif [ ! -d "GhosttyKit.xcframework/macos-arm64_x86_64" ]; then
echo "GhosttyKit.xcframework exists but is not universal, rebuilding..."
NEED_BUILD="true"
fi

if [ "$NEED_BUILD" = "true" ]; then
echo "Building universal GhosttyKit..."
cd ghostty && zig build -Demit-xcframework=true -Demit-macos-app=false -Dxcframework-target=universal -Doptimize=ReleaseFast && cd ..

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Rebuild GhosttyKit for universal release builds

This now requests a universal GhosttyKit build, but build-sign-upload.sh still skips the build whenever GhosttyKit.xcframework already exists (the common case after scripts/setup.sh, which builds/seeds a native-arch framework). With this commit also setting app Release builds to ONLY_ACTIVE_ARCH=NO, local release builds will attempt x86_64 and fail to link against an existing arm64-only GhosttyKit slice. Please force a rebuild (or validate slices) in release packaging instead of reusing any preexisting xcframework directory.

Useful? React with 👍 / 👎.

Comment on lines 65 to +74

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Rebuild GhosttyKit when producing universal release builds

With Release now set to build all architectures (ONLY_ACTIVE_ARCH = NO in GhosttyTabs.xcodeproj/project.pbxproj), this conditional skip can leave a previously built native-only GhosttyKit.xcframework in place, which is common after scripts/setup.sh (it builds GhosttyKit without a universal target). In that state, ./scripts/build-sign-upload.sh can fail during Release xcodebuild or otherwise miss the intended universal dependency slices; the script should verify the existing xcframework has both arm64 and x86_64 slices (or always rebuild universal for release packaging).

Useful? React with 👍 / 👎.

rm -rf GhosttyKit.xcframework
cp -R ghostty/macos/GhosttyKit.xcframework GhosttyKit.xcframework
else
echo "GhosttyKit.xcframework exists, skipping build"
echo "GhosttyKit.xcframework exists and is universal, skipping build"
fi

# --- Build app (Release, unsigned) ---
Expand Down