1 name: Linux Static Analyzer Build
5 # Pushes to this branch get the scan-build treatment
10 # Changing this build gets it to run
12 - '.github/workflows/scanbuild.yml'
16 runs-on: ${{ matrix.os }}
26 - name: Clone repository
27 uses: actions/checkout@v1
28 - name: Install packages
29 if: startsWith(matrix.os, 'ubuntu')
31 sudo apt-get update -qq
32 sudo apt-get install -y bison comerr-dev flex libcap-ng-dev libdb-dev libedit-dev libjson-perl libldap2-dev libncurses5-dev libperl4-corelibs-perl libsqlite3-dev libkeyutils-dev pkg-config python3 ss-dev texinfo unzip netbase keyutils ldap-utils gdb apport curl libmicrohttpd-dev clang-tools clang-format jq valgrind
33 # Temporary workaround for:
34 # https://github.com/actions/virtual-environments/issues/3185
35 sudo hostname localhost
38 CC: ${{ matrix.compiler }}
39 MAKEVARS: ${{ matrix.makevars }}
40 CONFIGURE_OPTS: ${{ matrix.configureopts }}
45 ../configure --srcdir=`dirname "$PWD"` --enable-maintainer-mode --enable-developer --with-ldap $CONFIGURE_OPTS --prefix=$HOME/inst CFLAGS="-Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations"
47 # We don't want to scan-build libedit nor SQLite3 because ETOOSLOW
48 (cd lib/libedit && make -j4)
49 (cd lib/sqlite && make -j4)
50 scan-build --keep-going make -j4
53 CC: ${{ matrix.compiler }}
54 MAKEVARS: ${{ matrix.makevars }}
58 scan-build --keep-going make check
59 - name: Failed Test logs
62 find build -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/'|xargs cat
63 - name: Upload Artifacts
64 uses: actions/upload-artifact@v2
66 name: Scan-Build Reports
67 path: '/tmp/scan-build*/'