Skip to content

Migrate Network type to proc macros (and remove the last of the UDL)! #1904

Migrate Network type to proc macros (and remove the last of the UDL)!

Migrate Network type to proc macros (and remove the last of the UDL)! #1904

name: Rust layer CI
on:
push:
paths:
- "bdk-ffi/**"
pull_request:
paths:
- "bdk-ffi/**"
permissions: {}
jobs:
build-test:
name: "Build and test"
runs-on: ubuntu-24.04
defaults:
run:
working-directory: bdk-ffi
strategy:
matrix:
rust:
- version: 1.84.1
clippy: true
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Generate cache key"
env:
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
MATRIX_FEATURES: ${{ matrix.features }}
run: echo "$MATRIX_RUST_VERSION $MATRIX_FEATURES" | tee .cache_key
- name: "Cache"
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: "Set default toolchain"
env:
MATRIX_RUST_VERSION: ${{ matrix.rust.version }}
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: "Build"
run: cargo build
- name: "Clippy"
if: ${{ matrix.rust.clippy }}
run: cargo clippy --all-targets --features "uniffi/bindgen-tests"
- name: "Test"
run: CLASSPATH=./tests/jna/jna-5.14.0.jar cargo test --features uniffi/bindgen-tests
fmt:
name: "Rust fmt"
runs-on: ubuntu-24.04
defaults:
run:
working-directory: bdk-ffi
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
persist-credentials: false
- 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
- name: "Check fmt"
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check