Skip to content

Commit fbbcf06

Browse files
ci: Test the build on an old nightly
Add a CI job that runs `cargo xtask build` with an old nightly. Currently the oldest nightly that works is 2022-04-18. There's nothing particularly magic about that version; we can require a newer version when we deem it appropriate. Having this CI job just makes it easy for us to identify in advance when a PR is going to require a newer nightly, while still allowing other CI jobs to use latest nightly. This change is related to (but not a fix for): #510
1 parent ae7ba25 commit fbbcf06

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/msrv_toolchain.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[toolchain]
2+
# Oldest nightly that currently works with `cargo xtask build`.
3+
channel = "nightly-2022-04-18"
4+
components = ["rust-src"]

.github/workflows/rust.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,21 @@ jobs:
157157

158158
- name: Build
159159
run: cargo xtask build
160+
161+
# Run the build with our current nightly MSRV (specified in
162+
# ./msrv_toolchain.toml). This serves to check that we don't
163+
# accidentally start relying on a new feature without intending
164+
# to. Having a test for this makes it easier for us to be intentional
165+
# about making changes that require a newer version.
166+
build_msrv:
167+
name: Check that the build works on our nightly MSRV
168+
runs-on: ubuntu-latest
169+
steps:
170+
- name: Checkout sources
171+
uses: actions/checkout@v2
172+
173+
- name: Set toolchain
174+
run: cp .github/workflows/msrv_toolchain.toml rust-toolchain.toml
175+
176+
- name: Build
177+
run: cargo xtask build

0 commit comments

Comments
 (0)