Skip to content

Commit de79fa9

Browse files
authored
ci(rust): verify MSRV of each package (#2996)
Related to #2739 Verify on CI that the MSRV specification for each package is correct using the command based on the cargo-msrv (copied from the arrow-rs repo).
1 parent fd85000 commit de79fa9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/rust.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,23 @@ jobs:
143143
pushd rust
144144
cargo doc --workspace --all-features
145145
popd
146+
- name: Verify MSRV (Minimum Supported Rust Version)
147+
if: matrix.os == 'ubuntu-latest'
148+
working-directory: rust
149+
run: |
150+
# Install cargo-msrv
151+
cargo_msrv_version="v0.18.4"
152+
cargo_msrv_hash="367a48e4ad014b119bf728a9e95e863575e02fdf6cf95ae24f44ca73b445ee14"
153+
cargo_msrv_archive="cargo-msrv.tgz"
154+
155+
curl -L "https://github.com/foresterre/cargo-msrv/releases/download/${cargo_msrv_version}/cargo-msrv-x86_64-unknown-linux-gnu-${cargo_msrv_version}.tgz" -o "${cargo_msrv_archive}"
156+
echo "${cargo_msrv_hash} ${cargo_msrv_archive}" | sha256sum -c -
157+
tar xz -f "${cargo_msrv_archive}" --wildcards --strip-components=1 -C "$HOME/.local/bin" "*/cargo-msrv"
158+
rm "${cargo_msrv_archive}"
159+
160+
# Verify MSRV for each package
161+
find . -mindepth 2 -name Cargo.toml | while read -r dir
162+
do
163+
echo "Checking package '$dir'"
164+
cargo msrv verify --manifest-path "$dir" || exit 1
165+
done

0 commit comments

Comments
 (0)