Skip to content
Merged
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
5 changes: 4 additions & 1 deletion .github/actions/setup-rbmt/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ runs:
steps:
- name: Install cargo-rbmt
shell: bash
run: cargo install cargo-rbmt --version "$(cat rbmt-version)" --locked
run: |
RBMT_VERSION=$(grep -A 1 '^\[package\.metadata\.rbmt\]$' Cargo.toml | grep -E -o '[0-9]+([.][0-9]+)*')
echo "Installing cargo-rbmt@v${RBMT_VERSION} from crates.io"
cargo install cargo-rbmt --version "$RBMT_VERSION" --locked

- name: Install Rust Toolchains
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
permissions: {}
env:
CARGO_TERM_COLOR: always
RBMT_LOG_LEVEL: progress

jobs:
cargo-audit:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ env:
CARGO_TERM_COLOR: always

jobs:
signatures:
name: Signatures
conventional:
name: Conventional Commits
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0

- name: Assert Commits are Signed
run: bash contrib/check-commit-signatures.sh
- name: Check Commit Messages
uses: webiny/action-conventional-commits@7f91b1595ca1951cdb671ddc9f07a49081ec5b69 # v1.4.2
with:
allowed-commit-types: "feat,fix,doc,refactor,test,ci,chore,fuzz,bench"

conventional-commits:
name: Conventional Commits
signatures:
name: Signatures
runs-on: ubuntu-latest

steps:
- name: Checkout Code
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0

- name: Check Commit Messages
uses: webiny/action-conventional-commits@7f91b1595ca1951cdb671ddc9f07a49081ec5b69 # v1.4.2
with:
allowed-commit-types: "feat,fix,doc,refactor,test,ci,chore,fuzz,bench"
- name: Assert Commits are PGP-Signed
run: bash contrib/check-signatures.sh
1 change: 1 addition & 0 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
permissions: {}
env:
CARGO_TERM_COLOR: always
RBMT_LOG_LEVEL: progress
RUST_BACKTRACE: 1

jobs:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RBMT_LOG_LEVEL: verbose
RUST_BACKTRACE: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
integration:
Expand All @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
include:
- name: Regtest Client Example
- name: Regtest Client
example: client_regtest

steps:
Expand All @@ -35,8 +35,11 @@ jobs:
with:
cache-on-failure: false

- name: Run ${{ matrix.example }} example
run: cargo run --release --example ${{ matrix.example }}
- name: Setup cargo-rbmt
uses: ./.github/actions/setup-rbmt

- name: Run ${{ matrix.name }} Example
run: cargo rbmt run -- run --release --example ${{ matrix.example }}
timeout-minutes: 10
env:
BLOCKS: 50
timeout-minutes: 10
6 changes: 4 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
permissions: {}
env:
CARGO_TERM_COLOR: always
RBMT_LOG_LEVEL: progress
RUST_BACKTRACE: 1

jobs:
Expand Down Expand Up @@ -62,12 +63,13 @@ jobs:
fail-fast: false
matrix:
include:
- name: Documentation
task: docs
- name: Formatting
task: fmt --check
- name: Linting
task: lint
- name: Documentation
task: docsrs

