Skip to content

Commit 33ec3e8

Browse files
committed
ci: Add a libm MSRV check
Add the job from rust-lang/libm
1 parent 98cdc8e commit 33ec3e8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/main.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,26 @@ jobs:
226226
- uses: Swatinem/rust-cache@v2
227227
- run: ./ci/miri.sh
228228

229+
msrv:
230+
name: Check libm MSRV
231+
runs-on: ubuntu-24.04
232+
timeout-minutes: 10
233+
env:
234+
RUSTFLAGS: # No need to check warnings on old MSRV, unset `-Dwarnings`
235+
steps:
236+
- uses: actions/checkout@master
237+
- name: Install Rust
238+
run: |
239+
msrv="$(perl -ne 'print if s/rust-version\s*=\s*"(.*)"/\1/g' libm/Cargo.toml)"
240+
echo "MSRV: $msrv"
241+
rustup update "$msrv" --no-self-update && rustup default "$msrv"
242+
- uses: Swatinem/rust-cache@v2
243+
- run: |
244+
# FIXME(msrv): Remove the workspace Cargo.toml so 1.63 cargo doesn't see
245+
# `edition = "2024"` and get spooked.
246+
rm Cargo.toml
247+
cargo build --manifest-path libm/Cargo.toml
248+
229249
rustfmt:
230250
name: Rustfmt
231251
runs-on: ubuntu-24.04
@@ -242,6 +262,7 @@ jobs:
242262
- benchmarks
243263
- clippy
244264
- miri
265+
- msrv
245266
- rustfmt
246267
- test
247268
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)