Add apply_block_events and apply_block_connected_to_events
#521
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request] | |
| name: CI | |
| permissions: {} | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| rust_version: ${{ steps.read_toolchain.outputs.rust_version }} | |
| steps: | |
| - name: "Checkout repo" | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: "Read rust version" | |
| id: read_toolchain | |
| run: echo "rust_version=$(cat rust-version)" >> $GITHUB_OUTPUT | |
| build-test: | |
| needs: prepare | |
| name: Build & Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - ubuntu-24.04-arm | |
| rust: | |
| - version: ${{ needs.prepare.outputs.rust_version }} | |
| clippy: true | |
| - version: 1.63.0 # Overall MSRV | |
| features: | |
| - --no-default-features --features miniscript/no-std,bdk_chain/hashbrown | |
| - --all-features | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust.version }} | |
| override: true | |
| profile: minimal | |
| - name: Rust Cache | |
| uses: Swatinem/[email protected] | |
| - name: Pin dependencies for MSRV | |
| if: matrix.rust.version == '1.63.0' | |
| run: ./ci/pin-msrv.sh | |
| - name: Build + Test | |
| env: | |
| MATRIX_RUST_VERSION: ${{ matrix.rust.version }} | |
| run: | | |
| cargo build --workspace --exclude 'example_*' ${{ matrix.features }} | |
| cargo test --workspace --exclude 'example_*' ${{ matrix.features }} | |
| check-no-std: | |
| needs: prepare | |
| name: Check no_std | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.prepare.outputs.rust_version }} | |
| override: true | |
| profile: minimal | |
| # target: "thumbv6m-none-eabi" | |
| - name: Rust Cache | |
| uses: Swatinem/[email protected] | |
| - name: Check bdk wallet | |
| working-directory: ./wallet | |
| # TODO "--target thumbv6m-none-eabi" should work but currently does not | |
| run: cargo check --no-default-features --features miniscript/no-std,bdk_chain/hashbrown | |
| check-wasm: | |
| needs: prepare | |
| name: Check WASM | |
| runs-on: ubuntu-latest | |
| env: | |
| CC: clang-14 | |
| CFLAGS: -I/usr/include | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| # Install a recent version of clang that supports wasm32 | |
| - run: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1 | |
| - run: sudo apt-get update || exit 1 | |
| - run: sudo apt-get install -y libclang-common-14-dev clang-14 libc6-dev-i386 || exit 1 | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.prepare.outputs.rust_version }} | |
| override: true | |
| profile: minimal | |
| target: "wasm32-unknown-unknown" | |
| - name: Rust Cache | |
| uses: Swatinem/[email protected] | |
| - name: Check bdk wallet | |
| working-directory: ./wallet | |
| run: cargo check --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown | |
| fmt: | |
| name: Rust fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: true | |
| profile: minimal | |
| components: rustfmt | |
| - name: Check fmt | |
| run: cargo fmt --all --check | |
| clippy_check: | |
| needs: prepare | |
| name: Rust clippy | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.prepare.outputs.rust_version }} | |
| components: clippy | |
| override: true | |
| - name: Rust Cache | |
| uses: Swatinem/[email protected] | |
| - uses: actions-rs/clippy-check@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| name: Clippy Results | |
| args: --all-features --all-targets -- -D warnings | |
| build-examples: | |
| needs: prepare | |
| name: Build & Test Examples | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| example-dir: | |
| - example_wallet_electrum | |
| - example_wallet_esplora_async | |
| - example_wallet_esplora_blocking | |
| - example_wallet_rpc | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ needs.prepare.outputs.rust_version }} | |
| override: true | |
| profile: minimal | |
| - name: Rust Cache | |
| uses: Swatinem/[email protected] | |
| - name: Build | |
| working-directory: examples/${{ matrix.example-dir }} | |
| run: cargo build |