steps:
- name: Checkout Repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.rbmt]
toolchains = { stable = "1.96.1", nightly = "nightly-2026-07-01" }
version = "0.5.0"
toolchains = { stable = "1.96.1", nightly = "nightly-2026-07-08" }
tools = { cargo-audit = "=0.22.2", zizmor = "=1.26.1" }
test = { sample_strategy = "all" }
lint = { allowed_duplicates = [
Expand Down
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It also uses `uv` to run Zizmor, for GitHub Action static analysis.

To install them with `cargo`, run:

```shell
```text
~$ cargo install just

~$ cargo install cargo-rbmt
Expand All @@ -42,29 +42,25 @@ Alternatively, use your preferred package manager to install `just` and `uv`.

A `justfile` is provided for convenience. Run `just` to see available commands:

```shell
~$ just
```text
> bdk-floresta
> A Floresta-powered chain-source crate for BDK

Available recipes:
audit # Run `cargo audit` on all lockfiles and prune ignored advisories [alias: a]
build # Build `bdk-floresta` and examples [alias: b]
check # Check code formatting, compilation, linting [alias: c]
check-commit-signatures # Check if commits are PGP-signed
check-features # Check that all feature combinations compile
delete item="data" # Delete files: data, target, lockfiles [alias: d]
doc # Generate documentation
doc-open # Generate and open documentation
example-client-regtest # Run the `client_regtest` example [alias: cr]
example-client-signet # Run the `client_signet` example [alias: cs]
fmt # Format code [alias: f]
lock # Regenerate `Cargo-recent.lock` and `Cargo-minimal.lock` [alias: l]
pre-push # Run pre-push checks [alias: p]
shellcheck # Run ShellCheck [alias: sc]
test # Run tests across with relevant toolchain and lockfile combinations [alias: t]
toolchains # Install and/or Update `cargo-rbmt` and Stable and Nightly toolchains
zizmor # Run Zizmor [alias: z]
audit # Run `cargo audit` on all lockfiles and prune ignored advisories [alias: a]
check # Check Formatting, Linting and Documentation [alias: c]
docs # Generate Documentation
docs-open # Generate and Open Documentation
example-client-regtest # Run the Regtest Client Example [alias: cr]
example-client-signet # Run the Signet Client Cxample [alias: cs]
fmt # Format Code [alias: f]
lock # Regenerate Lockfiles [alias: l]
pre-push # Run pre-push checks [alias: p]
shellcheck # Run ShellCheck [alias: sc]
test # Run Tests [alias: t]
toolchains # Update Stable and Nightly Toolchains
tools # Install cargo-rbmt Tools
zizmor # Run Zizmor [alias: z]
```

## Architecture
Expand Down
File renamed without changes.
79 changes: 29 additions & 50 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
alias a := audit
alias b := build
alias c := check
alias d := delete
alias f := fmt
alias cr := example-client-regtest
alias cs := example-client-signet
Expand All @@ -11,6 +9,8 @@ alias sc := shellcheck
alias z := zizmor
alias p := pre-push

export RBMT_LOG_LEVEL := env("RBMT_LOG_LEVEL", "verbose")

_default:
@echo "> bdk-floresta"
@echo "> A Floresta-powered chain-source crate for BDK\n"
Expand All @@ -21,60 +21,50 @@ audit:
bash contrib/run-cargo-audit.sh
bash contrib/prune-audit-ignores.sh

[doc: "Build `bdk-floresta` and examples"]
build:
RBMT_LOG_LEVEL=verbose cargo rbmt build --release
RBMT_LOG_LEVEL=verbose cargo rbmt build --release --examples

[doc: "Check code formatting, compilation, linting"]
[doc: "Check Formatting, Linting and Documentation"]
check:
RBMT_LOG_LEVEL=verbose cargo rbmt fmt --check
RBMT_LOG_LEVEL=verbose cargo rbmt lint
RBMT_LOG_LEVEL=verbose cargo rbmt docsrs

[doc: "Delete files: data, target, lockfiles"]
delete item="data":
just _delete-{{ item }}
cargo rbmt fmt --check
cargo rbmt lint
cargo rbmt docs

[doc: "Generate documentation"]
doc:
RBMT_LOG_LEVEL=verbose cargo rbmt docsrs
[doc: "Generate Documentation"]
docs:
cargo rbmt docs

[doc: "Generate and open documentation"]
doc-open:
RBMT_LOG_LEVEL=verbose cargo rbmt docsrs --open
[doc: "Generate and Open Documentation"]
docs-open:
cargo rbmt docs --open

[doc: "Run the `client_regtest` example"]
[doc: "Run the Regtest Client Example"]
example-client-regtest:
rm -rf examples/data/client_regtest
BLOCKS=25 cargo run --release --example client_regtest
BLOCKS=25 cargo rbmt run -- run --release --example client_regtest

[doc: "Run the `client_signet` example"]
[doc: "Run the Signet Client Example"]
example-client-signet:
rm -rf examples/data/client_signet
cargo run --release --example client_signet
cargo rbmt run -- run --release --example client_signet

[doc: "Format code"]
[doc: "Format Code"]
fmt:
RBMT_LOG_LEVEL=verbose cargo rbmt fmt
cargo rbmt fmt

[doc: "Regenerate `Cargo-recent.lock` and `Cargo-minimal.lock`"]
[doc: "Regenerate Lockfiles"]
lock:
RBMT_LOG_LEVEL=verbose cargo rbmt lock
cargo rbmt lock

[doc: "Run tests with relevant toolchain and lockfile combinations"]
[doc: "Run Tests"]
test:
RBMT_LOG_LEVEL=verbose cargo rbmt test --toolchain stable --lockfile recent
RBMT_LOG_LEVEL=verbose cargo rbmt test --toolchain stable --lockfile minimal
RBMT_LOG_LEVEL=verbose cargo rbmt test --toolchain msrv --lockfile minimal
cargo rbmt test --toolchain stable --lockfile recent
cargo rbmt test --toolchain stable --lockfile minimal
cargo rbmt test --toolchain msrv --lockfile minimal

[doc: "Install and/or Update `cargo-rbmt` and Stable and Nightly toolchains"]
[doc: "Update Stable and Nightly Toolchains"]
toolchains:
bash contrib/install-cargo-rbmt.sh
RBMT_LOG_LEVEL=verbose cargo rbmt toolchains --update-stable
RBMT_LOG_LEVEL=verbose cargo rbmt toolchains --update-nightly
cargo rbmt toolchains --update-stable
cargo rbmt toolchains --update-nightly

[doc: "Install cargo-rbmt tools"]
[doc: "Install cargo-rbmt Tools"]
tools:
RBMT_LOG_LEVEL=progress cargo rbmt tools

Expand All @@ -91,19 +81,8 @@ zizmor:
pre-push:
@just lock
@just check
@just doc
@just docs
@just test
@just shellcheck
@just zizmor
@just audit

_delete-data:
rm -rf examples/data

_delete-target:
rm -rf target/

_delete-lockfiles:
rm -f Cargo.lock
rm -f Cargo-recent.lock
rm -f Cargo-minimal.lock
1 change: 0 additions & 1 deletion rbmt-version

This file was deleted.

Loading