Skip to content

Commit

Permalink
[examples] Drop CI requirement for DISPLAY
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri committed Oct 31, 2024
1 parent 7edf858 commit cf53244
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
23 changes: 1 addition & 22 deletions .github/ci_setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ on:
branches:
- main

env:
# Always use the Xvfb service's display.
DISPLAY: ":99"

jobs:
bazel_test:
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions examples/ball_bin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf53244

Please sign in to comment.