diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eeff518f..5f41a302 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,6 +154,12 @@ jobs: fi fi + - name: Run bundled Ghostty theme picker helper regression + run: | + set -euo pipefail + CMUX_SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" \ + ./tests/test_bundled_ghostty_theme_picker_helper.sh + - name: Run CLI version memory guard regression run: | set -euo pipefail diff --git a/tests/test_bundled_ghostty_theme_picker_helper.sh b/tests/test_bundled_ghostty_theme_picker_helper.sh new file mode 100755 index 00000000..94a19911 --- /dev/null +++ b/tests/test_bundled_ghostty_theme_picker_helper.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +set -euo pipefail + +SOURCE_PACKAGES_DIR="${CMUX_SOURCE_PACKAGES_DIR:-$PWD/.ci-source-packages}" +DERIVED_DATA_PATH="${CMUX_DERIVED_DATA_PATH:-$PWD/.ci-bundled-ghostty-helper}" +CONFIGURATION="${CMUX_CONFIGURATION:-Debug}" + +case "$CONFIGURATION" in + Debug) + APP_NAME="cmux DEV.app" + ;; + Release) + APP_NAME="cmux.app" + ;; + *) + echo "FAIL: unsupported configuration $CONFIGURATION" >&2 + exit 1 + ;; +esac + +mkdir -p "$SOURCE_PACKAGES_DIR" +rm -rf "$DERIVED_DATA_PATH" + +xcodebuild \ + -project GhosttyTabs.xcodeproj \ + -scheme cmux \ + -configuration "$CONFIGURATION" \ + -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ + -disableAutomaticPackageResolution \ + -derivedDataPath "$DERIVED_DATA_PATH" \ + -destination "platform=macOS" \ + build + +APP_PATH="$DERIVED_DATA_PATH/Build/Products/$CONFIGURATION/$APP_NAME" +HELPER_PATH="$APP_PATH/Contents/Resources/bin/ghostty" + +if [ ! -x "$HELPER_PATH" ]; then + echo "FAIL: bundled Ghostty theme picker helper missing at $HELPER_PATH" >&2 + exit 1 +fi + +echo "PASS: bundled Ghostty theme picker helper present at $HELPER_PATH"