@@ -9,20 +9,6 @@ on: # yamllint disable-line rule:truthy
99name : Continuous integration
1010
1111jobs :
12- Prepare :
13- runs-on : ubuntu-latest
14- outputs :
15- nightly_version : ${{ steps.read_toolchain.outputs.nightly_version }}
16- rbmt_version : ${{ steps.read_toolchain.outputs.rbmt_version }}
17- steps :
18- - name : " Checkout repo"
19- uses : actions/checkout@v4
20- - name : " Read toolchain versions"
21- id : read_toolchain
22- run : |
23- echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
24- echo "rbmt_version=$(cat rbmt-version)" >> $GITHUB_OUTPUT
25-
2612 Stable : # 2 jobs, one per lock file.
2713 name : Test - stable toolchain
2814 runs-on : ubuntu-latest
@@ -31,32 +17,25 @@ jobs:
3117 matrix :
3218 dep : [minimal, recent]
3319 steps :
34- - name : " Checkout repo"
35- uses : actions/checkout@v4
36- - name : " Select toolchain"
37- uses : dtolnay/rust-toolchain@stable
38- - name : " Install rbmt"
39- run : cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat rbmt-version) cargo-rbmt
20+ - uses : actions/checkout@v6
21+ - uses : ./.github/actions/prepare
22+ with :
23+ toolchain : stable
4024 - name : " Run tests"
4125 run : cargo rbmt test stable --lock-file ${{ matrix.dep }}
4226
4327 Nightly : # 2 jobs, one per lock file.
4428 name : Test - nightly toolchain
45- needs : Prepare
4629 runs-on : ubuntu-latest
4730 strategy :
4831 fail-fast : false
4932 matrix :
5033 dep : [minimal, recent]
5134 steps :
52- - name : " Checkout repo"
53- uses : actions/checkout@v4
54- - name : " Select toolchain"
55- uses : dtolnay/rust-toolchain@v1
35+ - uses : actions/checkout@v6
36+ - uses : ./.github/actions/prepare
5637 with :
57- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
58- - name : " Install rbmt"
59- run : cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev ${{ needs.Prepare.outputs.rbmt_version }} cargo-rbmt
38+ toolchain : nightly
6039 - name : " Run tests"
6140 run : cargo rbmt test nightly --lock-file ${{ matrix.dep }}
6241
@@ -68,36 +47,24 @@ jobs:
6847 matrix :
6948 dep : [minimal, recent]
7049 steps :
71- - name : " Checkout repo"
72- uses : actions/checkout@v4
73- - name : " Install stable toolchain"
74- uses : dtolnay/rust-toolchain@stable
75- - name : " Install rbmt"
76- run : cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat rbmt-version) cargo-rbmt
77- - name : " Install MSRV toolchain"
78- uses : dtolnay/rust-toolchain@stable
50+ - uses : actions/checkout@v6
51+ - uses : ./.github/actions/prepare
7952 with :
8053 toolchain : " 1.74.0"
8154 - name : " Run tests"
8255 run : cargo rbmt test msrv --lock-file ${{ matrix.dep }}
8356
8457 Lint :
8558 name : Lint - nightly toolchain
86- needs : Prepare
8759 runs-on : ubuntu-latest
8860 strategy :
8961 fail-fast : false
9062 steps :
91- - name : " Checkout repo"
92- uses : actions/checkout@v4
93- - name : " Select toolchain"
94- uses : dtolnay/rust-toolchain@v1
63+ - uses : actions/checkout@v6
64+ - uses : ./.github/actions/prepare
9565 with :
96- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
97- - name : " Install clippy"
98- run : rustup component add clippy
99- - name : " Install rbmt"
100- run : cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev ${{ needs.Prepare.outputs.rbmt_version }} cargo-rbmt
66+ toolchain : nightly
67+ components : clippy
10168 - name : " Run lint"
10269 run : cargo rbmt lint
10370
@@ -107,77 +74,47 @@ jobs:
10774 strategy :
10875 fail-fast : false
10976 steps :
110- - name : " Checkout repo"
111- uses : actions/checkout@v4
112- - name : " Select toolchain"
113- uses : dtolnay/rust-toolchain@stable
114- - name : " Install rbmt"
115- run : cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev $(cat rbmt-version) cargo-rbmt
77+ - uses : actions/checkout@v6
78+ - uses : ./.github/actions/prepare
79+ with :
80+ toolchain : stable
11681 - name : " Build docs"
11782 run : cargo rbmt docs
11883
11984 Docsrs :
12085 name : Docs - nightly toolchain
121- needs : Prepare
12286 runs-on : ubuntu-latest
12387 strategy :
12488 fail-fast : false
12589 steps :
126- - name : " Checkout repo"
127- uses : actions/checkout@v4
128- - name : " Select toolchain"
129- uses : dtolnay/rust-toolchain@v1
90+ - uses : actions/checkout@v6
91+ - uses : ./.github/actions/prepare
13092 with :
131- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
132- - name : " Install rbmt"
133- run : cargo install --git https://github.com/rust-bitcoin/rust-bitcoin-maintainer-tools.git --rev ${{ needs.Prepare.outputs.rbmt_version }} cargo-rbmt
93+ toolchain : nightly
13494 - name : " Build docs.rs docs"
13595 run : cargo rbmt docsrs
13696
13797 Format : # 1 job, run cargo fmt directly.
13898 name : Format - nightly toolchain
139- needs : Prepare
14099 runs-on : ubuntu-latest
141100 strategy :
142101 fail-fast : false
143102 steps :
144- - name : " Checkout repo"
145- uses : actions/checkout@v4
146- - name : " Select toolchain"
147- uses : dtolnay/rust-toolchain@v1
103+ - uses : actions/checkout@v6
104+ - uses : ./.github/actions/prepare
148105 with :
149- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
150- - name : " Install rustfmt"
151- run : rustup component add rustfmt
106+ toolchain : nightly
107+ components : rustfmt
152108 - name : " Check formatting"
153109 run : cargo fmt --all -- --check
154110
155- Integration : # 1 job for each bitcoind version we support .
156- name : Integration tests against bitcoind
111+ Integration : # 1 job, run bitcoin core integration tests using rbmt .
112+ name : Integration - against bitcoind
157113 runs-on : ubuntu-latest
158- strategy :
159- fail-fast : false
160- matrix :
161- feature :
162- [
163- " 29_0" ,
164- " 28_2" ,
165- " 27_2" ,
166- " 26_2" ,
167- " 25_2" ,
168- " 24_2" ,
169- " 23_2" ,
170- " 22_1" ,
171- " 0_21_2" ,
172- " 0_20_2" ,
173- " 0_19_1" ,
174- " 0_18_1" ,
175- " 0_17_2" ,
176- ]
177114 steps :
178- - name : " Checkout repo "
179- uses : actions/checkout@v4
180- - name : " Select toolchain "
181- uses : dtolnay/rust- toolchain@ stable
115+ - uses : actions/checkout@v6
116+ - uses : ./.github/ actions/prepare
117+ with :
118+ toolchain : stable
182119 - name : " Run integration tests"
183- run : cd bitcoind-tests && cargo test --features=${{ matrix.feature }}
120+ run : cargo rbmt integration
0 commit comments