Skip to content

fix(ci): retry the Swift build once after purging a stale Sparkle artifact - #1843

Open
Dumbris wants to merge 1 commit into
mainfrom
claude/swift-build-sparkle-retry
Open

Dumbris wants to merge 1 commit into
mainfrom
claude/swift-build-sparkle-retry

Conversation

@Dumbris

@Dumbris Dumbris commented Nov 8, 2026

Copy link
Copy Markdown
Member

Summary

The macOS Build Binaries leg fails intermittently inside swift build: the GitHub release CDN answers the Sparkle xcframework download with a short error body (92 bytes, twice in a row on #1839), SwiftPM leaves the destination behind in ~/Library/Caches/org.swift.swiftpm/artifacts, and the resolution dies with ... already exists in file system. The script then falls back to swiftc, which cannot bundle Sparkle, and the job exits 1 after Sparkle.framework NOT found.

  • scripts/build-swift-app.sh captures the swift build output; on the download-failure signature (failed downloading / already exists in file system) it purges the stale Sparkle entries from the SwiftPM artifact cache and the package's .build/artifacts, then runs the build once more. A compile error is still reported once, as before.
  • scripts/build-swift-app.test.sh: hermetic red/green self-test (fake swift/swiftc/curl on PATH, throwaway HOME and package dir) covering stale-artifact retry, compile-error no-retry, and clean first-time build. Wired into unit-tests.yml as Swift Build Script.
  • Two env vars exist for the test only: BUILD_SWIFT_APP_SWIFT_DIR, BUILD_SWIFT_APP_STOP_AFTER_BUILD.

Test plan

  • bash scripts/build-swift-app.test.sh → 14/14 (failed 4/14 before the fix)
  • bash -n under the system bash 3.2; shellcheck adds no new findings
  • macOS Build Binaries on this PR builds the tray with Sparkle bundled

🤖 Generated with Claude Code

…ifact

The macOS Build Binaries leg fails intermittently in `swift build`: the
GitHub release CDN answers the Sparkle xcframework download with a short
error body (92 bytes on PR #1839, twice in a row), SwiftPM leaves the
destination behind in ~/Library/Caches/org.swift.swiftpm/artifacts, and
the resolution dies with "... already exists in file system". The script
then falls back to swiftc, which cannot bundle Sparkle, and the job exits
1 after "Sparkle.framework NOT found".

build-swift-app.sh now captures the swift build output; when it shows the
download-failure signature it removes the stale Sparkle entries from the
SwiftPM artifact cache and the package's .build/artifacts and runs the
build once more. A compile error is still reported once, as before.

scripts/build-swift-app.test.sh is a hermetic red/green self-test (fake
swift/swiftc/curl on PATH, throwaway HOME and package dir) and runs in
unit-tests.yml as "Swift Build Script". Two env vars exist for it only:
BUILD_SWIFT_APP_SWIFT_DIR and BUILD_SWIFT_APP_STOP_AFTER_BUILD.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 21eb451
Status: ✅  Deploy successful!
Preview URL: https://ffa81b10.mcpproxy-docs.pages.dev
Branch Preview URL: https://claude-swift-build-sparkle-r.mcpproxy-docs.pages.dev

View logs

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: claude/swift-build-sparkle-retry

Available Artifacts

  • archive-darwin-amd64 (32 MB)
  • archive-darwin-arm64 (29 MB)
  • archive-linux-amd64 (20 MB)
  • archive-linux-arm64 (18 MB)
  • archive-windows-amd64 (32 MB)
  • archive-windows-arm64 (28 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (28 MB)
  • installer-dmg-darwin-arm64 (25 MB)
  • smart-mcp-proxymcpproxy-goYOWWGV.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 42499958334 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants