Skip to content

Commit 30b5b72

Browse files
committed
Merge #80: ci: update cargo-rbmt and adopt toolchain mgmt
730ea44 ci: consolidate job definitions (Nick Johnson) c10fdec api: adopt new cargo-rbmt api files location (Nick Johnson) d7b18af ci: update cargo-rbmt and adopt toolchain mgmt (Nick Johnson) 7fd658c Remove debug println statements from miniscript finalizer (Nick Johnson) Pull request description: The CI job was using a floating version of the cargo-rbmt install action (e.g. `setup-rbmt@master`) and the tool is still way too unstable for that, causing CI to die. Bumping the version and pinning it here. This new version of cargo-rbmt includes the toolchain management, so the justfile and CI job have been simplified. It also has the new spot for the API files which doesn't include the package name. The new version of cargo-rbmt also includes the [random subset of features to test feature](rust-bitcoin/rust-bitcoin-maintainer-tools#94), which I believe exposed an issue in the v2 code (addressed in the first commit). ACKs for top commit: tcharding: ACK 730ea44 Tree-SHA512: 41bb32f9d23dace7198ab799a9bd2cd81fdaa452c30a93bf7afd467034ca022c7c5275044229e8a3aa31642e94fd07776c2d69a380a21d60507d8764f736b983
2 parents 3c07e8a + 730ea44 commit 30b5b72

File tree

8 files changed

+22
-112
lines changed

8 files changed

+22
-112
lines changed

.github/workflows/rust.yml

Lines changed: 9 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -13,114 +13,27 @@ on: # yamllint disable-line rule:truthy
1313
name: Continuous Integration
1414

1515
jobs:
16-
Stable: # 2 jobs, one per lock file.
17-
name: Test - stable toolchain
16+
Test:
1817
runs-on: ubuntu-latest
1918
strategy:
2019
fail-fast: false
2120
matrix:
21+
toolchain: [stable, nightly, msrv]
2222
dep: [minimal, recent]
2323
steps:
2424
- uses: actions/checkout@v6
25-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
26-
id: setup
25+
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@18e7f1788abfc14f5fb76204a3deab43b03ba39c
2726
- name: "Run tests"
28-
run: cargo +${{ steps.setup.outputs.stable-version }} rbmt test stable --lock-file ${{ matrix.dep }}
27+
run: cargo rbmt --lock-file ${{ matrix.dep }} test --toolchain ${{ matrix.toolchain }}
2928

30-
Nightly: # 2 jobs, one per lock file.
31-
name: Test - nightly toolchain
29+
Check:
3230
runs-on: ubuntu-latest
3331
strategy:
3432
fail-fast: false
3533
matrix:
36-
dep: [minimal, recent]
37-
steps:
38-
- uses: actions/checkout@v6
39-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
40-
id: setup
41-
- name: "Run tests"
42-
run: cargo +${{ steps.setup.outputs.nightly-version }} rbmt test nightly --lock-file ${{ matrix.dep }}
43-
44-
MSRV: # 2 jobs, one per lock file.
45-
name: Test - MSRV toolchain
46-
runs-on: ubuntu-latest
47-
strategy:
48-
fail-fast: false
49-
matrix:
50-
dep: [minimal, recent]
51-
steps:
52-
- uses: actions/checkout@v6
53-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
54-
with:
55-
toolchains: "1.74.0"
56-
- name: "Run tests"
57-
run: cargo +1.74.0 rbmt test msrv --lock-file ${{ matrix.dep }}
58-
59-
Lint:
60-
name: Lint - nightly toolchain
61-
runs-on: ubuntu-latest
62-
strategy:
63-
fail-fast: false
64-
steps:
65-
- uses: actions/checkout@v6
66-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
67-
id: setup
68-
- name: "Run lint"
69-
run: cargo +${{ steps.setup.outputs.nightly-version }} rbmt lint
70-
71-
API:
72-
name: API check
73-
runs-on: ubuntu-latest
74-
strategy:
75-
fail-fast: false
76-
steps:
77-
- uses: actions/checkout@v6
78-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
79-
id: setup
80-
- name: "Run API check"
81-
run: cargo +${{ steps.setup.outputs.nightly-version }} rbmt api
82-
83-
Docs:
84-
name: Docs - stable toolchain
85-
runs-on: ubuntu-latest
86-
strategy:
87-
fail-fast: false
88-
steps:
89-
- uses: actions/checkout@v6
90-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
91-
id: setup
92-
- name: "Build docs"
93-
run: cargo +${{ steps.setup.outputs.stable-version }} rbmt docs
94-
95-
Docsrs:
96-
name: Docs - nightly toolchain
97-
runs-on: ubuntu-latest
98-
strategy:
99-
fail-fast: false
100-
steps:
101-
- uses: actions/checkout@v6
102-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
103-
id: setup
104-
- name: "Build docs.rs docs"
105-
run: cargo +${{ steps.setup.outputs.nightly-version }} rbmt docsrs
106-
107-
Format: # 1 job, run cargo fmt directly.
108-
name: Format - nightly toolchain
109-
runs-on: ubuntu-latest
110-
strategy:
111-
fail-fast: false
112-
steps:
113-
- uses: actions/checkout@v6
114-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
115-
id: setup
116-
- name: "Check formatting"
117-
run: cargo +${{ steps.setup.outputs.nightly-version }} fmt --all -- --check
118-
119-
Integration: # 1 job, run bitcoin core integration tests using rbmt.
120-
name: Integration - against bitcoind
121-
runs-on: ubuntu-latest
34+
command: [lint, api, docs, docsrs, integration, "fmt --check"]
12235
steps:
12336
- uses: actions/checkout@v6
124-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@master
125-
- name: "Run integration tests"
126-
run: cargo rbmt integration
37+
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@18e7f1788abfc14f5fb76204a3deab43b03ba39c
38+
- name: "Run ${{ matrix.command }}"
39+
run: cargo rbmt ${{ matrix.command }}

