From a3e9f8d56e6987df1f3cbb217859bcd32c11ef65 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Mon, 25 Mar 2024 17:09:20 -0500 Subject: [PATCH] Setup rendering environment before cmake runs (#1965) CMake checks if rendering is available to enable some tests, so the rendering environment needs to be set before CMake runs. --------- Signed-off-by: Addisu Z. Taddese --- .github/ci/after_make.sh | 9 --------- .github/ci/before_cmake.sh | 9 +++++++++ .github/ci/packages.apt | 2 ++ .github/workflows/ci.yml | 3 +++ include/gz/sim/playback_server.config | 4 ++-- 5 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 .github/ci/before_cmake.sh diff --git a/.github/ci/after_make.sh b/.github/ci/after_make.sh index a3b79b0ae9..283c904b3a 100644 --- a/.github/ci/after_make.sh +++ b/.github/ci/after_make.sh @@ -4,12 +4,3 @@ set -x # Install (needed for some tests) make install - -# For ign-tools -export IGN_CONFIG_PATH=/usr/local/share/ignition - -# For rendering / window tests -Xvfb :1 -screen 0 1280x1024x24 & -export DISPLAY=:1.0 -export RENDER_ENGINE_VALUES=ogre2 -export MESA_GL_VERSION_OVERRIDE=3.3 diff --git a/.github/ci/before_cmake.sh b/.github/ci/before_cmake.sh new file mode 100644 index 0000000000..308074bc46 --- /dev/null +++ b/.github/ci/before_cmake.sh @@ -0,0 +1,9 @@ +#!/bin/sh -l + +set -x + +# For rendering / window tests +Xvfb :1 -screen 0 1280x1024x24 & +export DISPLAY=:1.0 +export RENDER_ENGINE_VALUES=ogre2 +export MESA_GL_VERSION_OVERRIDE=3.3 diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 4059cad103..0a95b15483 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -13,3 +13,5 @@ libignition-transport8-dev libsdformat9-dev qml-module-qtqml-models2 xvfb +x11-utils +mesa-utils diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 898b1706f5..0ca0012cdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: uses: ignition-tooling/action-ignition-ci@bionic with: codecov-enabled: true + cmake-args: "-DCMAKE_INSTALL_PREFIX=/usr" focal-ci: runs-on: ubuntu-latest name: Ubuntu Focal CI @@ -29,3 +30,5 @@ jobs: - name: Compile and test id: ci uses: ignition-tooling/action-ignition-ci@focal + with: + cmake-args: "-DCMAKE_INSTALL_PREFIX=/usr" diff --git a/include/gz/sim/playback_server.config b/include/gz/sim/playback_server.config index 17ac79c8d9..9a88489385 100644 --- a/include/gz/sim/playback_server.config +++ b/include/gz/sim/playback_server.config @@ -3,12 +3,12 @@ + name="gz::sim::systems::UserCommands"> + name="gz::sim::systems::SceneBroadcaster">