From d57c812fa6be312c6e300272cf604fd9c5f1032b Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sun, 2 Aug 2026 16:24:16 +0800 Subject: [PATCH] ci: fix three platform-specific build failures - Linux: Qt6 metatype static_assert requires complete types; declare OakEngineBlock with Q_DECLARE_OPAQUE_POINTER in the public header (outside extern "C") - Windows: gtest discovery runs the freshly linked test exe at build time and it cannot find the DLLs (0xc0000135); copy oakcore/oakengine/ ffmpeg_bridge DLLs next to the test binaries on WIN32 - macOS: Imath header mixing between otio-install's stale bundled Imath and Homebrew's Imath broke ImathBox.h (V2h undeclared); bump the OTIO cache to v2 and drop bundled Imath headers so the system one is the only set in play --- .github/workflows/ci.yml | 12 +++++++++--- core/tests/CMakeLists.txt | 7 +++++++ engine/CMakeLists.txt | 11 +++++++++++ engine/include/oakengine/timeline.h | 5 +++++ 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6f05cd56..19d03b571 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,11 +62,17 @@ jobs: uses: actions/cache@v4 with: path: otio-install - key: otio-0.16.0-${{ runner.os }}-v1 + key: otio-0.16.0-${{ runner.os }}-v2 - name: Set OTIO location (Unix) if: runner.os != 'Windows' - run: echo "OTIO_LOCATION=${PWD}/otio-install" >> "$GITHUB_ENV" + run: | + echo "OTIO_LOCATION=${PWD}/otio-install" >> "$GITHUB_ENV" + # With OTIO_FIND_IMATH=ON the system (brew/apt) Imath must be the + # only Imath header set in play; drop any bundled headers a stale + # cache entry may have brought back (they collide with the system + # include guards and break ImathBox.h). + rm -rf "${PWD}/otio-install/include/Imath" - name: Build OpenTimelineIO (Unix) if: runner.os != 'Windows' && steps.otio-cache.outputs.cache-hit != 'true' @@ -120,7 +126,7 @@ jobs: uses: actions/cache@v4 with: path: otio-install - key: otio-0.16.0-${{ runner.os }}-v1 + key: otio-0.16.0-${{ runner.os }}-v2 - name: Set OTIO location (Windows) if: runner.os == 'Windows' diff --git a/core/tests/CMakeLists.txt b/core/tests/CMakeLists.txt index 7ca28ed71..605cde22b 100644 --- a/core/tests/CMakeLists.txt +++ b/core/tests/CMakeLists.txt @@ -32,3 +32,10 @@ target_include_directories(oakcore_gtest PRIVATE ) gtest_discover_tests(oakcore_gtest) + +if (WIN32) + # gtest discovery executes the binary at build time; it needs the DLL next to it + add_custom_command(TARGET oakcore_gtest POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ $) +endif () diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index a3a3a2a99..915ed4b4f 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -292,6 +292,17 @@ if (BUILD_TESTS) # Freshly linked binaries can exceed the 5s default discovery # timeout on first run (dyld cold cache + Qt/OCIO init) gtest_discover_tests(${name} DISCOVERY_TIMEOUT 60) + if (WIN32) + # gtest discovery executes the binary at build time; it needs + # the engine DLLs next to it + add_custom_command(TARGET ${name} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ $ + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ $ + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ $) + endif () endfunction() make_oakengine_gtest(oakengine_ipc_test) diff --git a/engine/include/oakengine/timeline.h b/engine/include/oakengine/timeline.h index 061f23a9d..2f774e3cb 100644 --- a/engine/include/oakengine/timeline.h +++ b/engine/include/oakengine/timeline.h @@ -1308,6 +1308,11 @@ oakengine_clip_get_connected_viewer(const OakEngineBlock *clip); #ifdef __cplusplus } + +// Qt6 on some toolchains requires complete types in meta-type instantiations +// (e.g. QList in TimelinePanel signals); declare the handle +// opaque instead of pulling the engine definition into the public header. +Q_DECLARE_OPAQUE_POINTER(OakEngineBlock *) #endif #endif /* OAKENGINE_TIMELINE_H */