@@ -9,6 +9,17 @@ on: # yamllint disable-line rule:truthy
99name : Continuous integration
1010
1111jobs :
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+
1223 Stable : # 2 jobs, one per lock file.
1324 name : Test - stable toolchain
1425 runs-on : ubuntu-latest
3445
3546 Nightly : # 2 jobs, one per lock file.
3647 name : Test - nightly toolchain
48+ needs : Prepare
3749 runs-on : ubuntu-latest
3850 strategy :
3951 fail-fast : false
4961 ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
5062 path : maintainer-tools
5163 - name : " Select toolchain"
52- uses : dtolnay/rust-toolchain@nightly
64+ uses : dtolnay/rust-toolchain@v1
65+ with :
66+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
5367 - name : " Set dependencies"
5468 run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
5569 - name : " Run test script"
8296
8397 Lint :
8498 name : Lint - nightly toolchain
99+ needs : Prepare
85100 runs-on : ubuntu-latest
86101 strategy :
87102 fail-fast : false
97112 ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
98113 path : maintainer-tools
99114 - name : " Select toolchain"
100- uses : dtolnay/rust-toolchain@nightly
115+ uses : dtolnay/rust-toolchain@v1
116+ with :
117+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
101118 - name : " Install clippy"
102119 run : rustup component add clippy
103120 - name : " Set dependencies"
@@ -130,6 +147,7 @@ jobs:
130147
131148 Docsrs :
132149 name : Docs - nightly toolchain
150+ needs : Prepare
133151 runs-on : ubuntu-latest
134152 strategy :
135153 fail-fast : false
@@ -145,14 +163,17 @@ jobs:
145163 ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
146164 path : maintainer-tools
147165 - name : " Select toolchain"
148- uses : dtolnay/rust-toolchain@nightly
166+ uses : dtolnay/rust-toolchain@v1
167+ with :
168+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
149169 - name : " Set dependencies"
150170 run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
151171 - name : " Run test script"
152172 run : ./maintainer-tools/ci/run_task.sh docsrs
153173
154174 Bench :
155175 name : Bench - nightly toolchain
176+ needs : Prepare
156177 runs-on : ubuntu-latest
157178 strategy :
158179 fail-fast : false
@@ -168,26 +189,31 @@ jobs:
168189 ref : c3324024ced9bb1eb854397686919c3ff7d97e1e
169190 path : maintainer-tools
170191 - name : " Select toolchain"
171- uses : dtolnay/rust-toolchain@nightly
192+ uses : dtolnay/rust-toolchain@v1
193+ with :
194+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
172195 - name : " Set dependencies"
173196 run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
174197 - name : " Run test script"
175198 run : ./maintainer-tools/ci/run_task.sh bench
176199
177200 Format : # 1 job, run cargo fmt directly.
178201 name : Format - nightly toolchain
202+ needs : Prepare
179203 runs-on : ubuntu-latest
180204 strategy :
181205 fail-fast : false
182206 steps :
183207 - name : " Checkout repo"
184208 uses : actions/checkout@v4
185209 - name : " Select toolchain"
186- uses : dtolnay/rust-toolchain@nightly
210+ uses : dtolnay/rust-toolchain@v1
211+ with :
212+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
187213 - name : " Install rustfmt"
188214 run : rustup component add rustfmt
189215 - name : " Check formatting"
190- run : cargo +nightly fmt --all -- --check
216+ run : cargo fmt --all -- --check
191217
192218 Integration : # 1 job for each bitcoind version we support.
193219 name : Integration tests - stable toolchain
0 commit comments