Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ci-macos-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,13 @@ jobs:
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .ci-source-packages
key: spm-${{ matrix.os }}-${{ hashFiles('cmux.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
restore-keys: spm-${{ matrix.os }}-
# Prefixed, not bare `spm-`: this matrix includes an x86_64 leg and an
# older-Xcode macOS 14 leg, and the arm64 pools restore with a bare
# `spm-` prefix. Sharing the `spm-` namespace would let those pools
# prefix-match an Intel-produced entry. r2-cache.sh namespaces this
# same directory by `$RUNNER_ARCH`, so arch is identity-bearing here.
key: compat-spm-${{ matrix.os }}-${{ hashFiles('cmux.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
restore-keys: compat-spm-${{ matrix.os }}-

- name: Sanitize Swift package cache
run: python3 scripts/ci/sanitize-xcode-source-packages-cache.py .ci-source-packages
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/perf-activation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,22 @@ jobs:
SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages"
mkdir -p "$SOURCE_PACKAGES_DIR"

# Guard against a stale/poisoned Swift-package cache: resolve can
# report success without binary artifacts materialized. Matches the
# check test-e2e.yml and test-depot.yml already run; this workflow
# now restores from the same shared `spm-` namespace they do.
for attempt in 1 2 3; do
if xcodebuild -project cmux.xcodeproj -scheme cmux -configuration Debug \
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \
-resolvePackageDependencies; then
exit 0
if [ -d "$SOURCE_PACKAGES_DIR/artifacts/sparkle/Sparkle/Sparkle.xcframework" ] \
&& [ -d "$SOURCE_PACKAGES_DIR/artifacts/sentry-cocoa/Sentry/Sentry.xcframework" ]; then
exit 0
fi
echo "Resolve succeeded without required binary artifacts; retrying cleanly" >&2
fi
rm -rf "$SOURCE_PACKAGES_DIR"
mkdir -p "$SOURCE_PACKAGES_DIR"
if [ "$attempt" -eq 3 ]; then
echo "Failed to resolve Swift packages after 3 attempts" >&2
exit 1
Expand Down
Loading