GitHub Actions: Use software OpenGL driver for tests on Linux

As done for the Windows configuration. macOS comes automagically with
a software renderer.

Change-Id: Ifa64fc80f9ce69b87fb589675e794ac3b537cc48
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2022-07-13 21:21:07 +02:00
parent 9c09ade2ed
commit 5088781693

View File

@@ -121,7 +121,10 @@ jobs:
COMMAND sudo apt update
)
execute_process(
COMMAND sudo apt install libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev
COMMAND
sudo apt install libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxcb-randr0 libxcb-icccm4
xvfb
RESULT_VARIABLE result
)
if (NOT result EQUAL 0)
@@ -605,14 +608,16 @@ jobs:
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
if ("${{ runner.os }}" STREQUAL "Linux")
set(ENV{QT_QPA_PLATFORM} "offscreen")
set(ENV{DISPLAY} ":1")
set(ENV{LIBGL_ALWAYS_SOFTWARE} "1")
set(ctest_launcher xvfb-run --auto-servernum --server-num=1)
elseif ("${{ runner.os }}" STREQUAL "Windows")
set(ENV{QT_OPENGL} "software")
set(ENV{QT_ASSUME_STDERR_HAS_CONSOLE} "1")
endif()
execute_process(
COMMAND ctest -j ${N} --timeout 60 --label-exclude exclude_from_precheck --exclude-regex tst_perfdata
COMMAND ${ctest_launcher} ctest -j ${N} --timeout 60 --label-exclude exclude_from_precheck --exclude-regex tst_perfdata
WORKING_DIRECTORY build/build
RESULT_VARIABLE result
OUTPUT_VARIABLE output