From c23f1fc2cd6916229a450761a08b08e880489b2b Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Tue, 31 Mar 2026 03:04:24 -0700 Subject: [PATCH] Skip zig Ghostty helper builds in CI --- .github/workflows/ci.yml | 9 +++++++ tests/test_ci_skip_zig_build_guard.sh | 36 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100755 tests/test_ci_skip_zig_build_guard.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b7063f67aa4..8db3d3d07790 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,9 @@ jobs: - name: Validate unit-test SwiftPM retry guard run: ./tests/test_ci_unit_test_spm_retry.sh + - name: Validate CI skips zig Ghostty helper builds on macOS + run: ./tests/test_ci_skip_zig_build_guard.sh + - name: Validate cmux scheme test configuration run: ./tests/test_ci_scheme_testaction_debug.sh @@ -77,6 +80,8 @@ jobs: tests: runs-on: warp-macos-15-arm64-6x timeout-minutes: 30 + env: + CMUX_SKIP_ZIG_BUILD: 1 steps: - name: Checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 @@ -241,6 +246,8 @@ jobs: # still run via test-e2e.yml on GitHub-hosted runners. runs-on: warp-macos-15-arm64-6x timeout-minutes: 20 + env: + CMUX_SKIP_ZIG_BUILD: 1 steps: - name: Checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 @@ -403,6 +410,8 @@ jobs: ui-regressions: runs-on: warp-macos-15-arm64-6x timeout-minutes: 25 + env: + CMUX_SKIP_ZIG_BUILD: 1 steps: - name: Checkout uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 diff --git a/tests/test_ci_skip_zig_build_guard.sh b/tests/test_ci_skip_zig_build_guard.sh new file mode 100755 index 000000000000..16251d109e9d --- /dev/null +++ b/tests/test_ci_skip_zig_build_guard.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Regression test to keep CI macOS jobs from live-building the Ghostty helper. +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +WORKFLOW_FILE="$ROOT_DIR/.github/workflows/ci.yml" + +check_job() { + local job_name="$1" + if ! awk -v job_name="$job_name" ' + $0 == " " job_name ":" { + in_job = 1 + next + } + in_job && $0 ~ /^ [^ ]/ { + exit found ? 0 : 1 + } + in_job && $0 ~ /CMUX_SKIP_ZIG_BUILD: 1/ { + found = 1 + } + END { + if (!in_job || !found) { + exit 1 + } + } + ' "$WORKFLOW_FILE"; then + echo "FAIL: $job_name in ci.yml must set CMUX_SKIP_ZIG_BUILD: 1" >&2 + exit 1 + fi +} + +check_job "tests" +check_job "tests-build-and-lag" +check_job "ui-regressions" + +echo "PASS: CI macOS jobs skip zig Ghostty helper builds"