ci: use MSRV for build-for-tests jobs and recent version in build-only jobs and CI components
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
This commit is contained in:
committed by
Marge Bot
parent
a8f49aa5f2
commit
be825ee11f
@@ -66,7 +66,7 @@ pip3 install --break-system-packages sphinx===8.2.3 hawkmoth===0.19.0
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-rust.sh build
|
||||
|
||||
EXTRA_MESON_ARGS='--prefix=/usr' \
|
||||
. .gitlab-ci/container/build-wayland.sh
|
||||
|
||||
@@ -14,15 +14,21 @@ section_start rust "Building Rust toolchain"
|
||||
|
||||
# This version number should match what we require in meson.build so we catch
|
||||
# build issues from patches relying on new features in newer Rust versions.
|
||||
# If we need to bump this, we should also bump the version in meson.build.
|
||||
RUST_VERSION=1.82.0
|
||||
# Keep this is sync with the `rustc.version()` check in meson.build, and with
|
||||
# the `rustup default` line in .gitlab-ci/meson/build.sh
|
||||
MINIMUM_SUPPORTED_RUST_VERSION=1.82.0
|
||||
|
||||
# This version number can be bumped freely, to benefit from the latest
|
||||
# diagnostics in CI `build-only` jobs, and for building external CI
|
||||
# components.
|
||||
LATEST_RUST_VERSION=1.90.0
|
||||
|
||||
# For rust in Mesa, we use rustup to install. This lets us pick an arbitrary
|
||||
# version of the compiler, rather than whatever the container's Debian comes
|
||||
# with.
|
||||
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
--proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
|
||||
--default-toolchain $RUST_VERSION \
|
||||
--default-toolchain $LATEST_RUST_VERSION \
|
||||
--profile minimal \
|
||||
--component clippy,rustfmt \
|
||||
-y
|
||||
@@ -31,6 +37,11 @@ curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
|
||||
# shellcheck disable=SC1091
|
||||
. "$HOME/.cargo/env"
|
||||
|
||||
if [ "$1" = "build" ]
|
||||
then
|
||||
rustup toolchain install --profile minimal --component clippy,rustfmt $MINIMUM_SUPPORTED_RUST_VERSION
|
||||
fi
|
||||
|
||||
# Set up a config script for cross compiling -- cargo needs your system cc for
|
||||
# linking in cross builds, but doesn't know what you want to use for system cc.
|
||||
cat > "$HOME/.cargo/config" <<EOF
|
||||
|
||||
@@ -115,7 +115,7 @@ arch=armhf
|
||||
|
||||
. .gitlab-ci/container/build-libclc.sh
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-rust.sh build
|
||||
|
||||
. .gitlab-ci/container/build-bindgen.sh
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ section_end debian_setup
|
||||
|
||||
############### Install Rust toolchain
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-rust.sh test
|
||||
|
||||
############### Build Crosvm
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ pip3 install --break-system-packages "ci-fairy[s3] @ git+https://gitlab.freedesk
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-rust.sh build
|
||||
|
||||
############### Uninstall ephemeral packages
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ DEBIAN_ARCH=amd64 \
|
||||
|
||||
export ANDROID_NDK_HOME=/$ndk
|
||||
export RUST_TARGET=x86_64-linux-android
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-rust.sh test
|
||||
. .gitlab-ci/container/build-deqp-runner.sh
|
||||
|
||||
# Properly uninstall rustup including cargo and init scripts on shells
|
||||
|
||||
@@ -103,7 +103,7 @@ rm -rf $XORGMACROS_VERSION
|
||||
|
||||
. .gitlab-ci/container/install-meson.sh
|
||||
|
||||
. .gitlab-ci/container/build-rust.sh
|
||||
. .gitlab-ci/container/build-rust.sh build
|
||||
|
||||
. .gitlab-ci/container/build-bindgen.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user