aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMike Taves <mwtoews@gmail.com>2021-12-27 20:23:17 +1300
committerMike Taves <mwtoews@gmail.com>2022-01-02 23:56:06 +1300
commit427eb126c4f3928f301fe1bd4d4da5eda22fb77b (patch)
tree92dc1685572b05021e01446bc6987f7554677bc6 /.github
parent0158de0603e9f37fdb58c7dfb932efc958bd5ea9 (diff)
downloadPROJ-427eb126c4f3928f301fe1bd4d4da5eda22fb77b.tar.gz
PROJ-427eb126c4f3928f301fe1bd4d4da5eda22fb77b.zip
Transition Clang Static Analizer to use CMake
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/clang_static_analyzer.yml2
-rwxr-xr-x.github/workflows/clang_static_analyzer/start.sh17
2 files changed, 10 insertions, 9 deletions
diff --git a/.github/workflows/clang_static_analyzer.yml b/.github/workflows/clang_static_analyzer.yml
index 9751fece..10d9c3d8 100644
--- a/.github/workflows/clang_static_analyzer.yml
+++ b/.github/workflows/clang_static_analyzer.yml
@@ -1,4 +1,4 @@
-name: CLang Static Analyzer
+name: Clang Static Analyzer
on: [push, pull_request]
diff --git a/.github/workflows/clang_static_analyzer/start.sh b/.github/workflows/clang_static_analyzer/start.sh
index 515e4d4a..e75c9b18 100755
--- a/.github/workflows/clang_static_analyzer/start.sh
+++ b/.github/workflows/clang_static_analyzer/start.sh
@@ -5,25 +5,25 @@ set -e
sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends \
- autoconf automake libtool g++ make sqlite3 libsqlite3-dev libtiff-dev libcurl4-openssl-dev jq
+ g++ cmake make sqlite3 libsqlite3-dev libtiff-dev libcurl4-openssl-dev jq
CLANG_LLVM=clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04
wget -nv https://releases.llvm.org/9.0.0/$CLANG_LLVM.tar.xz
tar xJf $CLANG_LLVM.tar.xz
mv $CLANG_LLVM clang+llvm-9
-# prepare build files
-./autogen.sh
-
NPROC=$(nproc)
echo "NPROC=${NPROC}"
export MAKEFLAGS="-j ${NPROC}"
export PATH=$PWD/clang+llvm-9/bin:$PATH
-CXXFLAGS="-std=c++11" scan-build -o scanbuildoutput -plist -v ./configure
-rm -rf scanbuildoutput
-TOPDIR=$PWD
-scan-build -o $TOPDIR/scanbuildoutput -sarif -v -enable-checker alpha.unix.cstring.OutOfBounds,alpha.unix.cstring.BufferOverlap,optin.cplusplus.VirtualCall,optin.cplusplus.UninitializedObject make
+
+mkdir csa_build
+cd csa_build
+
+scan-build -o scanbuildoutput -plist -v cmake ..
+
+scan-build -o scanbuildoutput -sarif -v -enable-checker alpha.unix.cstring.OutOfBounds,alpha.unix.cstring.BufferOverlap,optin.cplusplus.VirtualCall,optin.cplusplus.UninitializedObject make
rm -f filtered_scanbuild.txt
files=$(find scanbuildoutput -name "*.sarif")
@@ -35,6 +35,7 @@ for f in $files; do
echo ""
cat tmp.txt >> filtered_scanbuild.txt
fi
+ rm -f tmp.txt
done
if [ -s filtered_scanbuild.txt ]; then
echo ""