third_party/heimdal: import lorikeet-heimdal-202203101709 (commit 47863866da25cc21d29...
[Samba.git] / third_party / heimdal / .github / workflows / osx.yml
blob342f850f1c7005c8511bfa68d90cabdbe5baa5ff
1 name: OS X Build
3 on:
4     push:
5       branches:
6          - 'master'
7          - 'osx-build'
8          - 'heimdal-7-1-branch'
9       paths:
10          - '!docs/**'
11          - '!**.md'
12          - '!**.[1-9]'
13          - '**.[chly]'
14          - '**.hin'
15          - '**.in'
16          - '**.am'
17          - '**.m4'
18          - '**.ac'
19          - '**.pl'
20          - '**.py'
21          - '**.asn1'
22          - '**.opt'
23          - '**/COPYING'
24          - '**/INSTALL'
25          - '**/README*'
26          - '.github/workflows/osx.yml'
27          - '!appveyor.yml'
28          - '!.travis.yml'
30     pull_request:
31       paths:
32          - '!docs/**'
33          - '!**.md'
34          - '!**.[1-9]'
35          - '**.[chly]'
36          - '**.hin'
37          - '**.in'
38          - '**.am'
39          - '**.m4'
40          - '**.ac'
41          - '**.pl'
42          - '**.py'
43          - '**.asn1'
44          - '**.opt'
45          - '**/COPYING'
46          - '**/INSTALL'
47          - '**/README*'
48          - '.github/workflows/osx.yml'
49          - '!appveyor.yml'
50          - '!.travis.yml'
52 jobs:
53     osx:
54         runs-on: ${{ matrix.os }}
55         strategy:
56             fail-fast: false
57             matrix:
58                 name: [osx-clang]
59                 include:
60                     - name: osx-clang
61                       os: macos-latest
62                       compiler: clang
63         steps:
64             - name: Install packages
65               run: |
66                 echo "bison, flex, ncurses, texinfo, and unzip are in the base OS."
67                 echo "berkeley-db, perl, python, curl, and jq are installed in the"
68                 echo "base image already."
69                 brew install autoconf automake libtool cpanm
70                 sudo cpanm install JSON
71             - name: Clone repository
72               uses: actions/checkout@v1
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"` --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" CFLAGS="-O0 -g -ggdb3"
83                 ulimit -c unlimited
84                 make -j4
85             #- name: Setup upterm session
86             #  uses: lhotari/action-upterm@v1
87             #  with:
88             #      limit-access-to-actor: true
89             - name: Test
90               env:
91                 CC: ${{ matrix.compiler }}
92                 MAKEVARS: ${{ matrix.makevars }}
93                 CONFIGURE_OPTS:  ${{ matrix.configureopts }}
94               run: |
95                 set -vx
96                 sudo lsof -nP -i:49188 || true
97                 cd build
98                 make check
99             - name: Install
100               run: |
101                 cd build || true
102                 make DESTDIR=/tmp/h5l install
103                 cd /tmp/h5l
104                 tar czf $HOME/heimdal-install-osx.tgz .
105             - name: Test logs
106               run: |
107                 find build -depth -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/' | cpio -o > $HOME/logs-osx.cpio
108                 find build -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/'|xargs cat
109             - name: Failed Test logs
110               if: ${{ failure() }}
111               run: |
112                 find build -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/'|xargs cat
113             - name: Upload Install Tarball
114               uses: actions/upload-artifact@v2
115               with:
116                 name: Install Tarball
117                 path: '~/heimdal-install-osx.tgz'
118             - name: Upload Artifacts
119               uses: actions/upload-artifact@v2
120               with:
121                 name: Upload Test Logs
122                 path: '~/logs-osx.cpio'