.github/workflows/update-toolchains.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v6
17-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/update-nightly@320a06a6647c90ac97452b20fad5b689905a9791
17+
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/update-nightly@18e7f1788abfc14f5fb76204a3deab43b03ba39c
1818
with:
1919
token: ${{ secrets.RBMT_PRS }}
20-
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/update-stable@320a06a6647c90ac97452b20fad5b689905a9791
20+
- uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/update-stable@18e7f1788abfc14f5fb76204a3deab43b03ba39c
2121
with:
2222
token: ${{ secrets.RBMT_PRS }}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords = [ "psbt", "bip-174", "bip174", "bip-370", "bip370"]
1010
readme = "README.md"
1111
edition = "2021"
1212
rust-version = "1.74.0"
13-
exclude = ["tests", "contrib"]
13+
exclude = ["api", "tests", "contrib"]
1414

1515
[package.metadata.docs.rs]
1616
all-features = true

justfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ _default:
77
# Install rbmt (Rust Bitcoin Maintainer Tools).
88
@_install-rbmt:
99
cargo install --quiet --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat {{justfile_directory()}}/rbmt-version) cargo-rbmt
10+
RBMT_LOG_LEVEL=quiet cargo rbmt toolchains > /dev/null
1011

1112
# Cargo check everything.
1213
check:
@@ -40,26 +41,24 @@ docsrs *flags:
4041
# Update the recent and minimal lock files using rbmt.
4142
[group('tools')]
4243
@update-lock-files: _install-rbmt
43-
rustup run {{NIGHTLY_VERSION}} cargo rbmt lock
44+
cargo rbmt lock
4445

4546
# Ensure the exposed API files in api/ are up-to-date.
4647
[group('tools')]
4748
check-api: _install-rbmt
48-
cargo +{{NIGHTLY_VERSION}} rbmt api
49-
50-
# Run CI tasks with rbmt.
51-
[group('ci')]
52-
@ci task toolchain="stable" lock="recent": _install-rbmt
53-
RBMT_LOG_LEVEL=quiet rustup run {{toolchain}} cargo rbmt --lock-file {{lock}} {{task}}
49+
cargo rbmt api
5450

5551
# Test crate.
5652
[group('ci')]
57-
ci-test: (ci "test stable")
53+
ci-test toolchain="stable" lock="recent": _install-rbmt
54+
cargo rbmt --lock-file {{lock}} test --toolchain {{toolchain}}
5855

5956
# Lint crate.
6057
[group('ci')]
61-
ci-lint: (ci "lint" NIGHTLY_VERSION)
58+
ci-lint: _install-rbmt
59+
cargo rbmt lint
6260

6361
# Bitcoin core integration tests.
6462
[group('ci')]
65-
ci-integration: (ci "integration")
63+
ci-integration: _install-rbmt
64+
cargo rbmt integration

rbmt-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
257e19f400ab1bfa51c2051b5551d92f75b5f738
1+
18e7f1788abfc14f5fb76204a3deab43b03ba39c

src/v2/miniscript/finalize.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ impl Finalizer {
126126
};
127127

128128
let witness = Witness::from_slice(&witness);
129-
println!("{:#?}", script_sig);
130-
println!("{:#?}", witness);
131129
Ok((script_sig, witness))
132130
}
133131

0 commit comments

Comments
 (0)