GitHub: Add more build types
[heimdal.git] / .github / workflows / osx.yml
blobb844cc09a88d8d8cc7361a948bdfd656f62cd3e7
1 name: OS X Build
3 on:
4     push:
5       branches:
6          - 'master'
7          - 'heimdal-7-1-branch'
8       paths:
9          - '!docs/**'
10          - '!**.md'
11          - '!**.[1-9]'
12          - '**.[chly]'
13          - '**.hin'
14          - '**.in'
15          - '**.am'
16          - '**.m4'
17          - '**.ac'
18          - '**.pl'
19          - '**.py'
20          - '**.asn1'
21          - '**.opt'
22          - '**/COPYING'
23          - '**/INSTALL'
24          - '**/README*'
25          - '.github/workflows/osx.yml'
26          - '!appveyor.yml'
27          - '!.travis.yml'
29     pull_request:
30       paths:
31          - '!docs/**'
32          - '!**.md'
33          - '!**.[1-9]'
34          - '**.[chly]'
35          - '**.hin'
36          - '**.in'
37          - '**.am'
38          - '**.m4'
39          - '**.ac'
40          - '**.pl'
41          - '**.py'
42          - '**.asn1'
43          - '**.opt'
44          - '**/COPYING'
45          - '**/INSTALL'
46          - '**/README*'
47          - '.github/workflows/osx.yml'
48          - '!appveyor.yml'
49          - '!.travis.yml'
51 jobs:
52     osx:
53         runs-on: ${{ matrix.os }}
54         strategy:
55             fail-fast: false
56             matrix:
57                 name: [osx-clang]
58                 include:
59                     - name: osx-clang
60                       os: macos-latest
61                       compiler: clang
62         steps:
63             - name: Install packages
64               run: |
65                 echo "bison, flex, ncurses, texinfo, and unzip are in the base OS."
66                 echo "berkeley-db, perl, python, curl, and jq are installed in the"
67                 echo "base image already."
68                 brew install autoconf automake libtool cpanm
69                 sudo cpanm install JSON
70             - name: Clone repository
71               uses: actions/checkout@v1
72             - name: Build
73               env:
74                 CC: ${{ matrix.compiler }}
75                 MAKEVARS: ${{ matrix.makevars }}
76                 CONFIGURE_OPTS:  ${{ matrix.configureopts }}
77               run: |
78                 /bin/sh ./autogen.sh
79                 mkdir build
80                 cd build
81                 ../configure --srcdir=`dirname "$PWD"` --disable-afs-support --enable-maintainer-mode --enable-developer $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"
82                 ulimit -c unlimited
83                 make -j4
84                 make check
85                 make install
86             - name: Test logs
87               if: ${{ failure() }}
88               run: |
89                 find build -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/'|xargs cat
90             - name: distclean
91               run: |
92                 cd build
93                 make distclean
94                 if [ "$(git ls-files -o|grep -v ^build/ | wc -l)" -ne 0 ]; then
95                   echo "Files not removed by make distclean:"
96                   git ls-files -o|grep -v ^build/
97                 fi