Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[examples] Drop CI requirement for DISPLAY #95

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
24 changes: 2 additions & 22 deletions .github/ci_setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,5 @@

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
# Rendering in CI (for both Drake and Blender) requires a GL pipeline.
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
7 changes: 5 additions & 2 deletions examples/ball_bin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ 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
# and be running locally with an Xorg display server available.
show_rgb: False
width: 1024
height: 1024
fps: 8.0
Expand Down