ci: engine tests use dllexport-consistent macros on Windows; run Linux tests under Xvfb

- make_oakengine_gtest embeds oakengine-obj; test code must see
  OAKENGINE_API as dllexport too (OAKENGINE_BUILD), otherwise MinGW
  resolves nothing against __imp_* stubs
- the render worker intentionally drops QT_QPA_PLATFORM=offscreen and
  needs a real display for its GL context; run the Linux ctest and the
  filtered gtest steps under xvfb-run
This commit is contained in:
2026-08-03 13:32:18 +08:00
parent 631f9e5bd1
commit 1af7ab7838
2 changed files with 13 additions and 6 deletions
+7 -6
View File
@@ -40,7 +40,8 @@ jobs:
qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools \ qt6-base-dev qt6-base-dev-tools qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \ libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \
libopencolorio-dev libopenimageio-dev libopenexr-dev libexpat1-dev \ libopencolorio-dev libopenimageio-dev libopenexr-dev libexpat1-dev \
portaudio19-dev libgl1-mesa-dev libxkbcommon-dev ccache portaudio19-dev libgl1-mesa-dev libxkbcommon-dev ccache \
xvfb
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# macOS dependencies # macOS dependencies
@@ -248,7 +249,7 @@ jobs:
if: runner.os == 'Linux' if: runner.os == 'Linux'
env: env:
QT_QPA_PLATFORM: offscreen QT_QPA_PLATFORM: offscreen
run: ctest --test-dir build --output-on-failure -C ${{ env.CMAKE_BUILD_TYPE }} run: xvfb-run -a ctest --test-dir build --output-on-failure -C ${{ env.CMAKE_BUILD_TYPE }}
- name: Test (macOS) - name: Test (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
@@ -266,7 +267,7 @@ jobs:
if: runner.os == 'Linux' if: runner.os == 'Linux'
env: env:
QT_QPA_PLATFORM: offscreen QT_QPA_PLATFORM: offscreen
run: ./build/tests/gtest/olive-gtest --gtest_filter="PluginSmoke*" run: xvfb-run -a ./build/tests/gtest/olive-gtest --gtest_filter="PluginSmoke*"
- name: Plugin Smoke Tests (macOS) - name: Plugin Smoke Tests (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
@@ -281,7 +282,7 @@ jobs:
if: runner.os == 'Linux' if: runner.os == 'Linux'
env: env:
QT_QPA_PLATFORM: offscreen QT_QPA_PLATFORM: offscreen
run: ./build/tests/gtest/olive-gtest --gtest_filter="PluginIntegration.*:PluginMisc.*" run: xvfb-run -a ./build/tests/gtest/olive-gtest --gtest_filter="PluginIntegration.*:PluginMisc.*"
- name: OFX Integration Tests (macOS) - name: OFX Integration Tests (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
@@ -291,7 +292,7 @@ jobs:
if: runner.os == 'Linux' if: runner.os == 'Linux'
env: env:
QT_QPA_PLATFORM: offscreen QT_QPA_PLATFORM: offscreen
run: ./build/tests/gtest/olive-gtest --gtest_filter="AudioSmoke*" run: xvfb-run -a ./build/tests/gtest/olive-gtest --gtest_filter="AudioSmoke*"
- name: Audio Smoke Tests (macOS) - name: Audio Smoke Tests (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
@@ -306,7 +307,7 @@ jobs:
if: runner.os == 'Linux' if: runner.os == 'Linux'
env: env:
QT_QPA_PLATFORM: offscreen QT_QPA_PLATFORM: offscreen
run: ./build/tests/gtest/olive-gtest --gtest_filter="ViewerSmoke*" run: xvfb-run -a ./build/tests/gtest/olive-gtest --gtest_filter="ViewerSmoke*"
- name: Viewer Smoke Tests (macOS) - name: Viewer Smoke Tests (macOS)
if: runner.os == 'macOS' if: runner.os == 'macOS'
+6
View File
@@ -309,6 +309,12 @@ if (BUILD_TESTS)
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)
target_link_options(${name} PRIVATE "LINKER:--export-dynamic") target_link_options(${name} PRIVATE "LINKER:--export-dynamic")
endif () endif ()
if (WIN32)
# The test embeds oakengine-obj; its OAKENGINE_API references must
# match the library side (dllexport), otherwise MinGW looks for
# __imp_* import stubs that only a real DLL import lib provides.
target_compile_definitions(${name} PRIVATE OAKENGINE_BUILD)
endif ()
# Freshly linked binaries can exceed the 5s default discovery # Freshly linked binaries can exceed the 5s default discovery
# timeout on first run (dyld cold cache + Qt/OCIO init) # timeout on first run (dyld cold cache + Qt/OCIO init)
if (WIN32) if (WIN32)