mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
build_osx: build BonsaiViewer on macOS via build-all.py
Linux (build_rocky.yml) and Windows (win/build-all-win.py) already pass BUILD_BONSAIVIEWER=ON when building from source; macOS was the odd one out. Three small changes to bring it up to parity: 1. .github/workflows/build_osx.yml — \`brew install qt\` (Qt6 with Svg) in the Install Dependencies step, then set QT_DIR=\$(brew --prefix qt) and BUILD_BONSAIVIEWER=ON in the Run Build Script env. 2. nix/build-all.py — install_qt6() now honours a pre-set QT_DIR. Before this change get_qt6_aqt_config() raised on non-Linux, blocking bonsai builds on macOS/Windows from ever using a system-provided Qt6. We now validate that QT_DIR points at a real Qt6 install (probes lib/cmake/Qt6/Qt6Config.cmake) and skip the aqt download path if so. Linux flow is unchanged: when QT_DIR is unset the function falls through to the existing aqtinstall path. build_osx.yml stays workflow_dispatch-only — slow run (~1h with ccache, longer cold), so manual fire when wanted. Cherry-pick this file + nix/build-all.py to v0.8.0 to make the workflow dispatchable against the ifcviewer-wgpu branch before the squash lands. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,10 @@ jobs:
|
||||
brew update
|
||||
# preinstalled: xz, cmake
|
||||
brew install git bison autoconf automake libffi findutils
|
||||
# qt brings in Qt6 + Svg; nix/build-all.py honours pre-set
|
||||
# QT_DIR so BonsaiViewer doesn't try to aqtinstall (which is
|
||||
# Linux-only).
|
||||
brew install qt
|
||||
echo "$(brew --prefix findutils)/libexec/gnubin" >> $GITHUB_PATH
|
||||
# Mac is using bison 2.5 by default, but we need 3.5+ for swig.
|
||||
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
|
||||
@@ -77,7 +81,9 @@ jobs:
|
||||
/usr/local/bin/brew install gettext openssl
|
||||
fi
|
||||
set -o pipefail
|
||||
export QT_DIR="$(brew --prefix qt)"
|
||||
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release \
|
||||
BUILD_BONSAIVIEWER=ON QT_DIR="${QT_DIR}" \
|
||||
python3 ./nix/build-all.py -v --diskcleanup ${MAC_INTEL} \
|
||||
| tee build.log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user