third_party/heimdal: Import lorikeet-heimdal-202306091507 (commit 7d8afc9d7e3d309ddcc...
[Samba.git] / third_party / heimdal / .github / workflows / valgrind.yml
blob8506df999ca2630a0fc675c198e594a65e8426db
1 name: Linux Valgrind Tests Build
3 on:
4     push:
5       # Pushes to the valgrind branch get the valgrind treatment
6       branches:
7          - 'valgrind*'
9     pull_request:
10       # Changing this build also gets it to run
11       paths:
12          - '.github/workflows/valgrind.yml'
14 jobs:
15     unix:
16         runs-on: ${{ matrix.os }}
17         strategy:
18             fail-fast: false
19             matrix:
20                 name: [linux-clang]
21                 include:
22                     - name: linux-clang
23                       os: ubuntu-22.04
24                       compiler: clang
25         steps:
26             - name: Clone repository
27               uses: actions/checkout@v1
28             - name: Install packages
29               if: startsWith(matrix.os, 'ubuntu')
30               run: |
31                 sudo apt-get update -qq
32                 sudo apt-get install -y bison comerr-dev flex libcap-ng-dev lmdb-utils liblmdb-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 jq valgrind
33                 # Temporary workaround for:
34                 # https://github.com/actions/virtual-environments/issues/3185
35                 sudo hostname localhost
36             - name: Build
37               env:
38                 CC: ${{ matrix.compiler }}
39                 MAKEVARS: ${{ matrix.makevars }}
40                 CONFIGURE_OPTS:  ${{ matrix.configureopts }}
41                 CHECK_TESTER_NO_VALGRIND:  'no-valgrind'
42               run: |
43                 /bin/sh ./autogen.sh
44                 mkdir build
45                 cd build
46                 ../configure --srcdir=`dirname "$PWD"` --enable-maintainer-mode --enable-developer --with-ldap $CONFIGURE_OPTS --prefix=$HOME/inst CFLAGS="-g -ggdb3 -O0 -Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations"
47                 make -j4
48             - name: Test
49               env:
50                 CC: ${{ matrix.compiler }}
51                 MAKEVARS: ${{ matrix.makevars }}
52               run: |
53                 cd build
54                 ulimit -c unlimited
55                 make check-valgrind
56             - name: Valgrind output
57               run: |
58                 find . -name \*.log -print0|xargs -0 grep '^==[0-9]*== ' || true
59             - name: Test logs
60               run: |
61                 find build -depth -name \*.log | sed -e 's/trs$/log/' | tar -czf $HOME/logs-linux-valgrind.tgz --verbatim-files-from --files-from -
62                 find build -name \*.trs|xargs grep -lw FAIL | sed -e 's/trs$/log/' | xargs cat
63             - name: Failed Test logs
64               if: ${{ failure() }}
65               run: |
66                 find build -name \*.trs|xargs grep -lw FAIL | sed -e 's/trs$/log/' | xargs cat
67             - name: Upload Artifacts
68               uses: actions/upload-artifact@v2
69               with:
70                 name: Test Logs
71                 path: '~/logs-linux-valgrind.tgz'