Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
Codecov:
name: Code Coverage
runs-on: ubuntu-latest
timeout-minutes: 20
env:
RUSTFLAGS: "-Cinstrument-coverage"
RUSTDOCFLAGS: "-Cinstrument-coverage"
Expand All @@ -17,7 +18,8 @@ jobs:
with:
persist-credentials: false
- name: Install lcov tools
run: sudo apt-get install lcov -y
timeout-minutes: 5
run: sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install lcov -y
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -30,7 +32,7 @@ jobs:
- name: Install grcov
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
- name: Test
run: cargo test --all-features
run: cargo test --locked --all-features
- name: Make coverage directory
run: mkdir coverage
- name: Run grcov
Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
needs: prepare
name: Build & Test
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
rust:
- version: ${{ needs.prepare.outputs.rust_version }}
Expand All @@ -43,20 +45,18 @@ jobs:
profile: minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.7
- 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 }}
cargo build --locked --workspace --exclude 'example_*' ${{ matrix.features }}
cargo test --locked --workspace --exclude 'example_*' ${{ matrix.features }}

check-no-std:
needs: prepare
name: Check no_std
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -74,12 +74,13 @@ jobs:
- 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
run: cargo check --locked --no-default-features --features miniscript/no-std,bdk_chain/hashbrown

check-wasm:
needs: prepare
name: Check WASM
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
CC: clang-14
CFLAGS: -I/usr/include
Expand All @@ -88,10 +89,11 @@ jobs:
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 WASM C toolchain
timeout-minutes: 5
run: |
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 update
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 install -y libclang-common-14-dev clang-14 libc6-dev-i386
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -103,7 +105,7 @@ jobs:
uses: Swatinem/rust-cache@v2.7.7
- name: Check bdk wallet
working-directory: ./wallet
run: cargo check --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
run: cargo check --locked --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown

fmt:
needs: prepare
Expand All @@ -128,6 +130,7 @@ jobs:
needs: prepare
name: Rust clippy
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
checks: write
steps:
Expand All @@ -145,13 +148,15 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Clippy Results
args: --all-features --all-targets -- -D warnings
args: --locked --all-features --all-targets -- -D warnings

build-examples:
needs: prepare
name: Build & Test Examples
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
example-dir:
- example_wallet_electrum
Expand All @@ -173,4 +178,4 @@ jobs:
uses: Swatinem/rust-cache@v2.7.7
- name: Build
working-directory: examples/${{ matrix.example-dir }}
run: cargo build
run: cargo build --locked
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/target
Cargo.lock
/.vscode

*.swp
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ hesitate to split it into multiple small, focused PRs.

The Minimum Supported Rust Version is **1.63.0** (enforced by our CI).

CI uses the committed `Cargo.lock` with `--locked`, including the Rust 1.63 jobs.
To refresh dependencies, run `./ci/pin-msrv.sh` with Cargo 1.84 or newer and commit
the generated lockfile. Keep the MSRV checks enabled when changing these pins.
The Foundation BDK crates in the wallet and examples must use the same revision
so their update and checkpoint types, including serialization, remain compatible.

Commits should cover both the issue fixed and the solution's rationale.
These [guidelines](https://chris.beams.io/posts/git-commit/) should be kept in mind. Commit messages follow the ["Conventional Commits 1.0.0"](https://www.conventionalcommits.org/en/v1.0.0/) to make commit histories easier to read by humans and automated tools. All commits must be [GPG signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).

Expand Down
Loading
Loading