drsuapi.idl: fix source_dsa spelling
[samba4-gss.git] / third_party / heimdal / .github / workflows / coverity.yml
blob78ec7e5a56b9b3175610be33988432f980bed9d4
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-22.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 python3 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                   PROJECT: ${{ secrets.COVERITY_SCAN_PROJECT }}
36               run: |
37                   wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=$PROJECT" -O cov-analysis-linux64.tar.gz
38                   mkdir cov-analysis-linux64
39                   tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
40             - name: Build
41               env:
42                 CC: ${{ matrix.compiler }}
43                 MAKEVARS: ${{ matrix.makevars }}
44                 CONFIGURE_OPTS:  ${{ matrix.configureopts }}
45               run: |
46                 /bin/sh ./autogen.sh
47                 export PATH="$PWD/cov-analysis-linux64/bin:$PATH"
48                 mkdir build
49                 cd build
50                 ../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"
51                 ulimit -c unlimited
52                 # We don't want to scan-build libedit nor SQLite3 because ETOOSLOW
53                 (cd lib/libedit && make -j4)
54                 (cd lib/sqlite && make -j4)
55                 cov-build --dir cov-int make -j4
56                 tar czvf ../heimdal.tgz cov-int
57             - name: Submit the result to Coverity Scan
58               env:
59                   TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
60                   EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
61                   PROJECT: ${{ secrets.COVERITY_SCAN_PROJECT }}
62               run: |
63                   curl \
64                   --form "token=$TOKEN" \
65                   --form "email=$EMAIL" \
66                   --form "file=@heimdal.tgz" \
67                   --form version="$(git rev-parse HEAD)" \
68                   --form description="$GITHUB_REF / $GITHUB_SHA" "https://scan.coverity.com/builds?project=$PROJECT"