Skip to content

Commit f7e293c

Browse files
ci: Fix flaky release build of iOS Swift (#6705)
The build in CI sometimes fails with not being able to resolve Sentry.xcframework.zip, which can be solved by removing the SPM prebuilt targets.
1 parent 83265fc commit f7e293c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ jobs:
5454
runs-on: macos-15
5555
steps:
5656
- uses: actions/checkout@v5
57+
58+
# As the DistributionSample project uses local SPM, xcodebuild resolves SPM dependencies for all
59+
# sample projects. The Package.swift references binary targets, which in release branch commits points
60+
# to non-existent download URLs. This creates chicken-egg failures when building these sample apps for
61+
# a release commit build. When building these sample apps for a release commit, xcodebuild tries to
62+
# resolve all SPM dependencies, including the binary targets pointing to these non-existent URLs. The
63+
# sample projects don't use SPM for including Sentry. Only the DistributionSample uses local SPM.
64+
# Therefore, we only keep the local DistributionSample reference in the Package.swift as a workaround.
65+
- name: Only keep distribution lib and target in Package.swift
66+
run: ./scripts/prepare-package.sh --only-keep-distribution true
67+
5768
- run: ./scripts/ci-select-xcode.sh 16.4
5869
- uses: ruby/setup-ruby@v1
5970
with:

0 commit comments

Comments
 (0)