mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
ci: Add scripts to install PVS-Studio in Linux jobs
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
/open-watcom*
|
||||
/orangec
|
||||
/pellesc
|
||||
/pvs-studio
|
||||
/python*
|
||||
/qt*
|
||||
/sccache*
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
.gitlab/ci/pvs-studio.sh
|
||||
export PATH=$PWD/.gitlab/pvs-studio/bin:$PATH
|
||||
pvs-studio --version
|
||||
|
||||
if test -f "$CMAKE_CI_PVS_STUDIO_LICENSE_USER" -a -f "$CMAKE_CI_PVS_STUDIO_LICENSE_KEY"; then
|
||||
pvs-studio-analyzer credentials "$(<"$CMAKE_CI_PVS_STUDIO_LICENSE_USER")" "$(<"$CMAKE_CI_PVS_STUDIO_LICENSE_KEY")"
|
||||
else
|
||||
echo "The CMAKE_CI_PVS_STUDIO_LICENSE_USER and CMAKE_CI_PVS_STUDIO_LICENSE_KEY files were not both provided!"
|
||||
exit 1
|
||||
fi
|
||||
rm -f "$CMAKE_CI_PVS_STUDIO_LICENSE_USER" "$CMAKE_CI_PVS_STUDIO_LICENSE_KEY"
|
||||
unset CMAKE_CI_PVS_STUDIO_LICENSE_KEY
|
||||
unset CMAKE_CI_PVS_STUDIO_LICENSE_USER
|
||||
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
readonly version="7.42.105112.761"
|
||||
|
||||
case "$(uname -s)-$(uname -m)" in
|
||||
Linux-x86_64)
|
||||
# https://files.pvs-studio.com/pvs-studio-7.42.105112.761-x86_64.tgz
|
||||
shatool="sha256sum"
|
||||
sha256sum="0ced11d17855cc172a860f8cc19a89f10adb6ab7185992fb57474118e9bdabd7"
|
||||
filename="pvs-studio-$version-x86_64"
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized platform $(uname -s)-$(uname -m)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
readonly shatool
|
||||
readonly sha256sum
|
||||
|
||||
cd .gitlab
|
||||
|
||||
# This URL is only visible inside of Kitware's network. See above filename table.
|
||||
baseurl="https://cmake.org/files/dependencies/internal"
|
||||
|
||||
tarball="$filename.tgz"
|
||||
echo "$sha256sum $tarball" > pvs-studio.sha256sum
|
||||
curl -OL "$baseurl/$tarball"
|
||||
$shatool --check pvs-studio.sha256sum
|
||||
tar xzf "$tarball"
|
||||
rm "$tarball" pvs-studio.sha256sum
|
||||
mv "$filename" "pvs-studio"
|
||||
Reference in New Issue
Block a user