Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ of the PR were done in a specific way -->
#### All Submissions:

* [ ] I've signed all my commits
* [ ] I ran `just pre-push` before committing
* [ ] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [ ] I ran `cargo fmt` and `cargo clippy` before committing

#### New Features:

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ on:
schedule:
- cron: '0 0 * * 0' # At 00:00 on Sunday
workflow_dispatch:

permissions: {}
env:
CARGO_TERM_COLOR: always

permissions: {}

jobs:
cargo-audit:
name: RustSec Audit (vulnerabilities)
Expand All @@ -42,7 +40,7 @@ jobs:
- name: Install cargo-audit
run: cargo install cargo-audit --locked

- name: Run cargo audit
- name: Run cargo audit
run: cargo audit --deny warnings

- name: Upload SARIF to GitHub Security tab
Expand Down
103 changes: 30 additions & 73 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
@@ -1,100 +1,57 @@
on: [push, pull_request]

name: CI

on: [push, pull_request]
permissions: {}

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
fmt:
name: Rust fmt
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: stable
components: rustfmt
cache: true

- name: Check fmt
run: cargo fmt --all -- --check
- name: Install just
uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3

# Clippy lints
clippy:
name: Clippy (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
matrix:
features:
- --no-default-features
- --all-features
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: stable
components: clippy
cache: true
- name: Setup build cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1

- name: Run Clippy
run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings
- name: Setup cargo-rbmt
uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970

- name: Check check
run: just check

# Build and test
test:
name: Test (stable, ${{ matrix.features }})
name: Test - ${{ matrix.toolchain }} toolchain, ${{ matrix.lockfile }} deps
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features:
- --no-default-features
- --all-features
toolchain: [stable, msrv]
lockfile: [minimal, recent]
exclude:
# Exclude MSRV toolchain + `Cargo-recent.lock`
- toolchain: msrv
lockfile: recent

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: stable
cache: true

- name: Build
run: cargo build ${{ matrix.features }} --verbose

- name: Run unit tests
run: cargo test ${{ matrix.features }} --lib --verbose

- name: Run doc tests
run: cargo test ${{ matrix.features }} --doc --verbose

- name: Run RPC client tests
run: cargo test --test test_rpc_client --verbose -- --test-threads=2
- name: Setup build cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1

# MSRV
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: 1.75.0
cache: true
- name: Setup cargo-rbmt
uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970

- name: Check MSRV
run: cargo check --all-features
- name: Run tests
run: cargo rbmt test --toolchain ${{ matrix.toolchain }} --lock-file ${{ matrix.lockfile }}
22 changes: 22 additions & 0 deletions .github/workflows/sigs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Signed Commits
on: [push, pull_request]
permissions: {}
env:
CARGO_TERM_COLOR: always

jobs:
Signatures:
name: Assert all commits are signed
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0

- name: Setup just
uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3

- name: Check commit signatures
run: just check-sigs
Comment on lines +18 to +22
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would rather avoid the setup-just dependency for github workflows and just execute a bash script here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to centralize all config in the justfile, and adding a bash script goes against this idea. Let me know what you think. The just CI dep is acceptable IMO.

9 changes: 5 additions & 4 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GitHub Actions Security Analysis with zizmor
name: Zizmor GitHub Action Static Analysis

on:
pull_request:
Expand All @@ -8,8 +8,9 @@ on:
schedule:
- cron: '0 0 * * 0' # At 00:00 on Sunday
workflow_dispatch:

permissions: {}
env:
CARGO_TERM_COLOR: always

jobs:
zizmor:
Expand All @@ -22,9 +23,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run zizmor
uses: zizmorcore/zizmor-action@135698455da5c3b3e55f73f4419e481ab68cdd95
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
25 changes: 2 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
# Generated by Cargo
# will have compiled files and executables
debug
target

# These are backup files generated by rustfmt
Cargo.lock
/target
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Generated by cargo mutants
# Contains mutation testing data
**/mutants.out*/

# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/


# Added by cargo

/target
Loading
Loading