From f50f70dc412e9f0faff67ec2a20ac593e6729cc7 Mon Sep 17 00:00:00 2001 From: tiffanysun1 Date: Thu, 12 Mar 2026 02:19:51 -0700 Subject: [PATCH] Run version memory guard in CI --- .github/workflows/ci.yml | 12 ++++++++++++ .github/workflows/nightly.yml | 7 +++++++ .github/workflows/release.yml | 8 ++++++++ 3 files changed, 27 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7315d8ed..bbaee7cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,6 +151,18 @@ jobs: fi fi + - name: Run CLI version memory guard regression + run: | + set -euo pipefail + + CLI_BIN="$(find "$HOME/Library/Developer/Xcode/DerivedData" -path "*/Build/Products/Debug/cmux" -print -quit)" + if [ -z "${CLI_BIN:-}" ] || [ ! -x "$CLI_BIN" ]; then + echo "cmux CLI binary not found in DerivedData" >&2 + exit 1 + fi + + 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). if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5b3e21a9..5c46f0a3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -192,6 +192,13 @@ jobs: [[ "$APP_ARCHS" == *arm64* && "$APP_ARCHS" == *x86_64* ]] [[ "$CLI_ARCHS" == *arm64* && "$CLI_ARCHS" == *x86_64* ]] + - name: Run CLI version memory guard regression + run: | + set -euo pipefail + CLI_BINARY="build-universal/Build/Products/Release/cmux.app/Contents/Resources/bin/cmux" + [ -x "$CLI_BINARY" ] || { echo "cmux CLI binary not found at $CLI_BINARY" >&2; exit 1; } + CMUX_CLI_BIN="$CLI_BINARY" python3 tests/test_cli_version_memory_guard.py + - name: Check whether build commit is still current main HEAD if: needs.decide.outputs.should_publish == 'true' id: current_head diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec935c63..6a58f07f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -134,6 +134,14 @@ jobs: -clonedSourcePackagesDirPath .spm-cache \ CODE_SIGNING_ALLOWED=NO build + - name: Run CLI version memory guard regression + if: steps.guard_release_assets.outputs.skip_all != 'true' + run: | + set -euo pipefail + CLI_BINARY="build/Build/Products/Release/cmux.app/Contents/Resources/bin/cmux" + [ -x "$CLI_BINARY" ] || { echo "cmux CLI binary not found at $CLI_BINARY" >&2; exit 1; } + CMUX_CLI_BIN="$CLI_BINARY" python3 tests/test_cli_version_memory_guard.py + - name: Inject Sparkle keys into Info.plist if: steps.guard_release_assets.outputs.skip_all != 'true' run: |