krb5: make krb5_pac a heim_object_t
[heimdal.git] / .github / workflows / linux.yml
blobcb3d41f1c52b508a2301f4a5cf12b86ed4dbc05a
1 name: Linux Build
3 on:
4     push:
5       paths:
6          - '!docs/**'
7          - '!**.md'
8          - '!**.[1-9]'
9          - '**.[chly]'
10          - '**.hin'
11          - '**.in'
12          - '**.am'
13          - '**.m4'
14          - '**.ac'
15          - '**.pl'
16          - '**.py'
17          - '**.asn1'
18          - '**.opt'
19          - '**/COPYING'
20          - '**/INSTALL'
21          - '**/README*'
22          - '.github/workflows/build.yml'
23          - '!appveyor.yml'
24          - '!.travis.yml'
26     pull_request:
27       paths:
28          - '!docs/**'
29          - '!**.md'
30          - '!**.[1-9]'
31          - '**.[chly]'
32          - '**.hin'
33          - '**.in'
34          - '**.am'
35          - '**.m4'
36          - '**.ac'
37          - '**.pl'
38          - '**.py'
39          - '**.asn1'
40          - '**.opt'
41          - '**/COPYING'
42          - '**/INSTALL'
43          - '**/README*'
44          - '.github/workflows/build.yml'
45          - '!appveyor.yml'
46          - '!.travis.yml'
48 jobs:
49     unix:
50         runs-on: ${{ matrix.os }}
51         strategy:
52             fail-fast: false
53             matrix:
54                 name: [linux-clang, linux-gcc]
55                 include:
56                     - name: linux-clang
57                       os: ubuntu-18.04
58                       compiler: clang
59                     - name: linux-gcc
60                       os: ubuntu-18.04
61                       compiler: gcc
62         steps:
63             - name: Clone repository
64               uses: actions/checkout@v1
65             - name: Install packages
66               if: startsWith(matrix.os, 'ubuntu')
67               run: |
68                 sudo apt-get update -qq
69                 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 jq valgrind
70                 # Temporary workaround for:
71                 # https://github.com/actions/virtual-environments/issues/3185
72                 sudo hostname localhost
73             - name: Build
74               env:
75                 CC: ${{ matrix.compiler }}
76                 MAKEVARS: ${{ matrix.makevars }}
77                 CONFIGURE_OPTS:  ${{ matrix.configureopts }}
78               run: |
79                 /bin/sh ./autogen.sh
80                 mkdir build
81                 cd build
82                 ../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"
83                 ulimit -c unlimited
84                 make -j4
85                 make check
86                 make install
87             - name: Valgrind output
88               run: |
89                 find . -name \*.log -print0|xargs -0 grep '^==[1-9]' || true
90             - name: Core dump stacks
91               run: |
92                 echo "thread apply all bt" > /tmp/x
93                 find . -name core -print | while read core; do gdb -batch -x x `file "$core"|sed -e "s/^[^']*'//" -e "s/[ '].*$//"` "$core"; done
94                 if [ "$(find . -name core -print | wc -l)" -gt 0 ]; then false; fi
95             - name: Test logs
96               if: ${{ failure() }}
97               run: |
98                 find build -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/'|xargs cat
99             - name: distclean
100               run: |
101                 cd build
102                 make distclean
103                 if [ "$(git ls-files -o|grep -v ^build/ | wc -l)" -ne 0 ]; then
104                   echo "Files not removed by make distclean:"
105                   git ls-files -o|grep -v ^build/
106                 fi