mesa/.gitlab-ci/container/build-llvm-spirv.sh
David Heidelberg 848f59deda ci: bump from Debian 11 (bullseye) to 12 (bookworm)
Already in hard-freeze, so we don't have to worry about breaking changes.

Significant changes:
 - LLVM 15 is used instead of 11 or 13
 - /dev/shm has to be manually mounted
 - Debian 12 uses libdrm 2.4.114
 - reworked creating of rootfs, from debootstrap to mmdebstrap
 - split `create-rootfs.sh` into `lava_build.sh`, `setup-rootfs.sh`, and `strip-rootfs.sh`
 - dropped winehq repository for now (Debian wine is up-to-date enough)
 - we use wine now, no need to call explicitly call wine64
 - bumped libasan from version 6 to 8

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21977>
2023-05-25 16:06:51 +02:00

23 lines
652 B
Bash

#!/usr/bin/env bash
set -ex
VER="${LLVM_VERSION:?llvm not set}.0.0"
curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \
-O "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${VER}.tar.gz"
tar -xvf "v${VER}.tar.gz" && rm "v${VER}.tar.gz"
mkdir "SPIRV-LLVM-Translator-${VER}/build"
pushd "SPIRV-LLVM-Translator-${VER}/build"
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
ninja
ninja install
# For some reason llvm-spirv is not installed by default
ninja llvm-spirv
cp tools/llvm-spirv/llvm-spirv /usr/bin/
popd
du -sh "SPIRV-LLVM-Translator-${VER}"
rm -rf "SPIRV-LLVM-Translator-${VER}"