ci: Update version checks for installing Rust tools

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1604>
This commit is contained in:
Sebastian Dröge 2024-11-29 11:05:22 +02:00
parent 20f9ba8728
commit 9f8f349ee7
2 changed files with 9 additions and 28 deletions

View file

@ -27,33 +27,19 @@ if [ "$RUST_IMAGE_FULL" = "1" ]; then
rustup component add rustfmt
cargo install --locked cargo-deny
if [ "$RUST_VERSION" = "1.71.1" ]; then
cargo install --locked cargo-outdated
else
# Don't use --locked because time-0.3.30 does not build with 1.80 or newer
cargo install cargo-outdated
fi
# Don't use --locked because time-0.3.30 does not build with 1.80 or newer
cargo install cargo-outdated
cargo install --locked typos-cli --version "1.19.0"
# Coverage tools
rustup component add llvm-tools-preview
if [ "$RUST_VERSION" = "1.71.1" ]; then
cargo install --locked grcov
else
# Don't use --locked because time-0.3.30 does not build with 1.80 or newer
cargo install grcov
fi
cargo install --locked grcov
fi
# Multiple dependencies of cargo-nextest require 1.74/1.75 nowadays
if [ "$RUST_VERSION" = "1.71.1" ]; then
cargo install --locked cargo-nextest@0.9.67
else
cargo install --locked cargo-nextest
fi
cargo install --locked cargo-nextest
if [ "$RUST_VERSION" = "1.71.1" ]; then
cargo install --locked cargo-c --version 0.9.26+cargo-0.74
if [ "$RUST_VERSION" = "1.80.1" ]; then
cargo install --locked cargo-c --version 0.10.5+cargo-0.83
else
cargo install --locked cargo-c --version 0.10.7+cargo-0.84
fi

View file

@ -4,8 +4,8 @@ rustup --version
rustc --version
cargo --version
if ("$env:RUST_VERSION" -eq "1.71.1") {
cargo install --locked cargo-c --version 0.9.26+cargo-0.74
if ("$env:RUST_VERSION" -eq "1.80.1") {
cargo install --locked cargo-c --version 0.10.5+cargo-0.93
} else {
cargo install --locked cargo-c --version 0.10.7+cargo-0.84
}
@ -15,12 +15,7 @@ if (!$?) {
Exit 1
}
# Multiple dependencies of cargo-nextest require 1.74/1.75 nowadays
if ("$env:RUST_VERSION" -eq "1.71.1") {
cargo install --locked cargo-nextest@0.9.67
} else {
cargo install --locked cargo-nextest
}
cargo install --locked cargo-nextest
if (!$?) {
Write-Host "Failed to install cargo-nextest"