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