From 89587694c6795d72034e2b1a48284936b9eb7844 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Sun, 8 Mar 2026 04:20:23 -0700 Subject: [PATCH] Add universal GhosttyKit regression test --- tests/test_ci_universal_release_settings.sh | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/test_ci_universal_release_settings.sh diff --git a/tests/test_ci_universal_release_settings.sh b/tests/test_ci_universal_release_settings.sh new file mode 100644 index 00000000..3ab48ab9 --- /dev/null +++ b/tests/test_ci_universal_release_settings.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Regression test for universal GhosttyKit and Release build settings. +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)" + +for file in \ + "$ROOT_DIR/.github/workflows/build-ghosttykit.yml" \ + "$ROOT_DIR/scripts/setup.sh" \ + "$ROOT_DIR/scripts/build-sign-upload.sh" +do + if ! grep -Fq -- '-Dxcframework-target=universal' "$file"; then + echo "FAIL: $file must build GhosttyKit with -Dxcframework-target=universal" + exit 1 + fi +done + +if ! awk ' + /\/\* Release \*\// { in_release=1; saw_only_active_arch=0; next } + in_release && /name = / { in_release=0 } + in_release && /ONLY_ACTIVE_ARCH = YES;/ { saw_yes=1 } + in_release && /ONLY_ACTIVE_ARCH = NO;/ { saw_only_active_arch=1 } + END { exit !(saw_only_active_arch && !saw_yes) } +' "$ROOT_DIR/GhosttyTabs.xcodeproj/project.pbxproj"; then + echo "FAIL: Release configurations in project.pbxproj must use ONLY_ACTIVE_ARCH = NO" + exit 1 +fi + +echo "PASS: GhosttyKit builds universal and Release configs disable ONLY_ACTIVE_ARCH"