Refresh build scripts

Removed Ubuntu 20.04 support from build scripts.
Updated `add-apt-repository` section to current versions.
Unified buildSLT.sh to versions in buildIGC.sh.
This commit is contained in:
Michał Krause
2025-10-24 11:40:47 +00:00
committed by igcbot
parent 06dfb54d9b
commit ecf98ed502
2 changed files with 14 additions and 41 deletions

View File

@ -2,14 +2,14 @@
#=========================== begin_copyright_notice ============================
#
# Copyright (C) 2022 Intel Corporation
# Copyright (C) 2022-2025 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
#============================ end_copyright_notice =============================
set -e
# UBUNTU_VERSION supported value [ 20.04, 22.04, 24.04 ] default 24.04
# UBUNTU_VERSION supported value [ 22.04, 24.04 ] default 24.04
# LLVM_VERSION supported value [ 14, 15, 16 ] default 16
# COMPILER supported value [ gcc, clang ] default gcc
# OWN_CMAKE_FLAGS not suported but can be use as WA (each flag should be with -D prefix) default empty
@ -52,25 +52,12 @@ apt-get update
apt-get install -y flex bison libz-dev cmake curl wget build-essential git software-properties-common unzip file lsb-release python3-mako libc6 libstdc++6 libzstd-dev
echo "[Build Status] flex bison libz-dev cmake curl wget build-essential git software-properties-common unzip file INSTALLED"
if [ "$UBUNTU_VERSION" = "20.04" ]; then
echo "[Build Status] Download new cmake version for Ubuntu 20.04";
apt-get purge -y --auto-remove cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
apt-get update
apt-get install -y cmake
fi
if ([ "$UBUNTU_VERSION" = "20.04" ] && [ "$LLVM_VERSION" -ge 14 ]) || ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 15 ])
if ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 16 ])
then
echo "[Build Status] Retrieve the LLVM archive signature for LLVM $LLVM_VERSION on Ubuntu $UBUNTU_VERSION";
wget -q https://apt.llvm.org/llvm-snapshot.gpg.key
apt-key add llvm-snapshot.gpg.key
case "$UBUNTU_VERSION" in
20.04) OS_HANDLE=focal;;
22.04) OS_HANDLE=jammy;;
esac
add-apt-repository "deb http://apt.llvm.org/$OS_HANDLE/ llvm-toolchain-$OS_HANDLE-$LLVM_VERSION main"
add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$LLVM_VERSION main"
fi
apt-get install -y llvm-"$LLVM_VERSION" llvm-"$LLVM_VERSION"-dev clang-"$LLVM_VERSION" liblld-"$LLVM_VERSION" liblld-"$LLVM_VERSION"-dev

View File

@ -2,29 +2,28 @@
#=========================== begin_copyright_notice ============================
#
# Copyright (C) 2022 Intel Corporation
# Copyright (C) 2022-2025 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
#============================ end_copyright_notice =============================
set -e
# UBUNTU_VERSION supported value [ 20, 22 ] default 20
# LLVM_VERSION supported value [ 10, 11, 12, 13, 14, 15] default 11
# OWN_CMAKE_FLAGS not suported but can be use as WA (each flag should be with -D prefix) default empty
# example run: UBUNTU_VERSION=ubuntu2004 LLVM_VERSION=11 sh /home/buildSLT.sh
# UBUNTU_VERSION supported value [ 22.04, 24.04 ] default 24.04
# LLVM_VERSION supported value [ 14, 15, 16 ] default 16
# example run: UBUNTU_VERSION=24.04 LLVM_VERSION=16 sh /home/buildSLT.sh
echo "====================BUILD SPIRV-LLVM-Translator========================="
echo "[Build Status] build script started"
if [ -z ${UBUNTU_VERSION+x} ]; then
echo "[Build Status] UBUNTU_VERSION is unset, use default 20";
UBUNTU_VERSION="20.04"
echo "[Build Status] UBUNTU_VERSION is unset, use default 24.04";
UBUNTU_VERSION="24.04"
else
echo "[Build Status] UBUNTU_VERSION = ${UBUNTU_VERSION}"
fi
if [ -z ${LLVM_VERSION+x} ]; then
echo "[Build Status] LLVM_VERSION is unset, use default 14";
LLVM_VERSION="14"
echo "[Build Status] LLVM_VERSION is unset, use default 16";
LLVM_VERSION="16"
else
echo "[Build Status] LLVM_VERSION = ${LLVM_VERSION}"
fi
@ -33,25 +32,12 @@ apt-get update
apt-get install -y flex bison libz-dev cmake curl wget build-essential git software-properties-common unzip lsb-release
echo "[Build Status] flex bison libz-dev cmake curl wget build-essential git software-properties-common INSTALLED"
if [ "$UBUNTU_VERSION" = "20.04" ]; then
echo "[Build Status] Download new cmake version for Ubuntu 20.04";
apt-get purge -y --auto-remove cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
apt-get update
apt-get install -y cmake
fi
if ([ "$UBUNTU_VERSION" = "20.04" ] && [ "$LLVM_VERSION" -ge 14 ]) || ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 15 ])
if ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 16 ])
then
echo "[Build Status] Retrieve the LLVM archive signature for LLVM $LLVM_VERSION on Ubuntu $UBUNTU_VERSION";
wget -q https://apt.llvm.org/llvm-snapshot.gpg.key
apt-key add llvm-snapshot.gpg.key
case "$UBUNTU_VERSION" in
20.04) OS_HANDLE=focal;;
22.04) OS_HANDLE=jammy;;
esac
add-apt-repository "deb http://apt.llvm.org/$OS_HANDLE/ llvm-toolchain-$OS_HANDLE-$LLVM_VERSION main"
add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$LLVM_VERSION main"
fi
apt-get install -y llvm-"$LLVM_VERSION" llvm-"$LLVM_VERSION"-dev clang-"$LLVM_VERSION" liblld-"$LLVM_VERSION" liblld-"$LLVM_VERSION"-dev