build: declare Rust 1.92 as the MSRV and check it in CI
rust-version = "1.92" in [workspace.package], inherited by every crate. 1.92 is the floor: wgpu (clawhdf5-gpu) requires it, and the whole workspace, Python bindings included, checks cleanly on it. ci-test.sh reads the version from Cargo.toml and checks the workspace on exactly that toolchain, so the manifests and the README badge cannot drift from what actually builds. The badge said 1.75, below edition 2024's own floor. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
@@ -106,6 +106,21 @@ no_c_in_default_build() {
|
||||
}
|
||||
run_step "no C in the default build (core crates)" no_c_in_default_build
|
||||
|
||||
# The workspace declares a minimum Rust version (rust-version in Cargo.toml);
|
||||
# check that it really builds there, so the README badge and the manifests
|
||||
# cannot drift from the truth. Separate target dir: a different toolchain
|
||||
# would otherwise invalidate the main build.
|
||||
msrv_check() {
|
||||
local msrv
|
||||
msrv=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' "$SCRIPT_DIR/../Cargo.toml")
|
||||
[ -n "$msrv" ] || { echo "no rust-version in Cargo.toml"; return 1; }
|
||||
rustup toolchain install "$msrv" --profile minimal >/dev/null || return 1
|
||||
echo "checking with Rust $msrv"
|
||||
CARGO_TARGET_DIR="$SCRIPT_DIR/../target/msrv" cargo "+$msrv" check \
|
||||
--workspace --exclude clawhdf5-py --all-targets
|
||||
}
|
||||
run_step "MSRV check" msrv_check
|
||||
|
||||
# 4. Tests (exclude clawhdf5-py)
|
||||
run_step "cargo test" cargo test \
|
||||
--workspace \
|
||||
|
||||
Reference in New Issue
Block a user