Sfoglia il codice sorgente

ci: Add script to install BullseyeCoverage in Linux jobs

Brad King 3 mesi fa
parent
commit
cb3d917289
2 ha cambiato i file con 50 aggiunte e 0 eliminazioni
  1. 14 0
      .gitlab/ci/bullseye-env.sh
  2. 36 0
      .gitlab/ci/bullseye.sh

+ 14 - 0
.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

+ 36 - 0
.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"