From cb3d917289bfa49fa269a5b06f5cc36c90b8a0a9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 3 Oct 2025 17:43:40 -0400 Subject: [PATCH] ci: Add script to install BullseyeCoverage in Linux jobs --- .gitlab/ci/bullseye-env.sh | 14 ++++++++++++++ .gitlab/ci/bullseye.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .gitlab/ci/bullseye-env.sh create mode 100755 .gitlab/ci/bullseye.sh diff --git a/.gitlab/ci/bullseye-env.sh b/.gitlab/ci/bullseye-env.sh new file mode 100644 index 0000000000..d3aa9d72bc --- /dev/null +++ b/.gitlab/ci/bullseye-env.sh @@ -0,0 +1,14 @@ +# Install Bullseye +.gitlab/ci/bullseye.sh +unset CMAKE_CI_BULLSEYE_LICENSE + +# Make Bullseye tools available but do not override compilers. +export PATH="$PATH:/opt/bullseye/bin" + +# Print the Bullseye startup banner once. +covc --help 2>&1 | head -1 + +# Suppress the Bullseye startup banner. +for tool in cov01 covc; do + echo "--no-banner" > "/opt/bullseye/bin/$tool.cfg" +done diff --git a/.gitlab/ci/bullseye.sh b/.gitlab/ci/bullseye.sh new file mode 100755 index 0000000000..8c4cd2bac9 --- /dev/null +++ b/.gitlab/ci/bullseye.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +set -e + +if ! test -f "$CMAKE_CI_BULLSEYE_LICENSE"; then + echo "No CMAKE_CI_BULLSEYE_LICENSE file provided!" + exit 1 +fi + +readonly version="9.22.3" + +case "$(uname -s)-$(uname -m)" in + Linux-x86_64) + tarball="BullseyeCoverage-$version-Linux-x64.tar.xz" + sha256sum="d5be7e65d9363161b67fa77a30407c7c200d995af79a422c4e2e278802ba0776" + shatool="sha256sum" + ;; + *) + echo "Unrecognized platform $(uname -s)-$(uname -m)" + exit 1 + ;; +esac +readonly shatool +readonly sha256sum + +# See https://www.bullseye.com/download-archive for original archives. +# This URL is only visible inside of Kitware's network. +baseurl="https://cmake.org/files/dependencies/internal/bullseye" + +dirname="BullseyeCoverage-$version" +echo "$sha256sum $tarball" > bullseye.sha256sum +curl -OL "$baseurl/$tarball" +$shatool --check bullseye.sha256sum +tar xJf "$tarball" +"$dirname/install" --key "$(<"$CMAKE_CI_BULLSEYE_LICENSE")" --prefix=/opt/bullseye +rm -r "$dirname" "$tarball" bullseye.sha256sum "$CMAKE_CI_BULLSEYE_LICENSE"