Skip to content

Commit ef510e4

Browse files
committed
Merge tcharding/rust-psbt#37: Clean up dependencies, feature flags, format, lint, and kick the tires on rbmt
233ff10 Fix version numbers for synced code (Nick Johnson) 085b9b9 Fix up minimal versions (Nick Johnson) 3a8a97b Bump nightly version, fix new lints and format (Nick Johnson) 260081f Switch to rmbt tooling (Nick Johnson) e8ac0ab Remove unnecssary rand-std flag (Nick Johnson) c2d88c6 Hide actual-serde feature flag from end users (Nick Johnson) 5c42a53 Combine miniscript feature flags into one (Nick Johnson) 0970655 Match rust-bitcoin's looser encoding requirements (Nick Johnson) Pull request description: Bit of mess, but the first patch gets the code compiling again, some fallout from the BufRead -> Read change in rust-bitcoin. The next three patches use the 1.60+ rust features for a cleaner feature flag interface with less footguns for users. And finally the rest of the patches introduce the `rbmt` tooling and fix up format, lint, and minimal version issues. Supersedes #36 Closes #32 ACKs for top commit: tcharding: ACK 233ff10 Tree-SHA512: a4fc0cf6aba8b1b9ebfcaa9214665c344d7f81806999cb5520d55a1fa1cd4f97757bbdf6191b743f55aa9bb50059b4c859d0fbd02155db13e6c75301df69bf59
2 parents c32f754 + 233ff10 commit ef510e4

20 files changed

Lines changed: 215 additions & 250 deletions

.github/workflows/rust.yml

Lines changed: 28 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- name: "Checkout repo"
1818
uses: actions/checkout@v4
19-
- name: "Read nightly version"
19+
- name: "Read toolchain versions"
2020
id: read_toolchain
2121
run: echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
2222

@@ -30,18 +30,12 @@ jobs:
3030
steps:
3131
- name: "Checkout repo"
3232
uses: actions/checkout@v4
33-
- name: "Checkout maintainer tools"
34-
uses: actions/checkout@v4
35-
with:
36-
repository: rust-bitcoin/rust-bitcoin-maintainer-tools
37-
rev: b2ac115
38-
path: maintainer-tools
3933
- name: "Select toolchain"
4034
uses: dtolnay/rust-toolchain@stable
41-
- name: "Set dependencies"
42-
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
43-
- name: "Run test script"
44-
run: ./maintainer-tools/ci/run_task.sh stable
35+
- name: "Install rbmt"
36+
run: ./contrib/install-rbmt.sh
37+
- name: "Run tests"
38+
run: rbmt test stable --lock-file ${{ matrix.dep }}
4539

4640
Nightly: # 2 jobs, one per lock file.
4741
name: Test - nightly toolchain
@@ -54,20 +48,14 @@ jobs:
5448
steps:
5549
- name: "Checkout repo"
5650
uses: actions/checkout@v4
57-
- name: "Checkout maintainer tools"
58-
uses: actions/checkout@v4
59-
with:
60-
repository: rust-bitcoin/rust-bitcoin-maintainer-tools
61-
rev: b2ac115
62-
path: maintainer-tools
6351
- name: "Select toolchain"
6452
uses: dtolnay/rust-toolchain@v1
6553
with:
6654
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
67-
- name: "Set dependencies"
68-
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
69-
- name: "Run test script"
70-
run: ./maintainer-tools/ci/run_task.sh nightly
55+
- name: "Install rbmt"
56+
run: ./contrib/install-rbmt.sh
57+
- name: "Run tests"
58+
run: rbmt test nightly --lock-file ${{ matrix.dep }}
7159

7260
MSRV: # 2 jobs, one per lock file.
7361
name: Test - MSRV toolchain
@@ -79,115 +67,79 @@ jobs:
7967
steps:
8068
- name: "Checkout repo"
8169
uses: actions/checkout@v4
82-
- name: "Checkout maintainer tools"
83-
uses: actions/checkout@v4
84-
with:
85-
repository: rust-bitcoin/rust-bitcoin-maintainer-tools
86-
rev: b2ac115
87-
path: maintainer-tools
88-
- name: "Select toolchain"
70+
- name: "Install stable toolchain"
71+
uses: dtolnay/rust-toolchain@stable
72+
- name: "Install rbmt"
73+
run: ./contrib/install-rbmt.sh
74+
- name: "Install MSRV toolchain"
8975
uses: dtolnay/rust-toolchain@stable
9076
with:
9177
toolchain: "1.63.0"
92-
- name: "Set dependencies"
93-
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
94-
- name: "Run test script"
95-
run: ./maintainer-tools/ci/run_task.sh msrv
78+
- name: "Run tests"
79+
run: rbmt test msrv --lock-file ${{ matrix.dep }}
9680

