mirror of
https://github.com/danbulant/oxc
synced 2026-05-21 21:29:01 +00:00
chore(ci): enforce msrv in parts of our CI. (#4879)
closes #4874 
This commit is contained in:
parent
81fd6379e8
commit
a9c729a197
1 changed files with 6 additions and 1 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -67,7 +67,12 @@ jobs:
|
|||
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
|
||||
shell: bash
|
||||
run: |
|
||||
sed -i -e 's/profile = "default"/profile = "minimal"/g' rust-toolchain.toml
|
||||
# This `awk` command will find the value of our Minimum Supported Rust Version and store it as `MSRV`.
|
||||
# NOTE: this will fail if there are any other items named `rust-version`. We assume there is only one in our `Cargo.toml`.
|
||||
MSRV=$(awk -F'=' '/rust-version/ {gsub(/[" ]/, "", $2); printf "%s", ($2 + "")}' Cargo.toml)
|
||||
# Set profile to minimal and channel to our Minimum Supported Rust Version.
|
||||
# Running our tests on this channel ensures that our code uses APIs that are supported in our `MSRV`.
|
||||
sed -i -e 's/profile = "default"/profile = "minimal"/g' -e "s/channel = .*/channel = \"$MSRV\"/g" rust-toolchain.toml
|
||||
rustup set profile minimal
|
||||
rustup show
|
||||
git restore .
|
||||
|
|
|
|||
Loading…
Reference in a new issue