From a12b1f8d7a26cde05b8bb299a273d0747ec8498b Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Mon, 21 Nov 2022 13:06:35 -0600 Subject: [PATCH] Remove unneeded .github and .gitmodules directories --- bdk-swift/.github/workflows/publish-spm.yaml | 113 ------------------- bdk-swift/.gitmodules | 3 - 2 files changed, 116 deletions(-) delete mode 100644 bdk-swift/.github/workflows/publish-spm.yaml delete mode 100644 bdk-swift/.gitmodules diff --git a/bdk-swift/.github/workflows/publish-spm.yaml b/bdk-swift/.github/workflows/publish-spm.yaml deleted file mode 100644 index ffddeb9..0000000 --- a/bdk-swift/.github/workflows/publish-spm.yaml +++ /dev/null @@ -1,113 +0,0 @@ -name: Build, tag and create release -on: - workflow_dispatch: - inputs: - version: - description: 'New release version, eg. 0.MINOR.PATCH' - required: true - type: string - -jobs: - build-publish: - name: Build, tag and create release - runs-on: macos-12 - steps: - - name: Checkout release branch - uses: actions/checkout@v2 - with: - submodules: true - - - name: Cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - ./bdk-ffi/target - key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} - - - name: Install Rust targets - run: | - rustup install nightly-x86_64-apple-darwin - rustup component add rust-src --toolchain nightly-x86_64-apple-darwin - rustup target add aarch64-apple-ios x86_64-apple-ios - rustup target add aarch64-apple-ios-sim --toolchain nightly - rustup target add aarch64-apple-darwin x86_64-apple-darwin - - - name: Run bdk-ffi-bindgen - working-directory: bdk-ffi - run: | - cargo run --package bdk-ffi-bindgen -- --language swift --out-dir ../Sources/BitcoinDevKit - - - name: Build bdk-ffi for x86_64-apple-darwin - working-directory: bdk-ffi - run: | - cargo build --profile release-smaller --target x86_64-apple-darwin - - - name: Build bdk-ffi for aarch64-apple-darwin - working-directory: bdk-ffi - run: | - cargo build --profile release-smaller --target aarch64-apple-darwin - - - name: Build bdk-ffi for x86_64-apple-ios - working-directory: bdk-ffi - run: | - cargo build --profile release-smaller --target x86_64-apple-ios - - - name: Build bdk-ffi for aarch64-apple-ios - working-directory: bdk-ffi - run: | - cargo build --profile release-smaller --target aarch64-apple-ios - - - name: Build bdk-ffi for aarch64-apple-ios-sim - working-directory: bdk-ffi - run: | - cargo +nightly build --release -Z build-std --target aarch64-apple-ios-sim - - - name: Create lipo-ios-sim and lipo-macos - working-directory: bdk-ffi - run: | - mkdir -p target/lipo-ios-sim/release-smaller - lipo target/aarch64-apple-ios-sim/release/libbdkffi.a target/x86_64-apple-ios/release-smaller/libbdkffi.a -create -output target/lipo-ios-sim/release-smaller/libbdkffi.a - mkdir -p target/lipo-macos/release-smaller - 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 - - - name: Create bdkFFI.xcframework - run: | - mv Sources/BitcoinDevKit/bdk.swift Sources/BitcoinDevKit/BitcoinDevKit.swift - cp Sources/BitcoinDevKit/bdkFFI.h bdkFFI.xcframework/ios-arm64/bdkFFI.framework/Headers - cp Sources/BitcoinDevKit/bdkFFI.h bdkFFI.xcframework/ios-arm64_x86_64-simulator/bdkFFI.framework/Headers - cp Sources/BitcoinDevKit/bdkFFI.h bdkFFI.xcframework/macos-arm64_x86_64/bdkFFI.framework/Headers - cp bdk-ffi/target/aarch64-apple-ios/release-smaller/libbdkffi.a bdkFFI.xcframework/ios-arm64/bdkFFI.framework/bdkFFI - cp bdk-ffi/target/lipo-ios-sim/release-smaller/libbdkffi.a bdkFFI.xcframework/ios-arm64_x86_64-simulator/bdkFFI.framework/bdkFFI - cp bdk-ffi/target/lipo-macos/release-smaller/libbdkffi.a bdkFFI.xcframework/macos-arm64_x86_64/bdkFFI.framework/bdkFFI - rm Sources/BitcoinDevKit/bdkFFI.h - rm Sources/BitcoinDevkit/bdkFFI.modulemap - rm bdkFFI.xcframework.zip || true - zip -9 -r bdkFFI.xcframework.zip bdkFFI.xcframework - echo "BDKFFICHECKSUM=`swift package compute-checksum bdkFFI.xcframework.zip`" >> $GITHUB_ENV - echo "BDKFFIURL=https\:\/\/github\.com\/${{ github.repository_owner }}\/bdk\-swift\/releases\/download\/${{ inputs.version }}\/bdkFFI\.xcframework\.zip" >> $GITHUB_ENV - - - name: Update, commit, and push new Package.swift - run: | - echo checksum = ${{ env.BDKFFICHECKSUM }} - echo url = ${{ env.BDKFFIURL }} - sed "s/BDKFFICHECKSUM/${BDKFFICHECKSUM}/;s/BDKFFIURL/${BDKFFIURL}/" Package.swift.txt > Package.swift - git add Sources/BitcoinDevKit/BitcoinDevKit.swift - git add Package.swift - git commit -m "Update BitcoinDevKit.swift and Package.swift for release ${{ inputs.version }}" - git push - - - name: Tag new release - run: | - git tag ${{ inputs.version }} -m "Release ${{ inputs.version }}" - git push --tags - - - name: Publish release - uses: ncipollo/release-action@v1 - with: - artifacts: "bdkFFI.xcframework.zip" - tag: ${{ inputs.version }} - token: ${{ secrets.GITHUB_TOKEN }} - name: Release ${{ inputs.version }} - prerelease: true diff --git a/bdk-swift/.gitmodules b/bdk-swift/.gitmodules deleted file mode 100644 index 96bdc69..0000000 --- a/bdk-swift/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "bdk-ffi"] - path = bdk-ffi - url = https://github.com/bitcoindevkit/bdk-ffi.git