steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Install lcov tools
run: sudo apt-get install lcov -y
- - name: Install rustup
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- - name: Set default toolchain
- run: rustup default nightly
- - name: Set profile
- run: rustup set profile minimal
- - name: Add llvm tools
- run: rustup component add llvm-tools-preview
- - name: Update toolchain
- run: rustup update
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: nightly
+ override: true
+ components: llvm-tools-preview
+ profile: minimal
- name: Cache cargo
uses: actions/cache@v3
with:
# For more info, see:
# - https://github.com/bitcoindevkit/bdk/issues/696
# - https://github.com/bitcoindevkit/bdk/pull/748#issuecomment-1242721040
- run: cargo test --features all-keys,compact_filters,compiler,key-value-db,sqlite,sqlite-bundled,test-electrum,test-rpc,verify
+ run: cargo test --features all-keys,compact_filters,compiler,key-value-db,sqlite,sqlite-bundled,test-electrum,test-rpc,verify -- --test-threads=1
- name: Run grcov
run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info
- name: Generate HTML coverage report
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage-report.html
- sqlite-bundled
steps:
- name: checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
- name: cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- - name: Set default toolchain
- run: rustup default ${{ matrix.rust.version }}
- - name: Set profile
- run: rustup set profile minimal
- - name: Add clippy
- if: ${{ matrix.rust.clippy }}
- run: rustup component add clippy
- - name: Update toolchain
- run: rustup update
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust.version }}
+ override: true
+ components: clippy
+ profile: minimal
- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.63.0'
run: |
- cargo update -p regex --precise "1.7.3"
+ cargo update -p tokio --precise "1.38.1"
+ cargo update -p tokio-util --precise "0.7.11"
cargo update -p home --precise "0.5.5"
+ cargo update -p regex --precise "1.7.3"
+ cargo update -p security-framework-sys --precise "2.11.1"
- name: Build
run: cargo build --features bitcoin/std,miniscript/std,${{ matrix.features }} --no-default-features
- name: Clippy
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-md-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- - name: Set default toolchain
- run: rustup default nightly
- - name: Set profile
- run: rustup set profile minimal
- - name: Update toolchain
- run: rustup update
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: nightly
+ override: true
+ components: clippy
+ profile: minimal
- name: Test
run: cargo test --features bitcoin/std,miniscript/std,test-md-docs --no-default-features -- doctest::ReadmeDoctests
runs-on: ubuntu-20.04
strategy:
fail-fast: false
+ max-parallel: 1
matrix:
blockchain:
- name: electrum
features: test-esplora,use-esplora-blocking,verify,bitcoin/std,miniscript/std
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- - name: Setup rust toolchain
+ - name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
+ profile: minimal
- name: Test
- run: cargo test --no-default-features --features bitcoin/std,miniscript/std,${{ matrix.blockchain.features }} ${{ matrix.blockchain.testprefix }}::bdk_blockchain_tests
+ run: cargo test --no-default-features --features bitcoin/std,miniscript/std,${{ matrix.blockchain.features }} ${{ matrix.blockchain.testprefix }}::bdk_blockchain_tests -- --test-threads=1
check-wasm:
name: Check WASM
CFLAGS: -I/usr/include
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: |
~/.cargo/registry
- run: sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" || exit 1
- run: sudo apt-get update || exit 1
- run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1
- - name: Set default toolchain
- run: rustup default stable
- - name: Set profile
- run: rustup set profile minimal
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ profile: minimal
- name: Add target wasm32
run: rustup target add wasm32-unknown-unknown
- - name: Update toolchain
- run: rustup update
- name: Check
run: cargo check --target wasm32-unknown-unknown --features bitcoin/no-std,miniscript/no-std,async-interface,use-esplora-async,dev-getrandom-wasm --no-default-features
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2
- - name: Set default toolchain
- run: rustup default nightly
- - name: Set profile
- run: rustup set profile minimal
- - name: Add rustfmt
- run: rustup component add rustfmt
- - name: Update toolchain
- run: rustup update
+ uses: actions/checkout@v4
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ override: true
+ components: rustfmt
+ profile: minimal
- name: Check fmt
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
python-version: '3.9'
- name: Install python dependencies
run: pip install hwi==2.1.1 protobuf==3.20.1
- - name: Set default toolchain
- run: rustup default ${{ matrix.rust.version }}
- - name: Set profile
- run: rustup set profile minimal
- - name: Update toolchain
- run: rustup update
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: ${{ matrix.rust.version }}
+ override: true
+ profile: minimal
- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.63.0'
run: |
- cargo update -p regex --precise "1.7.3"
+ cargo update -p tokio --precise "1.38.1"
+ cargo update -p tokio-util --precise "0.7.11"
cargo update -p home --precise "0.5.5"
+ cargo update -p regex --precise "1.7.3"
+ cargo update -p security-framework-sys --precise "2.11.1"
- name: Test
run: cargo test --features test-hardware-signer
runs-on: ubuntu-latest
steps:
- name: Checkout sources
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- name: Setup cache
- uses: actions/cache@v2
+ uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: nightly-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- - name: Set default toolchain
- run: rustup default nightly-2022-12-14
- - name: Set profile
- run: rustup set profile minimal
- - name: Update toolchain
- run: rustup update
+ - name: Install Rust toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: nightly
+ override: true
+ components: clippy
+ profile: minimal
- name: Build docs
run: cargo rustdoc --verbose --features=compiler,electrum,esplora,use-esplora-blocking,compact_filters,rpc,key-value-db,sqlite,all-keys,verify,hardware-signer -- --cfg docsrs -Dwarnings
- name: Upload artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: built-docs
path: ./target/doc/*
runs-on: ubuntu-latest
steps:
- name: Checkout `bitcoindevkit.org`
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DOCS_PUSH_SSH_KEY }}
repository: bitcoindevkit/bitcoindevkit.org