1 name: Linux Coverity Build
5 # Pushes to this branch get the scan-build treatment
11 if: secrets.COVERITY_SCAN_TOKEN != ''
12 runs-on: ${{ matrix.os }}
22 - name: Clone repository
23 uses: actions/checkout@v1
24 - name: Install packages
25 if: startsWith(matrix.os, 'ubuntu')
27 sudo apt-get update -qq
28 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 python ss-dev texinfo unzip netbase keyutils ldap-utils gdb apport curl libmicrohttpd-dev clang-tools clang-format jq valgrind
29 # Temporary workaround for:
30 # https://github.com/actions/virtual-environments/issues/3185
31 sudo hostname localhost
32 - name: Download Coverity Build Tool
34 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
36 wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=ruby" -O cov-analysis-linux64.tar.gz
37 mkdir cov-analysis-linux64
38 tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
41 CC: ${{ matrix.compiler }}
42 MAKEVARS: ${{ matrix.makevars }}
43 CONFIGURE_OPTS: ${{ matrix.configureopts }}
48 ../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"
50 # We don't want to scan-build libedit nor SQLite3 because ETOOSLOW
51 (cd lib/libedit && make -j4)
52 (cd lib/sqlite && make -j4)
53 export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
54 cov-build --dir cov-int make -j4
55 - name: Submit the result to Coverity Scan
57 TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
58 EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
59 PROJECT: ${{ secrets.COVERITY_SCAN_PROJECT }}
61 tar czvf heimdal.tgz cov-int
66 --form file=@heimdal.tgz \
67 --form version=trunk \
68 --form description="`./ruby -v`" "https://scan.coverity.com/builds?project=$PROJECT"