From cf5324430014c0a24c33e7191bafa16e65e82b4d Mon Sep 17 00:00:00 2001 From: Jeremy Nimmer Date: Thu, 31 Oct 2024 07:09:50 -0700 Subject: [PATCH] [examples] Drop CI requirement for DISPLAY --- .bazelrc | 4 ---- .github/ci_setup.bash | 23 +---------------------- .github/workflows/main.yml | 4 ---- examples/ball_bin.yaml | 6 ++++-- 4 files changed, 5 insertions(+), 32 deletions(-) diff --git a/.bazelrc b/.bazelrc index 9e7be94..b8df98f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -5,10 +5,6 @@ common --keep_going=yes build --test_output=errors build --test_summary=terse -# Inject DISPLAY into test runner environment for tests that use X. -build --test_env=DISPLAY -build --sandbox_add_mount_pair=/tmp/.X11-unix - # Add `bazel test --config=lint` shortcut for linting. build:lint --test_tag_filters=lint diff --git a/.github/ci_setup.bash b/.github/ci_setup.bash index e129028..537d324 100755 --- a/.github/ci_setup.bash +++ b/.github/ci_setup.bash @@ -2,25 +2,4 @@ set -euxo pipefail -# Downgrade mesa per https://github.com/RobotLocomotion/drake/issues/18726. -sudo apt-get --assume-yes --allow-downgrades install \ - xvfb \ - libegl1 \ - libegl-mesa0=22.0.1-1ubuntu2 \ - libgbm1=22.0.1-1ubuntu2 \ - libgl1-mesa-dri=22.0.1-1ubuntu2 \ - libglapi-mesa=22.0.1-1ubuntu2 \ - libglx-mesa0=22.0.1-1ubuntu2 - -cat << EOF | sudo tee /lib/systemd/system/xvfb.service -[Unit] -After=network.target - -[Service] -ExecStart=/usr/bin/Xvfb :99 -screen 0 1280x1024x24 -ac +extension GLX +extension RANDR +render -noreset - -[Install] -WantedBy=multi-user.target -EOF - -sudo systemctl --now --quiet enable /lib/systemd/system/xvfb.service +sudo apt-get --assume-yes install libegl1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c37134d..efda4d7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,10 +10,6 @@ on: branches: - main -env: - # Always use the Xvfb service's display. - DISPLAY: ":99" - jobs: bazel_test: runs-on: ubuntu-latest diff --git a/examples/ball_bin.yaml b/examples/ball_bin.yaml index 5f8f611..8d274c5 100644 --- a/examples/ball_bin.yaml +++ b/examples/ball_bin.yaml @@ -60,8 +60,10 @@ cameras: vtk_camera: name: vtk_camera renderer_name: vtk - renderer_class: !RenderEngineVtkParams {} - show_rgb: True # Use a live on-screen preview. + renderer_class: !RenderEngineVtkParams + backend: EGL + # For `show_rgb: True` you must also set the `backend: GLX` on prior line. + show_rgb: False width: 1024 height: 1024 fps: 8.0