1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

ci: Add script to install BullseyeCoverage in Linux jobs

This commit is contained in:
Brad King
2025-10-03 17:43:40 -04:00
parent 2548b6e24d
commit cb3d917289
2 changed files with 50 additions and 0 deletions

View File

@@ -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

36
.gitlab/ci/bullseye.sh Executable file
View File

@@ -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"