Skip to content

Commit 482c0f1

Browse files
ci: Add job to check the MSRV build of uefi-raw
The `uefi-raw` package has a lower MSRV than the `uefi` package, so it needs to be tested separately.
1 parent 8341c0c commit 482c0f1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,25 @@ jobs:
134134
run: |
135135
cargo --version
136136
cargo build --target x86_64-unknown-uefi -p uefi-test-runner
137+
# The uefi-raw crate has its own MSRV. Check that the crate builds correctly
138+
# with that version of the toolchain.
139+
build_msrv_raw:
140+
name: Build (uefi-raw MSRV)
141+
runs-on: ubuntu-latest
142+
steps:
143+
- name: Checkout sources
144+
uses: actions/checkout@v4
145+
- name: Set toolchain
146+
run: |
147+
# Extract the MSRV using cargo.
148+
msrv=$(cargo metadata --no-deps --format-version=1 | jq --raw-output '.packages[] | select(.name == "uefi-raw") | .rust_version')
149+
echo "MSRV: ${msrv}"
150+
# Set the MSRV in the toolchain config.
151+
sed -i "s:stable:${msrv}:" rust-toolchain.toml
152+
- name: Build
153+
run: |
154+
cargo --version
155+
cargo build -p uefi-raw
137156
# This job requires the nightly channel, but keep it as a separate job from
138157
# `nightly_channel` because it takes a while to run.
139158
build_feature_permutations:

0 commit comments

Comments
 (0)