9781
Lint:
9882
name: Lint - nightly toolchain
9983
needs: Prepare
10084
runs-on: ubuntu-latest
10185
strategy:
10286
fail-fast: false
103-
matrix:
104-
dep: [recent]
10587
steps:
10688
- name: "Checkout repo"
10789
uses: actions/checkout@v4
108-
- name: "Checkout maintainer tools"
109-
uses: actions/checkout@v4
110-
with:
111-
repository: rust-bitcoin/rust-bitcoin-maintainer-tools
112-
rev: b2ac115
113-
path: maintainer-tools
11490
- name: "Select toolchain"
11591
uses: dtolnay/rust-toolchain@v1
11692
with:
11793
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
11894
- name: "Install clippy"
11995
run: rustup component add clippy
120-
- name: "Set dependencies"
121-
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
122-
- name: "Run test script"
123-
run: ./maintainer-tools/ci/run_task.sh lint
96+
- name: "Install rbmt"
97+
run: ./contrib/install-rbmt.sh
98+
- name: "Run lint"
99+
run: rbmt lint
124100

125101
Docs:
126102
name: Docs - stable toolchain
127103
runs-on: ubuntu-latest
128104
strategy:
129105
fail-fast: false
130-
matrix:
131-
dep: [recent]
132106
steps:
133107
- name: "Checkout repo"
134108
uses: actions/checkout@v4
135-
- name: "Checkout maintainer tools"
136-
uses: actions/checkout@v4
137-
with:
138-
repository: rust-bitcoin/rust-bitcoin-maintainer-tools
139-
rev: b2ac115
140-
path: maintainer-tools
141109
- name: "Select toolchain"
142110
uses: dtolnay/rust-toolchain@stable
143-
- name: "Set dependencies"
144-
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
145-
- name: "Run test script"
146-
run: ./maintainer-tools/ci/run_task.sh docs
111+
- name: "Install rbmt"
112+
run: ./contrib/install-rbmt.sh
113+
- name: "Build docs"
114+
run: rbmt docs
147115

148116
Docsrs:
149117
name: Docs - nightly toolchain
150118
needs: Prepare
151119
runs-on: ubuntu-latest
152120
strategy:
153121
fail-fast: false
154-
matrix:
155-
dep: [recent]
156122
steps:
157123
- name: "Checkout repo"
158124
uses: actions/checkout@v4
159-
- name: "Checkout maintainer tools"
160-
uses: actions/checkout@v4
161-
with:
162-
repository: rust-bitcoin/rust-bitcoin-maintainer-tools
163-
rev: b2ac115
164-
path: maintainer-tools
165125
- name: "Select toolchain"
166126
uses: dtolnay/rust-toolchain@v1
167127
with:
168128
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
169-
- name: "Set dependencies"
170-
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock
171-
- name: "Run test script"
172-
run: ./maintainer-tools/ci/run_task.sh docsrs
129+
- name: "Install rbmt"
130+
run: ./contrib/install-rbmt.sh
131+
- name: "Build docs.rs docs"
132+
run: rbmt docsrs
173133

174134
Format: # 1 job, run cargo fmt directly.
175135
name: Format - nightly toolchain
176136
needs: Prepare
177137
runs-on: ubuntu-latest
178138
strategy:
179139
fail-fast: false
180-
matrix:
181-
dep: [recent]
182140
steps:
183141
- name: "Checkout repo"
184142
uses: actions/checkout@v4
185-
- name: "Checkout maintainer tools"
186-
uses: actions/checkout@v4
187-
with:
188-
repository: rust-bitcoin/rust-bitcoin-maintainer-tools
189-
rev: b2ac115
190-
path: maintainer-tools
191143
- name: "Select toolchain"
192144
uses: dtolnay/rust-toolchain@v1
193145
with:

0 commit comments

Comments
 (0)