@@ -132,7 +132,8 @@ workflows:
132
132
-scheme "$SCHEME" \
133
133
-configuration "$CONFIGURATION" \
134
134
-destination "generic/platform=$PLATFORM" \
135
- -archivePath "$ARCHIVE_DIR/P256K-$PLATFORM.xcarchive" | xcbeautify
135
+ -archivePath "$ARCHIVE_DIR/P256K-$PLATFORM.xcarchive" \
136
+ ENABLE_TESTABILITY=YES | xcbeautify
136
137
137
138
# Check if archive command was successful
138
139
if [ $? -eq 0 ]; then
@@ -162,6 +163,32 @@ workflows:
162
163
inputs :
163
164
- deploy_path : " $BITRISE_SOURCE_DIR/P256K.xcframework"
164
165
- is_compress : true
166
+ - script :
167
+ title : TEST XCFRAMEWORK
168
+ timeout : 360
169
+ inputs :
170
+ - content : |-
171
+ #!/usr/bin/env bash
172
+ # fail if any commands fails; debug log
173
+ set -ex
174
+
175
+ # Comment out the existing target for "P256K" in the Package.swift file.
176
+ sed -i '' '/\.target(name: "P256K", dependencies: \["libsecp256k1"\]),/s/^/\/\//g' Package.swift
177
+
178
+ # Add the new target for "P256K" in the Package.swift file.
179
+ sed -i '' '/\.target(name: "P256K", dependencies: \["libsecp256k1"\]),/a\
180
+ .binaryTarget(\
181
+ name: "P256K",\
182
+ path: "./P256K.xcframework"\
183
+ ),\
184
+ ' Package.swift
185
+
186
+ # Update the dependency for the ZKPTests target to use the P256K binary target.
187
+ sed -i '' 's/\.testTarget(name: "ZKPTests", dependencies: \["ZKP"\])/\.testTarget(name: "ZKPTests", dependencies: \["P256K"\])/' Package.swift
188
+
189
+ # Run swift tests after modifying the Package.swift, allowing verification
190
+ # of the setup with the newly integrated XCFramework.
191
+ swift test
165
192
PULL-PACKAGE-FILES :
166
193
steps :
167
194
- pull-intermediate-files :
0 commit comments