Skip to content

Commit 2019e97

Browse files
committed
ci: pin nightly compiler version
Don't bother with the cronjob to update this. We'll just leave the nightly compiler version fixed forever on these old versions (or update it on an ad-hoc basis).
1 parent 22ce32a commit 2019e97

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

.github/workflows/rust.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ on: # yamllint disable-line rule:truthy
99
name: Continuous integration
1010

1111
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+
1223
Stable: # 2 jobs, one per lock file.
1324
name: Test - stable toolchain
1425
runs-on: ubuntu-latest
@@ -33,6 +44,7 @@ jobs:
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
@@ -47,7 +59,9 @@ jobs:
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"
@@ -79,6 +93,7 @@ jobs:
7993

8094
Lint:
8195
name: Lint - nightly toolchain
96+
needs: Prepare
8297
runs-on: ubuntu-latest
8398
strategy:
8499
fail-fast: false
@@ -93,7 +108,9 @@ jobs:
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

nightly-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nightly-2025-03-21

0 commit comments

Comments
 (0)