mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
CI: make the Autodesk connector workflow a test gate, ship it on macOS
Three related cleanups to how the bonsaiviewer-autodesk connector is built and shipped. build-bonsaiviewer-autodesk.yml no longer builds a bundle. Its four-runner matrix produced autodesk-<os>-<arch>.zip artifacts that nothing consumed — shipping happens in the platform pipelines, which each invoke packaging/build.py themselves. What is left is the crate's only lint and test coverage, so the workflow is renamed to match what it does and a header comment records where the shipped binary actually comes from. build_osx.yml now builds and bundles the connector, which it never did: macOS users have been getting a Bonsai Viewer with no Autodesk connector at all. ConnectorDiscovery resolves applicationDirPath()/connectors, which inside a bundle is Contents/MacOS, so that is where the folder lands. The tkinter probes in the Windows and Linux workflows are dropped. They guarded the old PyInstaller connector's Tk GUI (de7520418) and have been dead since the Rust rewrite (9d9f4054f); python3.11-tkinter goes with them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,12 @@ jobs:
|
||||
# Mac is using bison 2.5 by default, but we need 3.5+ for swig.
|
||||
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
|
||||
|
||||
# The bonsaiviewer-autodesk connector is a Rust crate; the "Package
|
||||
# .zip archives" step below runs `cargo build --release` via
|
||||
# packaging/build.py. Match the dedicated connector workflow's stable
|
||||
# toolchain, rather than whatever Rust the runner image happens to ship.
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Install aws cli
|
||||
run: |
|
||||
python -m pip install awscli
|
||||
@@ -127,6 +133,13 @@ jobs:
|
||||
- name: Package .zip archives
|
||||
run: |
|
||||
VERSION=v`cat VERSION`
|
||||
# packaging/build.py stages the connector binary + connector.json
|
||||
# into dist/autodesk/; the .app loop below copies that folder into
|
||||
# the bundle. Same on-disk shape as the Linux and Windows builds.
|
||||
python3 src/bonsaiviewer-autodesk/packaging/build.py
|
||||
autodesk_connector_dir="$PWD/src/bonsaiviewer-autodesk/dist/autodesk"
|
||||
test -d "$autodesk_connector_dir"
|
||||
|
||||
cd ./build/`uname`/*/10.15/install/ifcopenshell
|
||||
mkdir -p ~/output
|
||||
install_root="$PWD"
|
||||
@@ -180,9 +193,15 @@ jobs:
|
||||
# root because their install rule uses `BUNDLE DESTINATION "."` —
|
||||
# that's the layout Qt's macdeployqt expects. macdeployqt has
|
||||
# already embedded the Qt frameworks inside each bundle during
|
||||
# install/strip, so we zip the .app as-is.
|
||||
# install/strip, so the only thing left to stage is the connector.
|
||||
find "$install_root" -maxdepth 1 -type d -name "*.app" | while read app_path; do
|
||||
app=`basename "$app_path" .app`
|
||||
if [ "$app" = "BonsaiViewer" ]; then
|
||||
# ConnectorDiscovery looks in applicationDirPath()/connectors,
|
||||
# which for a bundle is Contents/MacOS.
|
||||
mkdir -p "$app_path/Contents/MacOS/connectors"
|
||||
cp -a "$autodesk_connector_dir" "$app_path/Contents/MacOS/connectors/"
|
||||
fi
|
||||
pushd "$install_root" > /dev/null
|
||||
zip -qq -r "$HOME/output/${app}-${VERSION}-${GITHUB_SHA:0:7}-macos${{ matrix.oldarch }}64.zip" "$(basename "$app_path")"
|
||||
popd > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user