mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-15 18:14:08 +00:00
ci: wgpu sanity check on macOS
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>
This commit is contained in:
+18
-17
@@ -681,24 +681,25 @@ if(BUILD_IFCGEOM)
|
||||
|
||||
install(TARGETS ${IFCGEOM_SCHEMA_LIBRARIES} ${kernel_libraries} IfcGeom)
|
||||
endif(BUILD_IFCGEOM)
|
||||
if(BUILD_BONSAIVIEWER)
|
||||
if(BUILD_BONSAIVIEWER_TESTS)
|
||||
# Catch2 v3 — fetched on demand. Test option is OFF by default so the
|
||||
# default build remains offline-capable.
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.5.4
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
enable_testing()
|
||||
endif()
|
||||
# Catch2 fetch hoisted out of BUILD_BONSAIVIEWER so the standalone wgpu
|
||||
# build can also enable BUILD_BONSAIVIEWER_TESTS. Test option is OFF by
|
||||
# default so the default build remains offline-capable.
|
||||
if(BUILD_BONSAIVIEWER_TESTS)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.5.4
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
if(BUILD_BONSAIVIEWER)
|
||||
# Wgpu subprojects added first because IfcViewer's SceneLoader now
|
||||
# links against IfcViewerWgpu; the target must exist when IfcViewer's
|
||||
# CMakeLists runs.
|
||||
|
||||
Reference in New Issue
Block a user