From bcf908c5954a1ce4d45ea0afcf4ba4d66532b404 Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Fri, 20 Mar 2026 12:47:05 -0700 Subject: [PATCH] [Devops] Add CMake PPA Signed-off-by: Nick Sarnie --- devops/scripts/install_build_tools.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/devops/scripts/install_build_tools.sh b/devops/scripts/install_build_tools.sh index d4f930687a90f..9c8e6861ce8c1 100755 --- a/devops/scripts/install_build_tools.sh +++ b/devops/scripts/install_build_tools.sh @@ -1,5 +1,22 @@ #!/bin/bash +set -x +set -e +set -o pipefail + +. /etc/os-release + +apt-get update && \ + apt-get install -yqq ca-certificates gpg wget + +# Install CMake PPA so all Ubuntu versions we use have recent CMake. +# Steps from https://apt.kitware.com/ +wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \ + gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + +echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $VERSION_CODENAME main" | \ + tee /etc/apt/sources.list.d/kitware.list >/dev/null + apt update && apt install -yqq \ build-essential \ cmake \ @@ -16,7 +33,6 @@ apt update && apt install -yqq \ libffi-dev \ libva-dev \ libtool \ - wget \ sudo \ zstd \ zip \ @@ -35,7 +51,6 @@ apt update && apt install -yqq \ # Same as what's done in SPRIV-LLVM-TRANSLATOR: # https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/cec12d6cf46306d0a015e883d5adb5a8200df1c0/.github/workflows/check-out-of-tree-build.yml#L59 # pkg-config is required for llvm-spriv to detect spriv-tools installation. -. /etc/os-release apt update && apt install -yqq pkg-config if [[ "$VERSION_CODENAME" == "jammy" ]]; then