Merge remote-tracking branch 'origin/main' into pr-ssh-stack-main
This commit is contained in:
commit
8531e4f79a
8 changed files with 227 additions and 126 deletions
22
.github/workflows/build-ghosttykit.yml
vendored
22
.github/workflows/build-ghosttykit.yml
vendored
|
|
@ -8,9 +8,10 @@ on:
|
|||
|
||||
jobs:
|
||||
build-ghosttykit:
|
||||
# Never run Depot jobs for fork pull requests (avoid billing on external PRs).
|
||||
# Never run WarpBuild jobs for fork pull requests (avoid billing on external PRs).
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
||||
runs-on: depot-macos-latest
|
||||
runs-on: warp-macos-15-arm64-6x
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
|
@ -61,13 +62,18 @@ jobs:
|
|||
if: steps.check-release.outputs.exists == 'false'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
if command -v brew >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "zig is required to build GhosttyKit.xcframework. Install zig and retry." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
cd ghostty && zig build -Demit-xcframework=true -Demit-macos-app=false -Dxcframework-target=universal -Doptimize=ReleaseFast
|
||||
|
||||
|
|
|
|||
70
.github/workflows/ci-macos-compat.yml
vendored
70
.github/workflows/ci-macos-compat.yml
vendored
|
|
@ -13,8 +13,12 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-14, macos-15]
|
||||
include:
|
||||
- os: warp-macos-15-arm64-6x
|
||||
timeout: 20
|
||||
smoke: true
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: ${{ matrix.timeout }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
|
@ -39,45 +43,48 @@ jobs:
|
|||
echo "Selected: $XCODE_APP"
|
||||
echo "DEVELOPER_DIR=$XCODE_DIR" >> "$GITHUB_ENV"
|
||||
export DEVELOPER_DIR="$XCODE_DIR"
|
||||
xcodebuild -version
|
||||
XCODE_VER="$(xcodebuild -version | head -1)"
|
||||
echo "XCODE_VER=$XCODE_VER" >> "$GITHUB_ENV"
|
||||
echo "$XCODE_VER"
|
||||
xcrun --sdk macosx --show-sdk-path
|
||||
sw_vers
|
||||
|
||||
- name: Cache GhosttyKit.xcframework
|
||||
id: cache-ghosttykit
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: GhosttyKit.xcframework
|
||||
key: ghosttykit-${{ hashFiles('.gitmodules', 'ghostty') }}
|
||||
|
||||
- name: Download pre-built GhosttyKit.xcframework
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
if: steps.cache-ghosttykit.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
GHOSTTY_SHA=$(git -C ghostty rev-parse HEAD)
|
||||
TAG="xcframework-$GHOSTTY_SHA"
|
||||
URL="https://github.com/manaflow-ai/ghostty/releases/download/$TAG/GhosttyKit.xcframework.tar.gz"
|
||||
echo "Downloading xcframework for ghostty $GHOSTTY_SHA"
|
||||
MAX_RETRIES=30
|
||||
RETRY_DELAY=20
|
||||
for i in $(seq 1 $MAX_RETRIES); do
|
||||
if curl -fSL -o GhosttyKit.xcframework.tar.gz "$URL"; then
|
||||
echo "Download succeeded on attempt $i"
|
||||
break
|
||||
fi
|
||||
if [ "$i" -eq "$MAX_RETRIES" ]; then
|
||||
echo "Failed to download xcframework after $MAX_RETRIES attempts" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Attempt $i/$MAX_RETRIES failed, retrying in ${RETRY_DELAY}s..."
|
||||
sleep $RETRY_DELAY
|
||||
done
|
||||
tar xzf GhosttyKit.xcframework.tar.gz
|
||||
rm GhosttyKit.xcframework.tar.gz
|
||||
test -d GhosttyKit.xcframework
|
||||
./scripts/download-prebuilt-ghosttykit.sh
|
||||
|
||||
- name: Install zig
|
||||
run: |
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
|
||||
- name: Clean DerivedData
|
||||
run: rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
- name: Cache DerivedData
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
key: deriveddata-${{ matrix.os }}-${{ env.XCODE_VER }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.pbxproj') }}
|
||||
restore-keys: |
|
||||
deriveddata-${{ matrix.os }}-${{ env.XCODE_VER }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-
|
||||
deriveddata-${{ matrix.os }}-${{ env.XCODE_VER }}-
|
||||
|
||||
- name: Cache Swift packages
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
|
|
@ -147,6 +154,7 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Create virtual display
|
||||
if: matrix.smoke
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "=== Display before ==="
|
||||
|
|
@ -162,6 +170,7 @@ jobs:
|
|||
system_profiler SPDisplaysDataType 2>/dev/null || echo "(no display info)"
|
||||
|
||||
- name: Build app for smoke test
|
||||
if: matrix.smoke
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages"
|
||||
|
|
@ -171,6 +180,7 @@ jobs:
|
|||
-destination "platform=macOS" build
|
||||
|
||||
- name: Smoke test
|
||||
if: matrix.smoke
|
||||
run: |
|
||||
set -euo pipefail
|
||||
chmod +x scripts/smoke-test-ci.sh
|
||||
|
|
|
|||
147
.github/workflows/ci.yml
vendored
147
.github/workflows/ci.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
||||
- name: Validate Depot runner guards
|
||||
- name: Validate WarpBuild runner guards
|
||||
run: ./tests/test_ci_self_hosted_guard.sh
|
||||
|
||||
- name: Validate create-dmg version pinning
|
||||
|
|
@ -71,7 +71,10 @@ jobs:
|
|||
run: bun tsc --noEmit
|
||||
|
||||
tests:
|
||||
runs-on: macos-15
|
||||
# Never run WarpBuild jobs for fork pull requests (avoid billing on external PRs).
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
||||
runs-on: warp-macos-15-arm64-6x
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
|
@ -81,35 +84,57 @@ jobs:
|
|||
- name: Select Xcode
|
||||
run: |
|
||||
set -euo pipefail
|
||||
XCODE_APP="$(ls -d /Applications/Xcode_*.app 2>/dev/null | sort | tail -n 1 || true)"
|
||||
if [ -z "$XCODE_APP" ]; then
|
||||
XCODE_APP="/Applications/Xcode.app"
|
||||
fi
|
||||
if [ -d "/Applications/Xcode.app/Contents/Developer" ]; then
|
||||
XCODE_DIR="/Applications/Xcode.app/Contents/Developer"
|
||||
else
|
||||
XCODE_APP="$(ls -d /Applications/Xcode*.app 2>/dev/null | sort | tail -n 1 || true)"
|
||||
if [ -n "$XCODE_APP" ]; then
|
||||
XCODE_DIR="$XCODE_APP/Contents/Developer"
|
||||
if [ ! -d "$XCODE_DIR" ]; then
|
||||
echo "No Xcode found under /Applications" >&2
|
||||
else
|
||||
echo "No Xcode.app found under /Applications" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Selected: $XCODE_APP"
|
||||
fi
|
||||
echo "DEVELOPER_DIR=$XCODE_DIR" >> "$GITHUB_ENV"
|
||||
export DEVELOPER_DIR="$XCODE_DIR"
|
||||
xcodebuild -version
|
||||
xcrun --sdk macosx --show-sdk-path
|
||||
|
||||
- name: Cache GhosttyKit.xcframework
|
||||
id: cache-ghosttykit
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: GhosttyKit.xcframework
|
||||
key: ghosttykit-${{ hashFiles('.gitmodules', 'ghostty') }}
|
||||
|
||||
- name: Download pre-built GhosttyKit.xcframework
|
||||
if: steps.cache-ghosttykit.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
./scripts/download-prebuilt-ghosttykit.sh
|
||||
|
||||
- name: Install zig
|
||||
run: |
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
|
||||
- name: Clean DerivedData
|
||||
run: |
|
||||
# Remove stale build cache to avoid incremental build errors
|
||||
rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
- name: Cache DerivedData
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
key: deriveddata-tests-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.pbxproj') }}
|
||||
restore-keys: |
|
||||
deriveddata-tests-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-
|
||||
deriveddata-tests-
|
||||
|
||||
- name: Cache Swift packages
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
|
|
@ -204,10 +229,14 @@ jobs:
|
|||
|
||||
CMUX_CLI_BIN="$CLI_BIN" python3 tests/test_cli_version_memory_guard.py
|
||||
|
||||
tests-depot:
|
||||
# Never run Depot jobs for fork pull requests (avoid billing on external PRs).
|
||||
tests-build-and-lag:
|
||||
# Build the full cmux scheme and run the lag regression on WarpBuild.
|
||||
# XCUITests cannot run on WarpBuild (Virtualization.framework limitation:
|
||||
# XCUIApplication stuck "Running Background", 62s activation timeout per
|
||||
# test). Interactive UI tests run via test-e2e.yml on GitHub-hosted runners.
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
||||
runs-on: depot-macos-latest
|
||||
runs-on: warp-macos-15-arm64-6x
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
|
@ -232,25 +261,49 @@ jobs:
|
|||
export DEVELOPER_DIR="$XCODE_DIR"
|
||||
xcodebuild -version
|
||||
|
||||
- name: Cache GhosttyKit.xcframework
|
||||
id: cache-ghosttykit-lag
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: GhosttyKit.xcframework
|
||||
key: ghosttykit-${{ hashFiles('.gitmodules', 'ghostty') }}
|
||||
|
||||
- name: Download pre-built GhosttyKit.xcframework
|
||||
if: steps.cache-ghosttykit-lag.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
./scripts/download-prebuilt-ghosttykit.sh
|
||||
|
||||
- name: Install zig
|
||||
run: |
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
|
||||
- name: Clean DerivedData
|
||||
run: rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
- name: Cache DerivedData
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
key: deriveddata-build-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.pbxproj') }}
|
||||
restore-keys: |
|
||||
deriveddata-build-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}-
|
||||
deriveddata-build-
|
||||
|
||||
- name: Cache Swift packages
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: .ci-source-packages
|
||||
key: spm-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
|
||||
restore-keys: spm-
|
||||
key: spm-build-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
|
||||
restore-keys: spm-build-
|
||||
|
||||
- name: Resolve Swift packages
|
||||
run: |
|
||||
|
|
@ -272,6 +325,15 @@ jobs:
|
|||
sleep $((attempt * 5))
|
||||
done
|
||||
|
||||
- name: Build app
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages"
|
||||
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \
|
||||
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \
|
||||
-disableAutomaticPackageResolution \
|
||||
-destination "platform=macOS" build
|
||||
|
||||
- name: Create virtual display
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
|
@ -282,41 +344,6 @@ jobs:
|
|||
echo "VDISPLAY_PID=$VDISPLAY_PID" >> "$GITHUB_ENV"
|
||||
sleep 3
|
||||
|
||||
- name: Run UI tests
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages"
|
||||
# SidebarResizeUITests hangs on headless runners (mouse drag simulation
|
||||
# doesn't work without a physical display, even with virtual display).
|
||||
# Skip it in CI; it runs fine on local machines.
|
||||
run_ui_tests() {
|
||||
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \
|
||||
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \
|
||||
-disableAutomaticPackageResolution \
|
||||
-destination "platform=macOS" \
|
||||
-maximum-test-execution-time-allowance 120 \
|
||||
-only-testing:cmuxUITests \
|
||||
-skip-testing:cmuxUITests/SidebarResizeUITests test 2>&1
|
||||
}
|
||||
|
||||
# xcodebuild exits 65 even for expected failures (XCTExpectFailure).
|
||||
# Capture output and fail only if there are unexpected failures.
|
||||
set +e
|
||||
OUTPUT=$(run_ui_tests)
|
||||
EXIT_CODE=$?
|
||||
set -e
|
||||
|
||||
echo "$OUTPUT"
|
||||
if [ "$EXIT_CODE" -ne 0 ]; then
|
||||
SUMMARY=$(echo "$OUTPUT" | grep "Executed.*tests.*with.*failures" | tail -1)
|
||||
if echo "$SUMMARY" | grep -q "(0 unexpected)"; then
|
||||
echo "All failures are expected, treating as pass"
|
||||
else
|
||||
echo "Unexpected test failures detected"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Run workspace churn typing-lag regression
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
|
|
|||
17
.github/workflows/nightly.yml
vendored
17
.github/workflows/nightly.yml
vendored
|
|
@ -101,7 +101,8 @@ jobs:
|
|||
build-sign-notarize-nightly:
|
||||
needs: decide
|
||||
if: needs.decide.outputs.should_build == 'true'
|
||||
runs-on: depot-macos-latest
|
||||
runs-on: warp-macos-15-arm64-6x
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout build ref
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
|
@ -153,8 +154,18 @@ jobs:
|
|||
- name: Install build deps
|
||||
if: needs.decide.outputs.should_publish != 'true' || steps.current_head_prebuild.outputs.still_current == 'true'
|
||||
run: |
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
npm install --global "create-dmg@${CREATE_DMG_VERSION}"
|
||||
|
||||
|
|
|
|||
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
|
@ -16,7 +16,8 @@ env:
|
|||
|
||||
jobs:
|
||||
build-sign-notarize:
|
||||
runs-on: depot-macos-latest
|
||||
runs-on: warp-macos-15-arm64-6x
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
|
@ -101,8 +102,18 @@ jobs:
|
|||
- name: Install build deps
|
||||
if: steps.guard_release_assets.outputs.skip_all != 'true'
|
||||
run: |
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
npm install --global "create-dmg@${CREATE_DMG_VERSION}"
|
||||
|
||||
|
|
|
|||
17
.github/workflows/test-depot.yml
vendored
17
.github/workflows/test-depot.yml
vendored
|
|
@ -28,7 +28,8 @@ on:
|
|||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: depot-macos-latest
|
||||
runs-on: warp-macos-15-arm64-6x
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
|
|
@ -84,8 +85,18 @@ jobs:
|
|||
|
||||
- name: Install zig
|
||||
run: |
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
|
||||
- name: Create virtual display
|
||||
|
|
|
|||
29
.github/workflows/test-e2e.yml
vendored
29
.github/workflows/test-e2e.yml
vendored
|
|
@ -20,17 +20,18 @@ on:
|
|||
default: true
|
||||
type: boolean
|
||||
runner:
|
||||
description: "Runner OS (macos-15 or macos-26)"
|
||||
description: "Runner OS (Depot runners for GUI activation support)"
|
||||
required: false
|
||||
default: "macos-15"
|
||||
default: "depot-macos-latest"
|
||||
type: choice
|
||||
options:
|
||||
- macos-15
|
||||
- macos-26
|
||||
- depot-macos-latest
|
||||
- depot-macos-14
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
runs-on: ${{ inputs.runner || 'macos-15' }}
|
||||
runs-on: ${{ inputs.runner || 'depot-macos-latest' }}
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
TEST_REF: ${{ inputs.ref || github.ref }}
|
||||
steps:
|
||||
|
|
@ -92,8 +93,18 @@ jobs:
|
|||
|
||||
- name: Install zig
|
||||
run: |
|
||||
if ! command -v zig >/dev/null 2>&1; then
|
||||
brew install zig
|
||||
ZIG_REQUIRED="0.15.2"
|
||||
if command -v zig >/dev/null 2>&1 && zig version 2>/dev/null | grep -q "^${ZIG_REQUIRED}"; then
|
||||
echo "zig ${ZIG_REQUIRED} already installed"
|
||||
else
|
||||
echo "Installing zig ${ZIG_REQUIRED} from tarball"
|
||||
curl -fSL "https://ziglang.org/download/${ZIG_REQUIRED}/zig-aarch64-macos-${ZIG_REQUIRED}.tar.xz" -o /tmp/zig.tar.xz
|
||||
tar xf /tmp/zig.tar.xz -C /tmp
|
||||
sudo mkdir -p /usr/local/bin /usr/local/lib
|
||||
sudo cp -f /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/zig /usr/local/bin/zig
|
||||
sudo cp -rf /tmp/zig-aarch64-macos-${ZIG_REQUIRED}/lib /usr/local/lib/zig
|
||||
export PATH="/usr/local/bin:$PATH"
|
||||
zig version
|
||||
fi
|
||||
|
||||
- name: Create virtual display
|
||||
|
|
@ -161,8 +172,8 @@ jobs:
|
|||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: .ci-source-packages
|
||||
key: spm-${{ inputs.runner || 'macos-15' }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
|
||||
restore-keys: spm-${{ inputs.runner || 'macos-15' }}-
|
||||
key: spm-${{ inputs.runner || 'depot-macos-latest' }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
|
||||
restore-keys: spm-${{ inputs.runner || 'depot-macos-latest' }}-
|
||||
|
||||
- name: Resolve Swift packages
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# Regression test for https://github.com/manaflow-ai/cmux/issues/385.
|
||||
# Ensures Depot-hosted UI tests are never run for fork pull requests.
|
||||
# Ensures paid/gated CI jobs are never run for fork pull requests.
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
|
@ -9,21 +9,35 @@ WORKFLOW_FILE="$ROOT_DIR/.github/workflows/ci.yml"
|
|||
EXPECTED_IF="if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository"
|
||||
|
||||
if ! grep -Fq "$EXPECTED_IF" "$WORKFLOW_FILE"; then
|
||||
echo "FAIL: Missing fork pull_request guard for tests in $WORKFLOW_FILE"
|
||||
echo "FAIL: Missing fork pull_request guard in $WORKFLOW_FILE"
|
||||
echo "Expected line:"
|
||||
echo " $EXPECTED_IF"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# tests: must use WarpBuild runner with fork guard (paid runner)
|
||||
if ! awk '
|
||||
/^ tests-depot:/ { in_tests=1; next }
|
||||
/^ tests:/ { in_tests=1; next }
|
||||
in_tests && /^ [^[:space:]]/ { in_tests=0 }
|
||||
in_tests && /runs-on: depot-macos-latest/ { saw_depot=1 }
|
||||
in_tests && /runs-on: warp-macos-15-arm64-6x/ { saw_warp=1 }
|
||||
in_tests && /github.event.pull_request.head.repo.full_name == github.repository/ { saw_guard=1 }
|
||||
END { exit !(saw_depot && saw_guard) }
|
||||
END { exit !(saw_warp && saw_guard) }
|
||||
' "$WORKFLOW_FILE"; then
|
||||
echo "FAIL: tests-depot block must keep both depot-macos-latest runner and fork guard"
|
||||
echo "FAIL: tests block must keep both warp-macos-15-arm64-6x runner and fork guard"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "PASS: tests-depot Depot runner fork guard is present"
|
||||
# tests-build-and-lag: must use WarpBuild runner with fork guard (paid runner)
|
||||
if ! awk '
|
||||
/^ tests-build-and-lag:/ { in_tests=1; next }
|
||||
in_tests && /^ [^[:space:]]/ { in_tests=0 }
|
||||
in_tests && /runs-on: warp-macos-15-arm64-6x/ { saw_warp=1 }
|
||||
in_tests && /github.event.pull_request.head.repo.full_name == github.repository/ { saw_guard=1 }
|
||||
END { exit !(saw_warp && saw_guard) }
|
||||
' "$WORKFLOW_FILE"; then
|
||||
echo "FAIL: tests-build-and-lag block must keep both warp-macos-15-arm64-6x runner and fork guard"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "PASS: tests WarpBuild runner fork guard is present"
|
||||
echo "PASS: tests-build-and-lag WarpBuild runner fork guard is present"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue