The existing "Package .zip archives" step only sweeps
\`\$install_root/bin/\` for plain executable files (via \`find -type f
-perm /111\`). That captures \`IfcConvert\` and \`IfcGeomServer\` but
misses macOS app bundles entirely:
- BonsaiViewer.app installs at \`\$install_root/BonsaiViewer.app\`
(BUNDLE DESTINATION ".") — not under bin/, and it's a directory,
not a file.
So the prior bonsai macOS CI run got a green tick but the
ifcopenshell-builds S3 bucket only ended up with IfcConvert +
IfcGeomServer + the python wheel — no BonsaiViewer.
Add a second packaging pass that finds \`*.app\` directories at the
install-prefix root and zips each one as-is. macdeployqt has already
embedded the Qt frameworks inside the bundle during install/strip, so
no extra dependency staging is needed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
# Why this exists
The bonsai macOS CI (`build_osx.yml`, arm64) currently fails the
`IfcOpenShell-Python` smoke test with:
ImportError: dlopen(.../_ifcopenshell_wrapper.cpython-311-darwin.so,
0x0002):
Library not loaded: @rpath/ifcopenshell.document.rdb.dylib
Reason: tried: '$ORIGIN/ifcopenshell.document.rdb.dylib'
(no such file)
`_ifcopenshell_wrapper.cpython-311-darwin.so` has a hard `LC_LOAD_DYLIB`
of `@rpath/ifcopenshell.document.rdb.dylib` and its only `LC_RPATH` is
`$ORIGIN` (= `site-packages/ifcopenshell/`). The plug-in dylib is not
present at that path on macOS, so the wrapper fails to load and the
build smoke test (`build-all.py: compile_python_wrapper`) errors out.
BonsaiViewer.app builds, installs, and macdeployqt-deploys cleanly
before this point — the failure is downstream and unrelated to wgpu,
BonsaiViewer, or anything else on this branch.
# Where the regression came from
Two commits on the branch line that became `ifcviewer-wgpu`:
b599ee10 "More work on isolating into plug-ins" (2026-04-18, Thomas Krijnen)
b022ca7e7 "Some plug-in work" (2026-04-21, Thomas Krijnen)
`b599ee10` added a hard link dep:
target_link_libraries(ifcopenshell_wrapper PRIVATE document_serializer_rdb)
which bakes `@rpath/ifcopenshell.document.rdb.dylib` into the wrapper's
`LC_LOAD_DYLIB`. `b022ca7e7` added a `if(CREATE_BUNDLE) ...
install(TARGETS ${_ifcopenshell_python_runtime_targets}
LIBRARY DESTINATION "${python_package_dir}/ifcopenshell" ...)` block
that was *intended* to satisfy that link dep by copying plug-ins next
to the wrapper. On macOS arm64 the install rule does not actually
deposit `ifcopenshell.document.rdb.dylib` into
`site-packages/ifcopenshell/`, so the runtime dlopen fails.
# Why 227d85d worked
`227d85d` (2026-05-15) is on the `v0.8.0` line, not on the
`datamodel-v1.0 -> ifcviewer -> ifcviewer-wgpu` line. The merge-base
of `227d85d` and `ifcviewer-wgpu` is `e6258ab4` (2026-04-13). Both
b599ee10 and b022ca7e7 live on the wgpu side of that fork and are not
ancestors of `227d85d`:
$ git merge-base --is-ancestor b599ee10227d85d
[exit 1 — NOT an ancestor]
$ git merge-base --is-ancestor b599ee10 v0.8.0
[exit 1 — NOT an ancestor]
So the macOS Python wheel built fine on `v0.8.0` because that branch
never had the plug-in refactor; it has been broken on our branch line
since 2026-04-21. Nobody noticed because nobody had been firing
`build_osx.yml` against this branch line until this week's bonsai CI
work.
# What this commit does
Adds an `IFCOS_BUILD_PYTHON_WRAPPER` env var to `nix/build-all.py`.
Defaulting to `on` preserves existing behaviour everywhere; setting
it to `off` (or `0`/`false`/`no`) drops `IfcOpenShell-Python` from
the target set so `build-all.py` skips the wrapper build + smoke
test entirely.
`build_osx.yml` sets `IFCOS_BUILD_PYTHON_WRAPPER=off` so the bonsai
macOS CI can complete and upload `BonsaiViewer.app` while the plug-in
install rule is broken.
# What Thomas should do
Once the install rule in `src/ifcwrap/CMakeLists.txt` (the
`if(CREATE_BUNDLE) ... install(TARGETS ${_ifcopenshell_python_runtime_targets}
LIBRARY DESTINATION "${python_package_dir}/ifcopenshell" ...)` block,
added in b022ca7e7) is fixed to actually drop
`ifcopenshell.document.rdb.dylib` next to the wrapper in
site-packages on macOS — this commit can be reverted in its entirety:
the env-gate in `build-all.py` AND the `IFCOS_BUILD_PYTHON_WRAPPER=off`
in `build_osx.yml`. The bonsai macOS workflow will then build the
Python wrapper too.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bundles four portability fixes uncovered by manually firing the platform
workflows against this branch:
- WgpuOverlayRenderer.cpp: GCC 11 (Rocky manylinux runner) does not parse
a multi-line raw string inside `#define`. Converted
THICK_LINE_HELPERS_WGSL from a `#define` to a `static const char*` and
switched AXIS_WGSL / SECTION_WGSL / MARQUEE_WGSL to `std::string` so
they can concatenate at static-init time. Three call sites now pass
`.c_str()` to svFromCStr.
- bonsaiviewer/CMakeLists.txt: added BUNDLE DESTINATION to the install
rule (same fix already applied to IfcViewerWgpuMinimal). MACOSX_BUNDLE
targets fail at configure on macOS without it even when nobody runs
`make install`.
- build_osx.yml: dropped the x64 (Intel cross-compile) matrix row. The
runner is arm64 so `brew --prefix qt` returns the arm64 prefix; we'd
need a separate x86_64 Qt install under /usr/local to cross-build
BonsaiViewer. Revisit if Intel-Mac demand resurfaces.
- build_win.yml: dropped the ARM64 matrix row. wgpu-native does not ship
a Windows-ARM64 binary, so IfcViewerWgpu's link step fails with ~60
unresolved wgpu* externs. Re-enable when upstream publishes that
target.
Cherry-pick this commit to v0.8.0 so the workflow_dispatch buttons see
the dropped rows.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>
Ninja rejects \`-j\` without a numeric argument (unlike make, which
treats bare \`-j\` as unlimited parallelism). Build step exited with
\`ninja: fatal: invalid -j parameter\`. Drop the \`-- -j\` tail
entirely; Ninja already parallelises across available cores by
default.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The first run after BUNDLE DESTINATION fix didn't trigger because that
commit only touched src/ifcviewer-wgpu-minimal/CMakeLists.txt, which
the workflow's paths: list didn't cover. Add the two sibling
subprojects (-minimal and wgpu-mem-probe) since they participate in
the same configure pass.
(Manual workflow_dispatch is still unavailable until this workflow
lands on the default branch — GitHub gates the "Run workflow" button
on the default branch's copy of the file.)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Top-level cmake/CMakeLists.txt:328 does an unconditional
find_package(Boost REQUIRED COMPONENTS program_options regex thread
date_time iostreams) before the BUILD_BONSAIVIEWER gate, so we have
to install it on the runner even though IfcViewerWgpu itself doesn't
touch Boost. Removed via task #12 (extract ifcviewer-core) later.
Other unconditional finds in the top-level CMake (manifold,
nlohmann_json, USD, RocksDB, zstd) are already gated on flags that
default to OFF — no action needed for those.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two iterations on the first CI run:
1. The top-level cmake/CMakeLists.txt unconditionally find_package's
CGAL (line 217) and OpenCASCADE (222) before our BUILD_BONSAIVIEWER
gate kicks in, so configure failed with "Could NOT find CGAL". Pass
BUILD_IFCGEOM=OFF + BUILD_IFCPYTHON=OFF + BUILD_CONVERT=OFF +
BUILD_EXAMPLES=OFF + BUILD_GEOMSERVER=OFF + WITH_OPENCASCADE=OFF +
WITH_CGAL=OFF + COLLADA_SUPPORT=OFF so all the heavy deps stay out
of the configure step. Verified locally on Linux.
2. The ctest -R "wgpu" filter was case-sensitive and the Catch2 test
names begin with capital "Wgpu" (e.g. "WgpuSelectionState starts
empty..."), so it matched zero tests and ctest exited with "No
tests were found". The standalone wgpu config only builds the
wgpu tests anyway, so the filter is unnecessary — drop it.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lightweight workflow that compiles IfcViewerWgpu (the static lib) on
macOS arm64 + runs the wgpu state tests. Skips IfcViewerWgpuMinimal
because createSurface has no Metal path yet (task #32); the platform
surface blocks in WgpuViewportWindow.cpp are wrapped in
#if defined(Q_OS_LINUX) so the lib itself compiles cleanly on macOS.
Goal: catch portability regressions in the wgpu source on Apple
Silicon without paying for build_osx.yml's full IfcGeom + OCCT +
Python wheel pipeline. ~5 min vs hours.
Triggers on push/PR that touches src/ifcviewer-wgpu, the shared
headers it depends on, the top-level CMake, or this workflow itself.
Also workflow_dispatch for manual runs.
Hoists the Catch2 fetch in cmake/CMakeLists.txt out of the
BUILD_BONSAIVIEWER gate so the standalone wgpu config
(BUILD_BONSAIVIEWER=OFF + BUILD_BONSAIVIEWER_WGPU=ON +
BUILD_BONSAIVIEWER_TESTS=ON) can build tests without dragging the
whole bonsai/IfcGeom tree in. Default remains OFF, so default builds
stay offline-capable.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Build Rocky artifacts with shared IfcOpenShell libraries and keep geometry writer plugins out of executable packages while preserving them for Python packages.
Generated with the assistance of an AI coding tool.
Introduce pytest coverage for the previously untested connector — rpc,
cache, settings, autodesk (auth + APS client) and connector handlers —
94 tests, runnable via the new `test` optional-dependency extra.
To make HTTP, time and the OAuth redirect testable without a network or
real sockets, add dependency-injection seams to autodesk.py:
AuthSessionService and ApsClient accept an optional httpx transport;
AuthSessionService accepts an injectable clock and callback_waiter; and
_wait_for_callback is extracted to the module-level wait_for_oauth_callback.
All seams default to the previous behaviour.
Remove the APS_CLIENT_ID environment-variable override: the client id now
comes solely from settings.json, collapsing settings.load_client_id and
simplifying the settings dialog.
CI: the build-bonsaiviewer-autodesk workflow gains a `test` job
(Python 3.11 + 3.13) that gates the build matrix.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Compile the Bonsai Viewer as part of the Linux and Windows binary builds,
and ship the Autodesk connector alongside the viewer executable.
Qt6 dependencies:
- The viewer links Qt6::Svg for runtime icon tinting. Svg is a separate
base-Qt archive, so aqt now installs "qtbase qtsvg" (plus icu on Linux)
rather than qtbase alone, on both Linux and Windows.
- Qt6::CorePrivate is exposed differently across Qt versions: Qt 6.8 ships
the target inside Qt6Core, while Qt 6.10 provides it only as a separate
CorePrivate config package. The viewer CMakeLists requests it via
OPTIONAL_COMPONENTS so it resolves on both.
- When cross-compiling Windows ARM64, windeployqt runs from the host x64
Qt, so qtsvg is installed into the host Qt as well.
Windows build:
- build-all-win.py passed -DBUILD_IFCVIEWER, a flag since renamed to
BUILD_BONSAIVIEWER, so the Windows build compiled no viewer at all. It
now passes -DBUILD_BONSAIVIEWER.
- The Autodesk connector is bundled under connectors/ next to
BonsaiViewer.exe in the packaged archive, mirroring the Linux builds.
- The Windows workflow builds the connector (PyInstaller) before the main
build so it is available to bundle.
Connector bundling:
- The Linux rocky workflows build the connector and bundle it into the
BonsaiViewer archive; the Windows build now does the same.
Generated with the assistance of an AI coding tool.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the old IFC viewer build switch with BUILD_BONSAIVIEWER in CMake, the Linux workflows, and the nix build script.
Generated with the assistance of an AI coding tool.
Follows the host viewer's rename to Bonsai Viewer: directory, Python
package, entry point, PyInstaller spec, keyring service, and on-disk
config/cache paths all use the bonsaiviewer-autodesk name. CI workflow
filename and path filters updated to match.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Build the ifcviewer-autodesk connector bundle on push/PR/dispatch for the four supported targets: linux-x86_64 (ubuntu-22.04, oldest reasonable glibc), macos-arm64, macos-x86_64, and windows-x86_64. Each job runs packaging/build.py and uploads the resulting autodesk-<os>-<arch>.zip as an artifact.
Generated with the assistance of an AI coding tool.
The https://github.com/IfcOpenShell/website repo already has bonsai-docs.yml workflow that does the same thing - builds Bonsai docs from the main repo and deploys to bonsaibim_org_docs, so this workflow is redundant and confusing.
These three packages were added to src/ but lacked the Makefile needed
by common.mk to build distribution wheels, and the GitHub Actions
workflow to publish them to PyPI.
Adds make dist / make test / make qa targets and ci-*-pypi.yaml
workflows matching the pattern used by ifcpatch, ifcclash, etc.