third_party/heimdal: import lorikeet-heimdal-202203101709 (commit 47863866da25cc21d29...
[Samba.git] / third_party / heimdal / .github / workflows / coverity.yml
blob5a175f52a8ce776bd8c58dd25380a4e86150e97f
1 name: Linux Coverity Build
3 on:
4     push:
5       # Pushes to this branch get the scan-build treatment
6       branches:
7          - 'coverity*'
9 jobs:
10     linux:
11         if: secrets.COVERITY_SCAN_TOKEN != ''
12         runs-on: ${{ matrix.os }}
13         strategy:
14             fail-fast: false
15             matrix:
16                 name: [linux-clang]
17                 include:
18                     - name: linux-clang
19                       os: ubuntu-18.04
20                       compiler: clang
21         steps:
22             - name: Clone repository
23               uses: actions/checkout@v1
24             - name: Install packages
25               if: startsWith(matrix.os, 'ubuntu')
26               run: |
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
33               env:
34                   TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
35               run: |
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
39             - name: Build
40               env:
41                 CC: ${{ matrix.compiler }}
42                 MAKEVARS: ${{ matrix.makevars }}
43                 CONFIGURE_OPTS:  ${{ matrix.configureopts }}
44               run: |
45                 /bin/sh ./autogen.sh
46                 mkdir build
47                 cd build
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"
49                 ulimit -c unlimited
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
56               env:
57                   TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
58                   EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
59                   PROJECT: ${{ secrets.COVERITY_SCAN_PROJECT }}
60               run: |
61                   tar czvf heimdal.tgz cov-int
62                   curl \
63                   --form project=ruby \
64                   --form token=$TOKEN \
65                   --form email=$EMAIL \
66                   --form file=@heimdal.tgz \
67                   --form version=trunk \
68                   --form description="`./ruby -v`" "https://scan.coverity.com/builds?project=$PROJECT"