-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (129 loc) · 5.65 KB
/
Copy pathci.yml
File metadata and controls
139 lines (129 loc) · 5.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: never
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
# Full-node production feature set: all four storage backends plus the
# bitcoinkernel script-verification engine (the kernel is the default build).
FULL_NODE_FEATURES: "rocksdb,fjall,redb,mdbx,kernel"
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
# The kernel engine is built from C++ (cmake + libboost-dev); the default
# feature set now includes it, so every production lane installs the
# prerequisites up front.
- run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake
# 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 and the kernel to bitcoin-rs-node and its deps.
- run: |
cargo clippy -p bitcoin-rs --all-targets \
--no-default-features --features "${FULL_NODE_FEATURES}" \
-- -D warnings
# -p bitcoin-rs-node catches test-target lints invisible to the line above
# (virtual workspace: -p bitcoin-rs does not forward features to node's own
# test targets, so their lints are silently skipped without this step).
cargo clippy -p bitcoin-rs-node --all-targets -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
- uses: Swatinem/rust-cache@v2
# The kernel engine is built from C++ (cmake + libboost-dev); the default
# feature set now includes it, so every production lane installs the
# prerequisites up front.
- run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake
# 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-node 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 "${FULL_NODE_FEATURES}"
bench-smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
- uses: Swatinem/rust-cache@v2
# The kernel engine is built from C++ (cmake + libboost-dev); the default
# feature set now includes it, so every production lane installs the
# prerequisites up front.
- run: sudo apt-get update && sudo apt-get install -y libboost-dev cmake
- run: |
cargo bench -p bitcoin-rs --no-run \
--no-default-features --features "${FULL_NODE_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.FULL_NODE_FEATURES }}
# Kernel-default parity gate (plan 2026-06-10-001 R5): the consensus parity
# suite (committed fixture corpus, --include-ignored by design) and clippy on
# both package roots — all under the production default build.
# The kernel is the default engine, so no special feature selection is needed
# on this lane; binary tests and the four-backend storage surface are covered
# by the `test` job and the no-C++ posture by `portable-check` below.
kernel-parity:
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
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: |
cargo test -p bitcoin-rs-consensus --no-fail-fast -- --include-ignored
- run: cargo clippy -p bitcoin-rs --all-targets -- -D warnings
- run: cargo clippy -p bitcoin-rs-consensus --all-targets -- -D warnings
# Explicit no-C++ lane: proves the workspace still compiles and tests with
# the kernel engine disabled (per-crate `--no-default-features`). Deliberately
# no apt step — its point is that this lane needs no CMake/Boost toolchain.
portable-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.95.0
- uses: Swatinem/rust-cache@v2
- run: cargo check -p bitcoin-rs-consensus --no-default-features
- run: cargo test -p bitcoin-rs-consensus --no-default-features
- run: cargo test -p bitcoin-rs-script
- run: cargo check -p bitcoin-rs-node --no-default-features --features fjall