Skip to content

CI tests macOS

CI tests macOS #204

Workflow file for this run

name: CI tests macOS
on:
push:
branches:
- master
paths:
- 'test/*'
- 'tools/test-stack-dump.sh'
- '.github/workflows/ci-macos.yml'
pull_request:
branches:
- master
paths:
- 'test/*'
- 'tools/test-stack-dump.sh'
- '.github/workflows/ci-macos.yml'
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
inputs:
iterations:
description: "Soak iteration count (default 50)"
required: false
default: "50"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
macos-tests:
timeout-minutes: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && 60 || 10 }}
runs-on: macos-latest
name: "macOS tests"
steps:
- uses: actions/checkout@v5
- name: Build and configure
run: |
cd test
cmake .
make
- name: Gated tests
if: always()
run: |
GATED=$(./test/libkqueue-test --list-gated=macos 2>/dev/null) || true
{
printf '## Gated on macos\n'
printf '| Suite | Test | Reason |\n| --- | --- | --- |\n'
if [ -n "$GATED" ]; then
printf '%s\n' "$GATED" | awk -F'\t' '{gsub(/\|/,"|",$3); print "| "$1" | "$2" | "$3" |"}'
else
printf '_none_\n'
fi
} >> "$GITHUB_STEP_SUMMARY"
- name: libkqueue test suite
env:
KQUEUE_DEBUG: yes
run: |
./test/libkqueue-test \
--watchdog-timeout=120 \
--watchdog-cmd="${{ github.workspace }}/tools/test-stack-dump.sh" \
-n ${{ github.event_name == 'workflow_dispatch' && inputs.iterations || (github.event_name == 'schedule' && 50 || 1) }}