@@ -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
3344
3445 Nightly : # 2 jobs, one per lock file.
3546 name : Test - nightly toolchain
47+ needs : Prepare
3648 runs-on : ubuntu-latest
3749 strategy :
3850 fail-fast : false
4759 repository : rust-bitcoin/rust-bitcoin-maintainer-tools
4860 path : maintainer-tools
4961 - name : " Select toolchain"
50- uses : dtolnay/rust-toolchain@nightly
62+ uses : dtolnay/rust-toolchain@v1
63+ with :
64+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
5165 - name : " Set dependencies"
5266 run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
5367 - name : " Run test script"
7993
8094 Lint :
8195 name : Lint - nightly toolchain
96+ needs : Prepare
8297 runs-on : ubuntu-latest
8398 strategy :
8499 fail-fast : false
93108 repository : rust-bitcoin/rust-bitcoin-maintainer-tools
94109 path : maintainer-tools
95110 - name : " Select toolchain"
96- uses : dtolnay/rust-toolchain@nightly
111+ uses : dtolnay/rust-toolchain@v1
112+ with :
113+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
97114 - name : " Install clippy"
98115 run : rustup component add clippy
99116 - name : " Set dependencies"
@@ -125,6 +142,7 @@ jobs:
125142
126143 Docsrs :
127144 name : Docs - nightly toolchain
145+ needs : Prepare
128146 runs-on : ubuntu-latest
129147 strategy :
130148 fail-fast : false
@@ -139,7 +157,9 @@ jobs:
139157 repository : rust-bitcoin/rust-bitcoin-maintainer-tools
140158 path : maintainer-tools
141159 - name : " Select toolchain"
142- uses : dtolnay/rust-toolchain@nightly
160+ uses : dtolnay/rust-toolchain@v1
161+ with :
162+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
143163 - name : " Set dependencies"
144164 run : cp Cargo-${{ matrix.dep }}.lock Cargo.lock
145165 - name : " Run test script"
@@ -198,6 +218,7 @@ jobs:
198218 run : ./contrib/integration_test.sh
199219
200220 Embedded :
221+ needs : Prepare
201222 runs-on : ubuntu-latest
202223 steps :
203224 - name : Checkout
@@ -208,7 +229,7 @@ jobs:
208229 uses : actions-rs/toolchain@v1
209230 with :
210231 profile : minimal
211- toolchain : nightly
232+ toolchain : ${{ needs.Prepare.outputs.nightly_version }}
212233 override : true
213234 components : rust-src
214235 target : thumbv7m-none-eabi
0 commit comments