Files
heimdal/.github/workflows/osx.yml
2026-01-19 12:33:43 -06:00

132 lines
4.7 KiB
YAML

name: OS X Build
on:
push:
branches:
- 'master'
- 'osx-build'
- 'heimdal-7-1-branch'
paths:
- '!docs/**'
- '!**.md'
- '!**.[1-9]'
- '**.[chly]'
- '**.hin'
- '**.in'
- '**.am'
- '**.m4'
- '**.ac'
- '**.pl'
- '**.py'
- '**.asn1'
- '**.opt'
- '**/COPYING'
- '**/INSTALL'
- '**/README*'
- '.github/workflows/osx.yml'
pull_request:
paths:
- '!docs/**'
- '!**.md'
- '!**.[1-9]'
- '**.[chly]'
- '**.hin'
- '**.in'
- '**.am'
- '**.m4'
- '**.ac'
- '**.pl'
- '**.py'
- '**.asn1'
- '**.opt'
- '**/COPYING'
- '**/INSTALL'
- '**/README*'
- '.github/workflows/osx.yml'
jobs:
osx:
# Run if no [only X] tag, or if [only osx] is present (check both push commits and PR titles)
if: >-
(!contains(github.event.head_commit.message, '[only ') &&
!contains(github.event.pull_request.title, '[only ')) ||
contains(github.event.head_commit.message, '[only osx]') ||
contains(github.event.pull_request.title, '[only osx]')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [osx-clang]
include:
- name: osx-clang
os: macos-latest
compiler: clang
steps:
- name: Install packages
run: |
echo "bison, flex, ncurses, texinfo, and unzip are in the base OS."
echo "berkeley-db, perl, python3, curl, and jq are installed in the"
echo "base image already."
brew install autoconf automake bison libtool cpanm texinfo texi2html bash openssl@3
sudo cpanm install JSON
# Use Homebrew bash for tests (much faster than /bin/bash on macOS)
echo "$(brew --prefix)/bin" >> $GITHUB_PATH
- name: Clone repository
uses: actions/checkout@v4
- name: Build
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
CONFIGURE_OPTS: ${{ matrix.configureopts }}
run: |
/bin/sh ./autogen.sh
mkdir build
cd build
../configure --srcdir=`dirname "$PWD"` --disable-heimdal-documentation --enable-maintainer-mode --enable-developer $CONFIGURE_OPTS --prefix=$HOME/inst --with-openssl=/opt/homebrew/opt/openssl@3/ CFLAGS="-O0 -g -ggdb3 -Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations"
ulimit -c unlimited
PATH=/usr/local/opt/texinfo/bin:$PATH
export PATH
make -j4
#- name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# limit-access-to-actor: true
- name: Test
shell: bash
env:
CC: ${{ matrix.compiler }}
MAKEVARS: ${{ matrix.makevars }}
CONFIGURE_OPTS: ${{ matrix.configureopts }}
run: |
set -vx
# Verify we're using Homebrew bash (faster than system bash)
echo "Using bash: $(which bash) version $BASH_VERSION"
sudo lsof -nP -i:49188 || true
cd build
make check
- name: Install
run: |
cd build || true
make DESTDIR=/tmp/h5l install
cd /tmp/h5l
tar czf $HOME/heimdal-install-osx.tgz .
- name: Test logs
run: |
find build -depth -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/' | cpio -o > $HOME/logs-osx.cpio
find build -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/'|xargs cat
- name: Failed Test logs
if: ${{ failure() }}
run: |
find build -name \*.trs|xargs grep -lw FAIL|sed -e 's/trs$/log/'|xargs cat
- name: Upload Install Tarball
uses: actions/upload-artifact@v4
with:
name: Install Tarball (osx)
path: '~/heimdal-install-osx.tgz'
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Test Logs (osx)
path: '~/logs-osx.cpio'