diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-11-26 20:08:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-26 20:08:59 +0100 |
| commit | f5b3616bb03f8e52a5e5a23704d645492a662393 (patch) | |
| tree | 3ee07d17bed4a57641f1f64bf14592474d305505 | |
| parent | 5172091009069955a62a38237ad48fc0aabf0ed9 (diff) | |
| parent | eeec780b20c44960f3b2fed817e00bf6c23f0bec (diff) | |
| download | PROJ-f5b3616bb03f8e52a5e5a23704d645492a662393.tar.gz PROJ-f5b3616bb03f8e52a5e5a23704d645492a662393.zip | |
Merge pull request #2456 from rouault/gha_csa
Move Clang Static Analyzer job to Github action
| -rw-r--r-- | .github/workflows/clang_static_analyzer.yml | 15 | ||||
| -rwxr-xr-x | .github/workflows/clang_static_analyzer/start.sh (renamed from travis/csa/install.sh) | 16 | ||||
| -rw-r--r-- | .travis.yml | 7 | ||||
| -rwxr-xr-x | travis/csa/after_success.sh | 5 | ||||
| -rwxr-xr-x | travis/csa/before_install.sh | 13 |
5 files changed, 28 insertions, 28 deletions
diff --git a/.github/workflows/clang_static_analyzer.yml b/.github/workflows/clang_static_analyzer.yml new file mode 100644 index 00000000..47dfc4ad --- /dev/null +++ b/.github/workflows/clang_static_analyzer.yml @@ -0,0 +1,15 @@ +name: CLang Static Analyzer + +on: [push, pull_request] + +jobs: + + clang_static_analyzer: + runs-on: ubuntu-16.04 + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Run + run: .github/workflows/clang_static_analyzer/start.sh diff --git a/travis/csa/install.sh b/.github/workflows/clang_static_analyzer/start.sh index 349afcb1..7063c42f 100755 --- a/travis/csa/install.sh +++ b/.github/workflows/clang_static_analyzer/start.sh @@ -2,16 +2,26 @@ set -e +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 + +CLANG_LLVM=clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04 +wget http://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 -j2 - -sudo apt-get install jq +scan-build -o $TOPDIR/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") diff --git a/.travis.yml b/.travis.yml index c2f2b69d..a258ee2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,13 +82,6 @@ matrix: - BUILD_NAME=linux_generic - DETAILS="linux, arm64" - - os: linux - compiler: gcc - dist: xenial - env: - - BUILD_NAME=csa - - DETAILS="CLang Static Analyzer" - allow_failures: - env: BUILD_NAME=mingw32 diff --git a/travis/csa/after_success.sh b/travis/csa/after_success.sh deleted file mode 100755 index 9618f673..00000000 --- a/travis/csa/after_success.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -e - -# nothing diff --git a/travis/csa/before_install.sh b/travis/csa/before_install.sh deleted file mode 100755 index 0ebc94fb..00000000 --- a/travis/csa/before_install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -./travis/before_install_apt.sh -./travis/before_install_pip.sh - -sudo apt-get install -qq sqlite3 libsqlite3-dev libtiff-dev libcurl4-openssl-dev - -CLANG_LLVM=clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04 -wget http://releases.llvm.org/9.0.0/$CLANG_LLVM.tar.xz -tar xJf $CLANG_LLVM.tar.xz -mv $CLANG_LLVM clang+llvm-9 |
