Skip to content

Commit 1cf614d

Browse files
committed
Explicitly test XCFramework dependency in CI
1 parent 94aff6c commit 1cf614d

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.buildkite/pipeline.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ steps:
2626
- label: ':swift: Test Swift Package with XCFramework'
2727
depends_on: publish-xcframework
2828
command: |
29+
echo "--- :arrow_down: Downloading checksum..."
2930
buildkite-agent artifact download build/*.checksum.txt .
31+
echo "--- :swift: Updating Package.swift..."
3032
make update-xcframework-reference
31-
make test-swift-package-no-build
33+
echo "--- :microscope: Testing with XCFramework dependency"
34+
make test-swift-package-with-xcframework
3235
plugins: *plugins

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ build-swift-package: build
107107
test-swift-package: build
108108
$(call XCODEBUILD_CMD, test)
109109

110-
test-swift-package-no-build:
110+
# Notice no build dependency because all assets come from XCFramework
111+
test-swift-package-with-xcframework: export GUTENBERGKIT_SWIFT_USE_LOCAL_RESOURCES = 0
112+
test-swift-package-with-xcframework:
111113
$(call XCODEBUILD_CMD, test)
112114

113115
release:

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PackageDescription
55
import Foundation
66

77
// Set GUTENBERGKIT_SWIFT_USE_LOCAL_RESOURCES=1 to build resources from source instead of using the pre-built XCFramework
8-
let useLocalResources = ProcessInfo.processInfo.environment["GUTENBERGKIT_SWIFT_USE_LOCAL_RESOURCES"] != nil
8+
let useLocalResources = ProcessInfo.processInfo.environment["GUTENBERGKIT_SWIFT_USE_LOCAL_RESOURCES"] == "1"
99

1010
// TODO: This has been manually uploaded, we'll need automation to both upload and update the URL and checksum
1111
let revision = "89502dd215ef37df93592c06342137aed4df51f8"

0 commit comments

Comments
 (0)