@@ -9,6 +9,17 @@ on: # yamllint disable-line rule:truthy
9
9
name : Continuous integration
10
10
11
11
jobs :
12
+ Prepare :
13
+ runs-on : ubuntu-24.04
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
+
12
23
Stable : # 2 jobs, one per lock file.
13
24
name : Test - stable toolchain
14
25
runs-on : ubuntu-latest
34
45
35
46
Nightly : # 2 jobs, one per lock file.
36
47
name : Test - nightly toolchain
48
+ needs : Prepare
37
49
runs-on : ubuntu-latest
38
50
strategy :
39
51
fail-fast : false
49
61
ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
50
62
path : maintainer-tools
51
63
- name : " Select toolchain"
52
- uses : dtolnay/rust-toolchain@nightly
64
+ uses : dtolnay/rust-toolchain@v1
65
+ with :
66
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
53
67
- name : " Set dependencies"
54
68
run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
55
69
- name : " Run test script"
82
96
83
97
Lint :
84
98
name : Lint - nightly toolchain
99
+ needs : Prepare
85
100
runs-on : ubuntu-latest
86
101
strategy :
87
102
fail-fast : false
97
112
ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
98
113
path : maintainer-tools
99
114
- name : " Select toolchain"
100
- uses : dtolnay/rust-toolchain@nightly
115
+ uses : dtolnay/rust-toolchain@v1
116
+ with :
117
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
101
118
- name : " Install clippy"
102
119
run : rustup component add clippy
103
120
- name : " Set dependencies"
@@ -130,6 +147,7 @@ jobs:
130
147
131
148
Docsrs :
132
149
name : Docs - nightly toolchain
150
+ needs : Prepare
133
151
runs-on : ubuntu-latest
134
152
strategy :
135
153
fail-fast : false
@@ -145,14 +163,17 @@ jobs:
145
163
ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
146
164
path : maintainer-tools
147
165
- name : " Select toolchain"
148
- uses : dtolnay/rust-toolchain@nightly
166
+ uses : dtolnay/rust-toolchain@v1
167
+ with :
168
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
149
169
- name : " Set dependencies"
150
170
run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
151
171
- name : " Run test script"
152
172
run : ./maintainer-tools/ci/run_task.sh docsrs
153
173
154
174
Bench :
155
175
name : Bench - nightly toolchain
176
+ needs : Prepare
156
177
runs-on : ubuntu-latest
157
178
strategy :
158
179
fail-fast : false
@@ -168,26 +189,31 @@ jobs:
168
189
ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
169
190
path : maintainer-tools
170
191
- name : " Select toolchain"
171
- uses : dtolnay/rust-toolchain@nightly
192
+ uses : dtolnay/rust-toolchain@v1
193
+ with :
194
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
172
195
- name : " Set dependencies"
173
196
run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
174
197
- name : " Run test script"
175
198
run : ./maintainer-tools/ci/run_task.sh bench
176
199
177
200
Format : # 1 job, run cargo fmt directly.
178
201
name : Format - nightly toolchain
202
+ needs : Prepare
179
203
runs-on : ubuntu-latest
180
204
strategy :
181
205
fail-fast : false
182
206
steps :
183
207
- name : " Checkout repo"
184
208
uses : actions/checkout@v4
185
209
- name : " Select toolchain"
186
- uses : dtolnay/rust-toolchain@nightly
210
+ uses : dtolnay/rust-toolchain@v1
211
+ with :
212
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
187
213
- name : " Install rustfmt"
188
214
run : rustup component add rustfmt
189
215
- name : " Check formatting"
190
- run : cargo +nightly fmt --all -- --check
216
+ run : cargo fmt --all -- --check
191
217
192
218
Integration : # 1 job for each bitcoind version we support.
193
219
name : Integration tests - stable toolchain
0 commit comments