@@ -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
33
44
34
45
Nightly : # 2 jobs, one per lock file.
35
46
name : Test - nightly toolchain
47
+ needs : Prepare
36
48
runs-on : ubuntu-latest
37
49
strategy :
38
50
fail-fast : false
47
59
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
48
60
path : maintainer-tools
49
61
- name : " Select toolchain"
50
- uses : dtolnay/rust-toolchain@nightly
62
+ uses : dtolnay/rust-toolchain@v1
63
+ with :
64
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
51
65
- name : " Set dependencies"
52
66
run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
53
67
- name : " Run test script"
79
93
80
94
Lint :
81
95
name : Lint - nightly toolchain
96
+ needs : Prepare
82
97
runs-on : ubuntu-latest
83
98
strategy :
84
99
fail-fast : false
93
108
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
94
109
path : maintainer-tools
95
110
- name : " Select toolchain"
96
- uses : dtolnay/rust-toolchain@nightly
111
+ uses : dtolnay/rust-toolchain@v1
112
+ with :
113
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
97
114
- name : " Install clippy"
98
115
run : rustup component add clippy
99
116
- name : " Set dependencies"
@@ -125,6 +142,7 @@ jobs:
125
142
126
143
Docsrs :
127
144
name : Docs - nightly toolchain
145
+ needs : Prepare
128
146
runs-on : ubuntu-latest
129
147
strategy :
130
148
fail-fast : false
@@ -139,7 +157,9 @@ jobs:
139
157
repository : rust-bitcoin/rust-bitcoin-maintainer-tools
140
158
path : maintainer-tools
141
159
- name : " Select toolchain"
142
- uses : dtolnay/rust-toolchain@nightly
160
+ uses : dtolnay/rust-toolchain@v1
161
+ with :
162
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
143
163
- name : " Set dependencies"
144
164
run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
145
165
- name : " Run test script"
@@ -198,6 +218,7 @@ jobs:
198
218
run : ./contrib/integration_test.sh
199
219
200
220
Embedded :
221
+ needs : Prepare
201
222
runs-on : ubuntu-latest
202
223
steps :
203
224
- name : Checkout
@@ -208,7 +229,7 @@ jobs:
208
229
uses : actions-rs/toolchain@v1
209
230
with :
210
231
profile : minimal
211
- toolchain : nightly
232
+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
212
233
override : true
213
234
components : rust-src
214
235
target : thumbv7m-none-eabi
0 commit comments