From 4ba0b525de65a7201ab437c63d5ee0b970af47e8 Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Wed, 8 Jul 2026 20:05:51 -0300 Subject: [PATCH] chore(ci): bump `cargo-rbmt` to v0.5.0 --- .github/actions/setup-rbmt/action.yml | 5 +- .github/workflows/audit.yml | 1 + .github/workflows/commits.yml | 24 +++--- .github/workflows/cross.yml | 1 + .github/workflows/integration.yml | 13 +-- .github/workflows/rust.yml | 6 +- Cargo.toml | 3 +- README.md | 36 ++++----- ...mmit-signatures.sh => check-signatures.sh} | 0 justfile | 79 +++++++------------ rbmt-version | 1 - 11 files changed, 77 insertions(+), 92 deletions(-) rename contrib/{check-commit-signatures.sh => check-signatures.sh} (100%) delete mode 100644 rbmt-version diff --git a/.github/actions/setup-rbmt/action.yml b/.github/actions/setup-rbmt/action.yml index fcafb16..2fac443 100644 --- a/.github/actions/setup-rbmt/action.yml +++ b/.github/actions/setup-rbmt/action.yml @@ -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 diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index ea12d02..16cd56a 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -11,6 +11,7 @@ on: permissions: {} env: CARGO_TERM_COLOR: always + RBMT_LOG_LEVEL: progress jobs: cargo-audit: diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml index 5477954..761bf64 100644 --- a/.github/workflows/commits.yml +++ b/.github/workflows/commits.yml @@ -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 diff --git a/.github/workflows/cross.yml b/.github/workflows/cross.yml index 7f2b82e..b1d4dd0 100644 --- a/.github/workflows/cross.yml +++ b/.github/workflows/cross.yml @@ -9,6 +9,7 @@ on: permissions: {} env: CARGO_TERM_COLOR: always + RBMT_LOG_LEVEL: progress RUST_BACKTRACE: 1 jobs: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 0ffe261..acfd695 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -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: @@ -21,7 +21,7 @@ jobs: fail-fast: false matrix: include: - - name: Regtest Client Example + - name: Regtest Client example: client_regtest steps: @@ -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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6d54595..0d86a4b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,6 +9,7 @@ on: permissions: {} env: CARGO_TERM_COLOR: always + RBMT_LOG_LEVEL: progress RUST_BACKTRACE: 1 jobs: @@ -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 diff --git a/Cargo.toml b/Cargo.toml index ad00272..dd90e44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 = [ diff --git a/README.md b/README.md index b91d74a..509e56c 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/contrib/check-commit-signatures.sh b/contrib/check-signatures.sh similarity index 100% rename from contrib/check-commit-signatures.sh rename to contrib/check-signatures.sh diff --git a/justfile b/justfile index 62b8217..e5bee82 100644 --- a/justfile +++ b/justfile @@ -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 @@ -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" @@ -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 @@ -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 diff --git a/rbmt-version b/rbmt-version deleted file mode 100644 index 267577d..0000000 --- a/rbmt-version +++ /dev/null @@ -1 +0,0 @@ -0.4.1