Repository navigation
Retry Warp display regression once before failing CI #1761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
9d85e63
Retry Warp display regression once in CI
lawrencecchen f000706
Retry Warp startup cancellations only
lawrencecchen 6d9c926
Run CI wrapper jobs on hosted runners
lawrencecchen 594791d
Extract CI retry steps into composite actions
lawrencecchen 62dabe1
Tighten CI retry start signals
lawrencecchen b3598dc
Polish CI composite actions
lawrencecchen 07f313b
Raise CI tests timeout budget
lawrencecchen 0ca466d
Harden Zig install and GhosttyKit cache keys
lawrencecchen fc7b5f4
Raise CI unit test budgets and harden Zig reuse
lawrencecchen b82c95e
Shard Warp unit tests and slim compat CI
lawrencecchen 9901891
Fix shard bash portability and restore compat test coverage
lawrencecchen db6538a
Stabilize macOS compat test selection
lawrencecchen e606e96
Retry CI jobs only before real work starts
lawrencecchen 13f27f5
Tighten compat workflow guard coverage
lawrencecchen 6cac9a2
test(ci): guard unit shard hang timeout
lawrencecchen e13a86d
fix(ci): cap unit shard hang duration
lawrencecchen 948356a
test(ci): guard retry output gating
lawrencecchen 1e5405a
fix(ci): trust explicit retry outputs
lawrencecchen b153299
fix(test): tighten unit shard timeout guard
lawrencecchen 120aff4
Retry cancelled CI attempts deterministically
lawrencecchen 8f5b7a8
Retry cancelled macOS compat jobs
lawrencecchen 19b13a0
Fix GhosttyKit compat guard test
lawrencecchen 498c8ca
Use shared retry verifier in CI wrappers
lawrencecchen b5f7545
Merge remote-tracking branch 'origin/main' into task-main-ui-checkout…
lawrencecchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
113 changes: 113 additions & 0 deletions
113
.github/actions/run-display-resolution-regression/action.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| name: Run display resolution regression attempt | ||
| description: Run the display resolution churn XCUITest on WarpBuild. | ||
| outputs: | ||
| test_started: | ||
| description: Whether the display regression step started. | ||
| value: ${{ steps.run-display-regression.outputs.test_started }} | ||
| passed: | ||
| description: Whether the display regression passed. | ||
| value: ${{ steps.mark-passed.outputs.passed }} | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Select Xcode | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| 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" | ||
| else | ||
| echo "No Xcode.app found under /Applications" >&2 | ||
| exit 1 | ||
| fi | ||
| fi | ||
| echo "DEVELOPER_DIR=$XCODE_DIR" >> "$GITHUB_ENV" | ||
| export DEVELOPER_DIR="$XCODE_DIR" | ||
| xcodebuild -version | ||
| xcrun --sdk macosx --show-sdk-path | ||
|
|
||
| - name: Download pre-built GhosttyKit.xcframework | ||
| shell: bash | ||
| run: ./scripts/download-prebuilt-ghosttykit.sh | ||
|
|
||
| - name: Install zig | ||
| shell: bash | ||
| run: | | ||
| 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: Cache Swift packages | ||
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 | ||
| with: | ||
| path: .ci-source-packages | ||
| key: spm-ui-display-resolution-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }} | ||
| restore-keys: spm-ui-display-resolution- | ||
|
|
||
| - name: Resolve Swift packages | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" | ||
| mkdir -p "$SOURCE_PACKAGES_DIR" | ||
|
|
||
| for attempt in 1 2 3; do | ||
| if xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ | ||
| -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ | ||
| -resolvePackageDependencies; then | ||
| exit 0 | ||
| fi | ||
| if [ "$attempt" -eq 3 ]; then | ||
| echo "Failed to resolve Swift packages after 3 attempts" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "Package resolution failed on attempt $attempt, retrying..." | ||
| sleep $((attempt * 5)) | ||
| done | ||
|
|
||
| - name: Run display resolution churn UI regression | ||
| id: run-display-regression | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| echo "test_started=true" >> "$GITHUB_OUTPUT" | ||
| SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" | ||
| HELPER_PATH="/tmp/create-virtual-display" | ||
| MANIFEST_PATH="/tmp/cmux-ui-test-display-harness.json" | ||
|
|
||
| rm -f "$MANIFEST_PATH" | ||
| trap 'rm -f "$MANIFEST_PATH"' EXIT | ||
|
|
||
| clang -framework Foundation -framework CoreGraphics \ | ||
| -o "$HELPER_PATH" scripts/create-virtual-display.m | ||
|
|
||
| cat >"$MANIFEST_PATH" <<EOF | ||
| {"helperBinaryPath":"$HELPER_PATH"} | ||
| EOF | ||
|
|
||
| xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ | ||
| -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ | ||
| -disableAutomaticPackageResolution \ | ||
| -destination "platform=macOS" \ | ||
| -only-testing:cmuxUITests/DisplayResolutionRegressionUITests \ | ||
| test | ||
|
|
||
| - name: Mark display regression passed | ||
| if: ${{ success() }} | ||
| id: mark-passed | ||
| shell: bash | ||
| run: echo "passed=true" >> "$GITHUB_OUTPUT" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,168 @@ | ||
| name: Run lag regression attempt | ||
| description: Build cmux on WarpBuild and run the workspace churn typing-lag regression. | ||
| outputs: | ||
| test_started: | ||
| description: Whether the lag regression step started. | ||
| value: ${{ steps.run-lag-regression.outputs.test_started }} | ||
| passed: | ||
| description: Whether the lag regression passed. | ||
| value: ${{ steps.mark-passed.outputs.passed }} | ||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Select Xcode | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| 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" | ||
| else | ||
| echo "No Xcode.app found under /Applications" >&2 | ||
| exit 1 | ||
| fi | ||
| fi | ||
| echo "DEVELOPER_DIR=$XCODE_DIR" >> "$GITHUB_ENV" | ||
| 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') }} | ||
|
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| - name: Download pre-built GhosttyKit.xcframework | ||
| if: steps.cache-ghosttykit-lag.outputs.cache-hit != 'true' | ||
| shell: bash | ||
| run: ./scripts/download-prebuilt-ghosttykit.sh | ||
|
|
||
| - name: Install zig | ||
| shell: bash | ||
| run: | | ||
| 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 | ||
|
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
|
||
| export PATH="/usr/local/bin:$PATH" | ||
| zig version | ||
| fi | ||
|
|
||
| - 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-build-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }} | ||
| restore-keys: spm-build- | ||
|
|
||
| - name: Resolve Swift packages | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" | ||
| mkdir -p "$SOURCE_PACKAGES_DIR" | ||
|
|
||
| for attempt in 1 2 3; do | ||
| if xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ | ||
| -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ | ||
| -resolvePackageDependencies; then | ||
| exit 0 | ||
| fi | ||
| if [ "$attempt" -eq 3 ]; then | ||
| echo "Failed to resolve Swift packages after 3 attempts" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "Package resolution failed on attempt $attempt, retrying..." | ||
| sleep $((attempt * 5)) | ||
| done | ||
|
|
||
| - name: Build app | ||
| shell: bash | ||
| 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 | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| clang -framework Foundation -framework CoreGraphics \ | ||
| -o /tmp/create-virtual-display scripts/create-virtual-display.m | ||
| /tmp/create-virtual-display & | ||
| VDISPLAY_PID=$! | ||
| echo "VDISPLAY_PID=$VDISPLAY_PID" >> "$GITHUB_ENV" | ||
| sleep 3 | ||
|
|
||
| - name: Run workspace churn typing-lag regression | ||
| id: run-lag-regression | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| echo "test_started=true" >> "$GITHUB_OUTPUT" | ||
|
|
||
| APP="$(find "$HOME/Library/Developer/Xcode/DerivedData" -path "*/Build/Products/Debug/cmux DEV.app" -print -quit)" | ||
| if [ -z "${APP:-}" ] || [ ! -d "$APP" ]; then | ||
| echo "cmux DEV.app not found in DerivedData" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| TAG="ci-lag" | ||
| SOCK="/tmp/cmux-debug-${TAG}.sock" | ||
| BUNDLE_ID="$( | ||
| /usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$APP/Contents/Info.plist" 2>/dev/null \ | ||
| || echo 'com.cmuxterm.app.debug' | ||
| )" | ||
|
|
||
| pkill -x "cmux DEV" || true | ||
| rm -f "$SOCK" "/tmp/cmux-${TAG}.sock" || true | ||
| defaults write "$BUNDLE_ID" socketControlMode -string full >/dev/null 2>&1 || true | ||
|
|
||
| CMUX_TAG="$TAG" CMUX_SOCKET_PATH="$SOCK" CMUX_UI_TEST_MODE=1 "$APP/Contents/MacOS/cmux DEV" >/tmp/cmux-ci-lag.log 2>&1 & | ||
| APP_PID=$! | ||
| trap 'kill "$APP_PID" >/dev/null 2>&1 || true' EXIT | ||
|
|
||
| for _ in {1..240}; do | ||
| [ -S "$SOCK" ] && break | ||
| sleep 0.25 | ||
| done | ||
| [ -S "$SOCK" ] || { echo "Socket not ready at $SOCK" >&2; exit 1; } | ||
|
|
||
| CMUX_SOCKET_PATH="$SOCK" \ | ||
| CMUX_LAG_MAX_P95_RATIO=1.70 \ | ||
| CMUX_LAG_MAX_AVG_RATIO=1.70 \ | ||
| CMUX_LAG_MIN_BASELINE_P95_MS_FOR_RATIO=6.0 \ | ||
| CMUX_LAG_MIN_BASELINE_AVG_MS_FOR_RATIO=4.0 \ | ||
| CMUX_LAG_MAX_P95_DELTA_MS=20.0 \ | ||
| CMUX_LAG_MAX_AVG_DELTA_MS=12.0 \ | ||
| CMUX_LAG_MAX_CHURN_P95_MS=35 \ | ||
| CMUX_LAG_KEY_EVENTS=180 \ | ||
| python3 tests/test_workspace_churn_up_arrow_lag.py | ||
|
|
||
| - name: Mark lag regression passed | ||
| if: ${{ success() }} | ||
| id: mark-passed | ||
| shell: bash | ||
| run: echo "passed=true" >> "$GITHUB_OUTPUT" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.