fix(bitcoind_rpc): fix filter iter may not handle reorgs properly #7101
Workflow file for this run
This file contains 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 | |
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: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- version: ${{ needs.prepare.outputs.rust_version }} | |
clippy: true | |
- version: 1.63.0 # Overall MSRV | |
- version: 1.75.0 # Specific MSRV for `bdk_electrum` | |
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 1.75 | |
if: matrix.rust.version == '1.75.0' | |
run: | | |
cargo update -p home --precise "0.5.9" | |
cargo update -p native-tls --precise "0.2.13" | |
cargo update -p idna_adapter --precise "1.1.0" | |
cargo update -p base64ct --precise "1.6.0" | |
cargo update -p minreq --precise "2.13.2" | |
- 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: | | |
if [ $MATRIX_RUST_VERSION = '1.63.0' ]; then | |
cargo build --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }} | |
cargo test --workspace --exclude 'example_*' --exclude 'bdk_electrum' ${{ matrix.features }} | |
else | |
cargo build --workspace --exclude 'example_*' ${{ matrix.features }} | |
cargo test --workspace --exclude 'example_*' ${{ matrix.features }} | |
fi | |
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_chain | |
working-directory: ./crates/chain | |
# TODO "--target thumbv6m-none-eabi" should work but currently does not | |
run: cargo check --no-default-features --features miniscript/no-std,hashbrown | |
- name: Check esplora | |
working-directory: ./crates/esplora | |
# TODO "--target thumbv6m-none-eabi" should work but currently does not | |
run: cargo check --no-default-features --features 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 esplora | |
working-directory: ./crates/esplora | |
run: cargo check --target wasm32-unknown-unknown --no-default-features --features bdk_core/hashbrown,async | |
fmt: | |
needs: prepare | |
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: ${{ needs.prepare.outputs.rust_version }} | |
override: true | |
profile: minimal | |
components: rustfmt | |
- name: Check fmt | |
run: cargo fmt --all -- --config format_code_in_doc_comments=true --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_cli | |
- example_bitcoind_rpc_polling | |
- example_electrum | |
- example_esplora | |
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 |