Skip to content

Commit e045300

Browse files
committed
fix CI job for building on MSRV
It turns out that dtolnay/rust-toolchain sets the installed toolchain as the global default, but rustup prioritizes our rust-toolchain.toml. Instead, set an environment variable. RUSTUP_TOOLCHAIN has a higher priority than rust-toolchain.toml [^1]. [^1]: https://rust-lang.github.io/rustup/overrides.html#overrides
1 parent f85f015 commit e045300

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- nightly
2727
- 1.59
2828
runs-on: ubuntu-latest
29+
env:
30+
# rustup prioritizes environment variables over rust-toolchain.toml files.
31+
RUSTUP_TOOLCHAIN: ${{ matrix.rust }}
2932
steps:
3033
- uses: actions/checkout@v4
3134
- uses: dtolnay/rust-toolchain@master

0 commit comments

Comments
 (0)