mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix: reset macos swift build cache
(cherry picked from commit 3f75f1a621bf1fe84bf03988a2526b6492ff7ef8)
This commit is contained in:
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -1664,19 +1664,23 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-swift-build-v2-${{ steps.swift-toolchain.outputs.key }}-
|
||||
|
||||
- name: Reset Sparkle binary artifact cache
|
||||
- name: Reset Swift binary artifact cache
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# SwiftPM can restore a stale binary-artifact cache where the
|
||||
# Sparkle.xcframework directory exists without its Info.plist.
|
||||
# Clear Sparkle from both cache layers so the release build resolves
|
||||
# the binary artifact from Package.resolved instead of reusing it.
|
||||
rm -rf apps/macos/.build/artifacts/sparkle "$HOME/Library/Caches/org.swift.swiftpm/artifacts/sparkle"
|
||||
# Clear the restored build workspace plus Sparkle's shared artifact
|
||||
# cache so the release build resolves artifacts from Package.resolved.
|
||||
rm -rf apps/macos/.build "$HOME/Library/Caches/org.swift.swiftpm/artifacts/sparkle"
|
||||
|
||||
- name: Preserve Swift build cache hit
|
||||
if: steps.swift-build-cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ ! -d apps/macos/.build ]; then
|
||||
echo "Swift build cache was reset; skipping mtime preservation."
|
||||
exit 0
|
||||
fi
|
||||
# Exact source-hash cache hits already match these inputs; checkout
|
||||
# mtimes are the only reason SwiftPM rebuilds cached products.
|
||||
find apps/macos/Sources apps/macos/Tests apps/shared/OpenClawKit/Sources apps/swabble/Sources apps/macos/.build/checkouts \
|
||||
|
||||
Reference in New Issue
Block a user