ci: combine cargo-rbmt job definitions
What changed, and why it matters
This commit is a routine cleanup of the project's automated testing configuration file. It merges several nearly identical test job definitions into two simpler, matrix-based job definitions. There is no change to the actual Bitcoin library code, no change to permissions or secrets, and no security relevance.
No action required. This is a benign CI refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors .github/workflows/rust.yml to consolidate separate GitHub Actions jobs (Stable, Nightly, MSRV, Lint, Docs, Docsrs, Bench) into two matrix jobs: Test (toolchain × dependency matrix) and Check (task matrix). It also moves the Prepare job lower in the file. The pinned action hashes, permissions (contents: read), checkout settings (persist-credentials: false), and commands executed remain unchanged. No source code, dependencies, secrets, or network exposure are modified.
Changed components
.github/workflows/rust.ymlInspect captured patch +18 / −102
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 502d7adb..ae36bde1 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -11,64 +11,15 @@ name: Continuous integration
permissions: {}
jobs:
- Prepare:
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- outputs:
- nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }}
- steps:
- - name: "Checkout repo"
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- with:
- persist-credentials: false
- - name: "Read workspace versions"
- id: read_toolchain
- run: |
- echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
-
- Stable: # 2 jobs, one per manifest.
- name: Test - stable toolchain
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- strategy:
- fail-fast: false
- matrix:
- dep: [minimal, recent]
- steps:
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- with:
- persist-credentials: false
- - uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@9de0de1f36f65a2cb9c617358d88aecd319282d9
- - name: "Run tests"
- run: cargo rbmt test --toolchain stable --lock-file ${{ matrix.dep }}
-
- Nightly: # 2 jobs, one per manifest.
- name: Test - nightly toolchain
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- strategy:
- fail-fast: false
- matrix:
- dep: [minimal, recent]
- steps:
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- with:
- persist-credentials: false
- - uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@9de0de1f36f65a2cb9c617358d88aecd319282d9
- - name: "Run tests"
- run: cargo rbmt test --toolchain nightly --lock-file ${{ matrix.dep }}
-
- MSRV: # 2 jobs, one per manifest.
- name: Test - MSRV toolchain
+ Test:
+ name: Test - ${{ matrix.toolchain }} toolchain, ${{ matrix.dep }} deps
runs-on: ubuntu-24.04
permissions:
contents: read
strategy:
fail-fast: false
matrix:
+ toolchain: [stable, nightly, msrv]
dep: [minimal, recent]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -76,75 +27,40 @@ jobs:
persist-credentials: false
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@9de0de1f36f65a2cb9c617358d88aecd319282d9
- name: "Run tests"
- run: cargo rbmt test --toolchain msrv --lock-file ${{ matrix.dep }}
-
- Lint:
- name: Lint - nightly toolchain
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- strategy:
- fail-fast: false
- matrix:
- dep: [recent]
- steps:
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- with:
- persist-credentials: false
- - uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@9de0de1f36f65a2cb9c617358d88aecd319282d9
- - name: "Run lint"
- run: cargo rbmt lint
+ run: cargo rbmt test --toolchain ${{ matrix.toolchain }} --lock-file ${{ matrix.dep }}
- Docs:
- name: Docs - stable toolchain
+ Check:
runs-on: ubuntu-24.04
permissions:
contents: read
strategy:
fail-fast: false
matrix:
- dep: [recent]
+ task: [lint, docs, docsrs, bench]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@9de0de1f36f65a2cb9c617358d88aecd319282d9
- - name: "Build docs"
- run: cargo rbmt docs
+ - name: "Run ${{ matrix.task }}"
+ run: cargo rbmt ${{ matrix.task }}
- Docsrs:
- name: Docs - nightly toolchain
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- strategy:
- fail-fast: false
- matrix:
- dep: [recent]
- steps:
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- with:
- persist-credentials: false
- - uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@9de0de1f36f65a2cb9c617358d88aecd319282d9
- - name: "Build docs.rs docs"
- run: cargo rbmt docsrs
-
- Bench:
- name: Bench - nightly toolchain
+ # Non cargo-rbmt jobs manage their toolchain version directly.
+ Prepare:
runs-on: ubuntu-24.04
permissions:
contents: read
- strategy:
- fail-fast: false
- matrix:
- dep: [recent]
+ outputs:
+ nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }}
steps:
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ - name: "Checkout repo"
+ uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- - uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@9de0de1f36f65a2cb9c617358d88aecd319282d9
- - name: "Run benches"
- run: cargo rbmt bench --lock-file ${{ matrix.dep }}
+ - name: "Read workspace versions"
+ id: read_toolchain
+ run: |
+ echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
Arch32bit:
name: Test 32-bit version
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.