perf(node): parallelize script verification for same-block-spend blocks #487
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: never | |
| RUST_BACKTRACE: 1 | |
| CARGO_INCREMENTAL: 0 | |
| # Default storage features compatible with MSRV 1.95 + a standard Linux host. | |
| PORTABLE_FEATURES: "rocksdb,fjall,redb,mdbx,bitcoinconsensus" | |
| jobs: | |
| wallet-no-seckey: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| ! grep -r 'SecretKey\|secp256k1::Secret\|seckey' crates/wallet/src | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@1.95.0 | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@1.95.0 | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| # In a virtual workspace (no root [package]), `--features` flags are not | |
| # forwarded to library crates; use `-p bitcoin-rs` so the binary's feature | |
| # table propagates all backends to bitcoin-rs-node and its deps. | |
| - run: | | |
| cargo clippy -p bitcoin-rs --all-targets \ | |
| --no-default-features --features "${PORTABLE_FEATURES}" \ | |
| -- -D warnings | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@1.95.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| # Library unit tests run with each crate's own default features. | |
| - run: cargo test --workspace --no-fail-fast | |
| # Node / binary tests run with the full portable feature set. -p is | |
| # required because `--workspace --features` silently ignores --features in | |
| # a virtual workspace (no root [package] section in the top-level Cargo.toml). | |
| - run: | | |
| cargo test -p bitcoin-rs --no-fail-fast \ | |
| --no-default-features --features "${PORTABLE_FEATURES}" | |
| bench-smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@1.95.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: | | |
| cargo bench -p bitcoin-rs --no-run \ | |
| --no-default-features --features "${PORTABLE_FEATURES}" | |
| # Crate-level bench targets are unreachable from -p bitcoin-rs; compile | |
| # them in both allocator configurations so bench-mimalloc breakage is | |
| # visible to CI. | |
| - run: cargo bench -p bitcoin-rs-coinstats -p bitcoin-rs-utxo --no-run | |
| - run: | | |
| cargo bench -p bitcoin-rs-coinstats -p bitcoin-rs-utxo --no-run \ | |
| --features bench-mimalloc | |
| deny: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| rust-version: "1.95.0" | |
| arguments: --workspace --no-default-features --features ${{ env.PORTABLE_FEATURES }} | |
| # Heavy sys-crate gate: | |
| # - libboost-dev for libbitcoinkernel-sys | |
| # Builds and smoke-tests the bitcoinkernel-backed consensus package without | |
| # libbitcoinconsensus; both native Core archives export overlapping symbols and | |
| # cannot share a single Rust test binary. | |
| kernel-only: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake | |
| - uses: dtolnay/rust-toolchain@1.95.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: | | |
| cargo test -p bitcoin-rs-consensus --no-fail-fast \ | |
| --no-default-features --features kernel -- --include-ignored |