CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
57 lines
1.8 KiB
Bash
57 lines
1.8 KiB
Bash
#!/bin/bash
|
|
|
|
# Note that this script is not actually "building" rust, but build- is the
|
|
# convention for the shared helpers for putting stuff in our containers.
|
|
|
|
set -ex
|
|
|
|
section_start rust "Building Rust toolchain"
|
|
|
|
# When changing this file, you need to bump the following
|
|
# .gitlab-ci/image-tags.yml tags:
|
|
# ALPINE_X86_64_BUILD_TAG
|
|
# DEBIAN_BUILD_BASE_TAG
|
|
# DEBIAN_TEST_BASE_TAG
|
|
# FEDORA_X86_64_BUILD_TAG
|
|
|
|
MINIMUM_SUPPORTED_RUST_VERSION=$(python3 -c 'import tomllib; print(tomllib.load(open("clippy.toml", "rb"))["msrv"])')
|
|
|
|
# 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.96.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 $LATEST_RUST_VERSION \
|
|
--profile minimal \
|
|
--component clippy,rustfmt \
|
|
-y
|
|
|
|
# Make rustup tools available in the PATH environment variable
|
|
# shellcheck disable=SC1091
|
|
. "$HOME/.cargo/env"
|
|
|
|
if [ "$1" = "build" ]
|
|
then
|
|
rustup toolchain install --profile minimal --component clippy,rustfmt "$MINIMUM_SUPPORTED_RUST_VERSION"
|
|
fi
|
|
|
|
find "$HOME"/.rustup/toolchains/*/lib -type f -name "*.so" -exec strip {} \;
|
|
find "$HOME"/.rustup/toolchains -type f -executable -exec strip {} \;
|
|
|
|
# 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
|
|
[target.armv7-unknown-linux-gnueabihf]
|
|
linker = "arm-linux-gnueabihf-gcc"
|
|
|
|
[target.aarch64-unknown-linux-gnu]
|
|
linker = "aarch64-linux-gnu-gcc"
|
|
EOF
|
|
|
|
section_end rust
|