feature: update bdk-cli
to use bdk_wallet
v1
#703
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: | |
build-test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable # STABLE | |
- 1.75.0 # MSRV | |
features: | |
- default | |
- electrum,sqlite | |
- electrum | |
- esplora,sqlite | |
- esplora | |
- compiler,sqlite | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Generate cache key | |
run: echo "${{ matrix.rust }} ${{ matrix.features }}" | tee .cache_key | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
- name: Setup Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
- name: Build | |
run: cargo build --no-default-features --features repl,${{ matrix.features }} --locked | |
- name: Clippy | |
run: cargo clippy -- -D warnings | |
- name: Test | |
run: cargo test --no-default-features --features repl,${{ matrix.features }} | |
wasm-build: | |
name: Build WASM | |
runs-on: ubuntu-latest | |
env: | |
CC: clang-10 | |
CFLAGS: -I/usr/include | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Generate cache key | |
run: echo "Build WASM" | tee .cache_key | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} | |
# 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-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: Add target wasm32 | |
run: rustup target add wasm32-unknown-unknown | |
- name: Update toolchain | |
run: rustup update | |
- name: Build | |
run: cargo build --target wasm32-unknown-unknown --no-default-features --features esplora-reqwest,async-interface,compiler,dev-getrandom-wasm | |
fmt: | |
name: Rust fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
- name: Check fmt | |
run: cargo fmt --all -- --check |