Fix build on Mac OS, introduce Mac OS CI workflow

Closes #3312
This commit is contained in:
Roger A. Light
2025-08-12 10:16:38 +01:00
parent d5d3eb3e19
commit c64273f663
10 changed files with 103 additions and 5 deletions

69
.github/workflows/macos.yml vendored Normal file
View File

@@ -0,0 +1,69 @@
name: Mac OS build
on:
workflow_dispatch:
push:
branches:
- master
- fixes
- develop
- release/*
tags:
- 'v[0-9]+.*'
pull_request:
branches:
- master
- fixes
- develop
- release/*
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
mosquitto:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: pin cmake to 3.x series
uses: jwlawson/actions-setup-cmake@09fd9b0fb3b239b4b68d9256cd65adf8d6b91da0
with:
cmake-version: '3.31.6'
- name: Install Homebrew dependencies
run: |
brew update
brew install \
argon2 \
cjson \
cmake \
cunit \
docbook-xsl \
gcc \
libedit \
libmicrohttpd \
make \
openssl \
uthash
- name: Configure CMake
run: |
EDITLINE_PREFIX=$(brew --prefix libedit)
cmake -B ${{github.workspace}}/build64 \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DDOCUMENTATION=OFF \
-DWITH_WEBSOCKETS=ON \
-DWITH_TESTS=OFF \
-DCMAKE_INCLUDE_PATH="$EDITLINE_PREFIX/include" \
-DCMAKE_LIBRARY_PATH="$EDITLINE_PREFIX/lib" \
-DCMAKE_C_FLAGS="-I$EDITLINE_PREFIX/include" \
-DCMAKE_EXE_LINKER_FLAGS="-L$EDITLINE_PREFIX/lib" \
-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@3)
- name: Build
run: |
cmake --build ${{github.workspace}}/build64 \
--config ${{env.BUILD_TYPE}}