@@ -9,93 +9,30 @@ on: # yamllint disable-line rule:truthy
99name : Continuous integration
1010
1111jobs :
12- Prepare :
13- runs-on : ubuntu-slim
14- outputs :
15- nightly_version : ${{ steps.read_toolchain.outputs.nightly_version }}
16- steps :
17- - name : " Checkout repo"
18- uses : actions/checkout@v4
19- - name : " Read nightly version"
20- id : read_toolchain
21- run : echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
22-
23- Stable : # 2 jobs, one per lock file.
24- name : Test - stable toolchain
12+ Test : # 6 jobs: 3 toolchains × 2 lock files.
13+ name : Test - ${{ matrix.toolchain }} toolchain (${{ matrix.dep }})
2514 runs-on : ubuntu-latest
2615 strategy :
2716 fail-fast : false
2817 matrix :
2918 dep : [minimal, recent]
19+ toolchain : [stable, nightly, msrv]
3020 steps :
3121 - name : " Checkout repo"
3222 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- ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
38- path : maintainer-tools
39- - name : " Select toolchain"
40- 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
45-
46- Nightly : # 2 jobs, one per lock file.
47- name : Test - nightly toolchain
48- needs : Prepare
49- runs-on : ubuntu-latest
50- strategy :
51- fail-fast : false
52- matrix :
53- dep : [minimal, recent]
54- steps :
55- - name : " Checkout repo"
56- 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- ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
62- path : maintainer-tools
63- - name : " Select toolchain"
64- uses : dtolnay/rust-toolchain@v1
65- with :
66- 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
71-
72- MSRV : # 2 jobs, one per lock file.
73- name : Test - 1.75.0 toolchain
74- runs-on : ubuntu-latest
75- strategy :
76- fail-fast : false
77- matrix :
78- dep : [minimal, recent]
79- steps :
80- - name : " Checkout repo"
81- 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- path : maintainer-tools
87- - name : " Select toolchain"
88- uses : dtolnay/rust-toolchain@stable
89- with :
90- toolchain : " 1.75.0"
91- - name : " Set dependencies"
92- run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
93- - name : " Run test script"
94- run : ./maintainer-tools/ci/run_task.sh msrv
23+ - uses : Swatinem/rust-cache@v2
24+ - uses : rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
25+ - name : " Run ${{ matrix.toolchain }} tests"
26+ run : |
27+ cargo rbmt --lock-file ${{ matrix.dep }} test --toolchain ${{ matrix.toolchain }} \
28+ -p bitreq \
29+ -p corepc-client \
30+ -p jsonrpc-fuzz \
31+ -p jsonrpc \
32+ -p corepc-types
9533
9634 Lint :
9735 name : Lint - nightly toolchain
98- needs : Prepare
9936 runs-on : ubuntu-latest
10037 env :
10138 BITCOIND_SKIP_DOWNLOAD : " 1"
@@ -106,24 +43,17 @@ jobs:
10643 steps :
10744 - name : " Checkout repo"
10845 uses : actions/checkout@v4
109- - name : " Checkout maintainer tools"
110- uses : actions/checkout@v4
111- with :
112- repository : rust-bitcoin/rust-bitcoin-maintainer-tools
113- ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
114- path : maintainer-tools
115- - name : " Select toolchain"
116- uses : dtolnay/rust-toolchain@v1
117- with :
118- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
119- - name : " Install clippy"
120- run : rustup component add clippy
121- - name : " Set dependencies"
122- run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
123- - name : " Run test script"
46+ - uses : Swatinem/rust-cache@v2
47+ - uses : rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
48+ - name : " Run lints"
12449 run : |
125- ./maintainer-tools/ci/run_task.sh lint
126- ./contrib/lint-integtation-tests.sh
50+ cargo rbmt --lock-file ${{ matrix.dep }} lint \
51+ -p bitreq \
52+ -p corepc-client \
53+ -p jsonrpc-fuzz \
54+ -p jsonrpc \
55+ -p corepc-types
56+ ./contrib/lint-integration-tests.sh
12757 ./contrib/lint-verify.sh
12858
12959 Docs :
@@ -138,22 +68,13 @@ jobs:
13868 steps :
13969 - name : " Checkout repo"
14070 uses : actions/checkout@v4
141- - name : " Checkout maintainer tools"
142- uses : actions/checkout@v4
143- with :
144- repository : rust-bitcoin/rust-bitcoin-maintainer-tools
145- ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
146- path : maintainer-tools
147- - name : " Select toolchain"
148- uses : dtolnay/rust-toolchain@stable
149- - name : " Set dependencies"
150- run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
151- - name : " Run test script"
152- run : ./maintainer-tools/ci/run_task.sh docs
71+ - uses : Swatinem/rust-cache@v2
72+ - uses : rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
73+ - name : " Run doc tests"
74+ run : cargo rbmt --lock-file ${{ matrix.dep }} docs
15375
15476 Docsrs :
15577 name : Docs - nightly toolchain
156- needs : Prepare
15778 runs-on : ubuntu-latest
15879 env :
15980 BITCOIND_SKIP_DOWNLOAD : " 1"
@@ -164,43 +85,26 @@ jobs:
16485 steps :
16586 - name : " Checkout repo"
16687 uses : actions/checkout@v4
167- - name : " Checkout maintainer tools"
168- uses : actions/checkout@v4
169- with :
170- repository : rust-bitcoin/rust-bitcoin-maintainer-tools
171- ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
172- path : maintainer-tools
173- - name : " Select toolchain"
174- uses : dtolnay/rust-toolchain@v1
175- with :
176- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
177- - name : " Set dependencies"
178- run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
179- - name : " Run test script"
180- run : ./maintainer-tools/ci/run_task.sh docsrs
88+ - uses : Swatinem/rust-cache@v2
89+ - uses : rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
90+ - name : " Run docsrs tests"
91+ run : cargo rbmt --lock-file ${{ matrix.dep }} docsrs
18192
18293 Format : # 1 job, run cargo fmt directly.
18394 name : Format - nightly toolchain
184- needs : Prepare
18595 runs-on : ubuntu-latest
18696 strategy :
18797 fail-fast : false
18898 steps :
18999 - name : " Checkout repo"
190100 uses : actions/checkout@v4
191- - name : " Select toolchain"
192- uses : dtolnay/rust-toolchain@v1
193- with :
194- toolchain : ${{ needs.Prepare.outputs.nightly_version }}
195- - name : " Install rustfmt"
196- run : rustup component add rustfmt
101+ - uses : rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
197102 - name : " Check formatting"
198103 run : |
199- cargo fmt --all -- --check
104+ cargo rbmt fmt --check
200105 ./contrib/fmt-integration-tests.sh
201106 ./contrib/fmt-verify.sh
202107
203-
204108 Verify : # 1 job, run `verify` directly.
205109 name : Verify - stable toolchain
206110 runs-on : ubuntu-latest
@@ -247,8 +151,8 @@ jobs:
247151 steps :
248152 - name : " Checkout repo"
249153 uses : actions/checkout@v4
250- - name : " Select toolchain "
251- uses : dtolnay /rust-toolchain@stable
154+ - uses : Swatinem/rust-cache@v2
155+ - uses : rust-bitcoin /rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 # v0.1.0
252156 - name : " Cache downloaded bitcoind"
253157 uses : actions/cache@v4
254158 with :
0 commit comments