Skip to content

Commit 4ecb6e0

Browse files
committed
ci: update main workflow to use pinned nightly version
I left the fuzz job alone, which currently pins a specific version of nightly. This is probably fine.
1 parent d543b39 commit 4ecb6e0

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ on: [push, pull_request]
33
name: Continuous integration
44

55
jobs:
6+
Prepare:
7+
runs-on: ubuntu-24.04
8+
outputs:
9+
nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }}
10+
steps:
11+
- name: "Checkout repo"
12+
uses: actions/checkout@v4
13+
- name: "Read nightly version"
14+
id: read_toolchain
15+
run: echo "nightly_version=$(cat nightly-version)" >> $GITHUB_OUTPUT
16+
617
fmt:
718
name: Rustfmt
819
runs-on: ubuntu-latest
@@ -46,14 +57,15 @@ jobs:
4657
4758
test:
4859
name: Tests
60+
needs: Prepare
4961
runs-on: ubuntu-latest
5062
strategy:
5163
fail-fast: false
5264
matrix:
5365
rust:
5466
- stable
5567
- beta
56-
- nightly
68+
- ${{ needs.Prepare.outputs.nightly_version }}
5769
- 1.78.0
5870
steps:
5971
- name: Checkout Crate
@@ -122,12 +134,15 @@ jobs:
122134
123135
docs:
124136
name: Docs
137+
needs: Prepare
125138
runs-on: ubuntu-latest
126139
steps:
127140
- name: Checkout Crate
128141
uses: actions/checkout@v4
129142
- name: Checkout Toolchain
130-
uses: dtolnay/rust-toolchain@nightly
143+
uses: dtolnay/rust-toolchain@v1
144+
with:
145+
toolchain: ${{ needs.Prepare.outputs.nightly_version }}
131146
- name: Check that documentation builds without errors
132147
env:
133148
RUSTDOCFLAGS: "--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links"

0 commit comments

Comments
 (0)