feat: upgrade bdk to 1.0.0-alpha.2
This is a big change that updates some of our build infrastructure as well as upgrading the bdk dependency. It adds the simple new_no_persist constructor on the wallet as well as the blocking esplora client.
This commit is contained in:
14
.github/workflows/audit.yml
vendored
14
.github/workflows/audit.yml
vendored
@@ -12,8 +12,14 @@ jobs:
|
||||
security_audit:
|
||||
name: Security audit
|
||||
runs-on: ubuntu-20.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: bdk-ffi
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/audit-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: "Check out PR branch"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Run audit"
|
||||
run: |
|
||||
cargo install cargo-audit
|
||||
cargo-audit audit
|
||||
|
||||
51
.github/workflows/cont_integration.yml
vendored
51
.github/workflows/cont_integration.yml
vendored
@@ -9,22 +9,26 @@ on:
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
name: Build and test
|
||||
name: "Build and test"
|
||||
runs-on: ubuntu-20.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: bdk-ffi
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- version: 1.71.0 # STABLE
|
||||
- version: 1.67.0
|
||||
clippy: true
|
||||
- version: 1.61.0 # MSRV
|
||||
# TODO 1: Should we keep this? We'll need to pin dependencies
|
||||
# - version: 1.61.0 # MSRV
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Generate cache key
|
||||
- name: "Generate cache key"
|
||||
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
|
||||
|
||||
- name: Cache
|
||||
- name: "Cache"
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
@@ -33,53 +37,56 @@ jobs:
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
|
||||
|
||||
- name: Set default toolchain
|
||||
- name: "Set default toolchain"
|
||||
run: rustup default ${{ matrix.rust.version }}
|
||||
|
||||
- name: Set profile
|
||||
- name: "Set profile"
|
||||
run: rustup set profile minimal
|
||||
|
||||
- name: Add clippy
|
||||
- name: "Add clippy"
|
||||
if: ${{ matrix.rust.clippy }}
|
||||
run: rustup component add clippy
|
||||
|
||||
- name: Update toolchain
|
||||
- name: "Update toolchain"
|
||||
run: rustup update
|
||||
|
||||
- name: Pin dependencies for MSRV
|
||||
- name: "Pin dependencies for MSRV"
|
||||
if: matrix.rust.version == '1.61.0'
|
||||
run: |
|
||||
cargo update -p hashlink --precise "0.8.1"
|
||||
cargo update -p tokio --precise "1.29.1"
|
||||
cargo update -p flate2 --precise "1.0.26"
|
||||
- name: Build
|
||||
- name: "Build"
|
||||
run: cargo build
|
||||
|
||||
- name: Clippy
|
||||
- name: "Clippy"
|
||||
if: ${{ matrix.rust.clippy }}
|
||||
run: cargo clippy --all-targets --features "uniffi/bindgen-tests" -- -D warnings
|
||||
|
||||
- name: Test
|
||||
- name: "Test"
|
||||
run: CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test --features uniffi/bindgen-tests
|
||||
|
||||
fmt:
|
||||
name: Rust fmt
|
||||
runs-on: ubuntu-latest
|
||||
name: "Rust fmt"
|
||||
runs-on: ubuntu-20.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: bdk-ffi
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set default toolchain
|
||||
- name: "Set default toolchain"
|
||||
run: rustup default nightly
|
||||
|
||||
- name: Set profile
|
||||
- name: "Set profile"
|
||||
run: rustup set profile minimal
|
||||
|
||||
- name: Add rustfmt
|
||||
- name: "Add rustfmt"
|
||||
run: rustup component add rustfmt
|
||||
|
||||
- name: Update toolchain
|
||||
- name: "Update toolchain"
|
||||
run: rustup update
|
||||
|
||||
- name: Check fmt
|
||||
- name: "Check fmt"
|
||||
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
|
||||
|
||||
1
.github/workflows/publish-python.yaml
vendored
1
.github/workflows/publish-python.yaml
vendored
@@ -29,6 +29,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
# TODO 2: Other CI workflows use explicit Rust compiler versions, I think we should do the same here
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
39
.github/workflows/test-swift.yaml
vendored
39
.github/workflows/test-swift.yaml
vendored
@@ -12,44 +12,15 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Build and test"
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Set default Rust version to 1.67.0"
|
||||
run: rustup default 1.67.0
|
||||
- name: "Build Swift package"
|
||||
run: bash ./bdk-swift/build-local-swift.sh
|
||||
|
||||
- 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-darwin x86_64-apple-darwin
|
||||
|
||||
- name: Run bdk-ffi-bindgen
|
||||
working-directory: bdk-ffi
|
||||
run: cargo run --bin uniffi-bindgen generate src/bdk.udl --language swift --out-dir ../bdk-swift/Sources/BitcoinDevKit --no-format
|
||||
|
||||
- name: Build bdk-ffi for x86_64-apple-darwin
|
||||
run: cargo build --package bdk-ffi --profile release-smaller --target x86_64-apple-darwin
|
||||
|
||||
- name: Build bdk-ffi for aarch64-apple-darwin
|
||||
run: cargo build --package bdk-ffi --profile release-smaller --target aarch64-apple-darwin
|
||||
|
||||
- name: Create lipo-macos
|
||||
run: |
|
||||
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
|
||||
working-directory: bdk-swift
|
||||
run: |
|
||||
mv Sources/BitcoinDevKit/bdk.swift Sources/BitcoinDevKit/BitcoinDevKit.swift
|
||||
cp Sources/BitcoinDevKit/bdkFFI.h bdkFFI.xcframework/macos-arm64_x86_64/bdkFFI.framework/Headers
|
||||
cp ../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
|
||||
|
||||
- name: Run Swift tests
|
||||
- name: "Run Swift tests"
|
||||
working-directory: bdk-swift
|
||||
run: swift test
|
||||
|
||||
Reference in New Issue
Block a user