@@ -120,13 +120,39 @@ jobs:
120
120
- name : Checkout sources
121
121
uses : actions/checkout@v4
122
122
- name : Set toolchain
123
- run : cp .github/workflows/msrv_toolchain.toml rust-toolchain.toml
123
+ run : |
124
+ # Extract the MSRV using cargo.
125
+ msrv=$(cargo metadata --no-deps --format-version=1 | jq --raw-output '.packages[] | select(.name == "uefi") | .rust_version')
126
+ echo "MSRV: ${msrv}"
127
+ # Set the MSRV in the toolchain config.
128
+ sed -i "s:stable:${msrv}:" rust-toolchain.toml
124
129
- uses : Swatinem/rust-cache@v2
125
130
- name : Build
126
131
# Build uefi-test-runner since its dependency tree includes all the
127
132
# library packages. Note that xtask isn't used or built here; since it's
128
133
# just a dev tool we don't care about the MSRV for that package.
129
- run : cargo build --target x86_64-unknown-uefi -p uefi-test-runner
134
+ run : |
135
+ cargo --version
136
+ 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
130
156
# This job requires the nightly channel, but keep it as a separate job from
131
157
# `nightly_channel` because it takes a while to run.
132
158
build_feature_permutations :
0 commit comments