@@ -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
23
34
uses : actions/checkout@v4
24
35
with :
25
36
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
26
- rev : b2ac115
37
+ ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
27
38
path : maintainer-tools
28
39
- name : " Select toolchain"
29
40
uses : dtolnay/rust-toolchain@stable
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
@@ -46,10 +58,12 @@ jobs:
46
58
uses : actions/checkout@v4
47
59
with :
48
60
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
49
- rev : b2ac115
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"
69
83
uses : actions/checkout@v4
70
84
with :
71
85
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
72
- rev : b2ac115
86
+ ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
73
87
path : maintainer-tools
74
88
- name : " Select toolchain"
75
89
uses : dtolnay/rust-toolchain@stable
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
@@ -94,10 +109,12 @@ jobs:
94
109
uses : actions/checkout@v4
95
110
with :
96
111
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
97
- rev : b2ac115
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"
@@ -119,7 +136,7 @@ jobs:
119
136
uses : actions/checkout@v4
120
137
with :
121
138
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
122
- rev : b2ac115
139
+ ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
123
140
path : maintainer-tools
124
141
- name : " Select toolchain"
125
142
uses : dtolnay/rust-toolchain@stable
@@ -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
@@ -142,17 +160,20 @@ jobs:
142
160
uses : actions/checkout@v4
143
161
with :
144
162
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
145
- rev : b2ac115
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
@@ -165,29 +186,34 @@ jobs:
165
186
uses : actions/checkout@v4
166
187
with :
167
188
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
168
- rev : b2ac115
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