@@ -28,51 +28,12 @@ jobs:
2828 with :
2929 path : dist
3030
31- - name : " Install Rust targets"
32- working-directory : build/bdk-ffi
33- run : |
34- rustup default 1.77.1
35- rustup component add rust-src
36- rustup target add aarch64-apple-ios # iOS ARM64
37- rustup target add x86_64-apple-ios # iOS x86_64
38- rustup target add aarch64-apple-ios-sim # simulator mac M1
39- rustup target add aarch64-apple-darwin # mac M1
40- rustup target add x86_64-apple-darwin # mac x86_64
41-
42- - name : " Run bdk-ffi-bindgen"
43- working-directory : build/bdk-ffi
44- run : |
45- cargo run --bin uniffi-bindgen generate src/bdk.udl --language swift --out-dir ../bdk-swift/Sources/BitcoinDevKit --no-format
46-
47- - name : " Build bdk-ffi for all targets"
48- working-directory : build/bdk-ffi
49- run : |
50- cargo build --profile release-smaller --target x86_64-apple-darwin
51- cargo build --profile release-smaller --target aarch64-apple-darwin
52- cargo build --profile release-smaller --target x86_64-apple-ios
53- cargo build --profile release-smaller --target aarch64-apple-ios
54- cargo build --profile release-smaller --target aarch64-apple-ios-sim
55-
56- - name : " Create lipo-ios-sim and lipo-macos"
57- working-directory : build/bdk-ffi
58- run : |
59- mkdir -p target/lipo-ios-sim/release-smaller
60- lipo target/aarch64-apple-ios-sim/release-smaller/libbdkffi.a target/x86_64-apple-ios/release-smaller/libbdkffi.a -create -output target/lipo-ios-sim/release-smaller/libbdkffi.a
61- mkdir -p target/lipo-macos/release-smaller
62- lipo target/aarch64-apple-darwin/release-smaller/libbdkffi.a target/x86_64-apple-darwin/release-smaller/libbdkffi.a -create -output target/lipo-macos/release-smaller/libbdkffi.a
63-
6431 - name : " Create bdkFFI.xcframework"
6532 working-directory : build/bdk-swift
6633 run : |
67- mv Sources/BitcoinDevKit/bdk.swift Sources/BitcoinDevKit/BitcoinDevKit.swift
68- cp Sources/BitcoinDevKit/bdkFFI.h bdkFFI.xcframework/ios-arm64/bdkFFI.framework/Headers
69- cp Sources/BitcoinDevKit/bdkFFI.h bdkFFI.xcframework/ios-arm64_x86_64-simulator/bdkFFI.framework/Headers
70- cp Sources/BitcoinDevKit/bdkFFI.h bdkFFI.xcframework/macos-arm64_x86_64/bdkFFI.framework/Headers
71- cp ../bdk-ffi/target/aarch64-apple-ios/release-smaller/libbdkffi.a bdkFFI.xcframework/ios-arm64/bdkFFI.framework/bdkFFI
72- cp ../bdk-ffi/target/lipo-ios-sim/release-smaller/libbdkffi.a bdkFFI.xcframework/ios-arm64_x86_64-simulator/bdkFFI.framework/bdkFFI
73- cp ../bdk-ffi/target/lipo-macos/release-smaller/libbdkffi.a bdkFFI.xcframework/macos-arm64_x86_64/bdkFFI.framework/bdkFFI
74- rm Sources/BitcoinDevKit/bdkFFI.h
75- rm Sources/BitcoinDevkit/bdkFFI.modulemap
34+ # run the local script
35+ ./build-xcframework.sh
36+ # remove old xcframework zip
7637 rm bdkFFI.xcframework.zip || true
7738 zip -9 -r bdkFFI.xcframework.zip bdkFFI.xcframework
7839 echo "BDKFFICHECKSUM=`swift package compute-checksum bdkFFI.xcframework.zip`" >> $GITHUB_ENV
0 commit comments