Skip to content

Commit 16fbd68

Browse files
pblazejclaude
andcommitted
ci: link swiftly so SwiftBuild can locate its resource bundles
Replaces the --build-system native workaround with `swiftly link`. When swiftly is left unlinked after `swiftly init --skip-install`, SwiftBuild's resource_bundle_accessor cannot resolve bundles such as SwiftBuild_SWBUniversalPlatform from the toolchain's usr/share/pm directory, crashing the build before any compilation. Linking the active toolchain exposes it via swiftly's managed PATH so SwiftBuild finds its resources, letting us build with the default (swiftbuild) system. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 46b9f8d commit 16fbd68

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/swift-snapshot.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ jobs:
3030
run: brew install swiftly && swiftly init --quiet-shell-followup --skip-install -y
3131

3232
- name: Get Swift snapshot
33-
run: swiftly install -y ${{ env.SWIFT_SNAPSHOT }}
33+
# `swiftly link` ensures SwiftBuild can locate its resource bundles
34+
# (e.g. SwiftBuild_SWBUniversalPlatform) via the toolchain path.
35+
run: |
36+
swiftly install -y ${{ env.SWIFT_SNAPSHOT }}
37+
swiftly link
3438
3539
- name: Build
36-
# --build-system native avoids a SwiftBuild resource-bundle crash
37-
# ("unable to find bundle named SwiftBuild_SWBUniversalPlatform")
38-
# seen in recent main-snapshot toolchains on the CI image.
39-
run: swiftly run swift build +${{ env.SWIFT_SNAPSHOT }} --build-system native
40+
run: swiftly run swift build +${{ env.SWIFT_SNAPSHOT }}

0 commit comments

Comments
 (0)