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

Allow (simulated) display to be used with ci builds #1

Closed
wants to merge 7 commits into from
Closed
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
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ Create a ``.travis.yml`` file in the base of you repo similar to:
# This config file for Travis CI utilizes https://github.com/ros-planning/moveit_ci/ package.
sudo: required
dist: trusty
# apt-get install xvfb. Xvfb is an X server that can be run on machines without display hardware or
# physical input devices.
addons:
apt:
packages:
- xvfb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment here explaining what that crazy word means :)

services:
- docker
language: generic
Expand All @@ -39,6 +45,14 @@ env:
matrix:
allow_failures:
- env: ROS_DISTRO="kinetic" ROS_REPO=ros UPSTREAM_WORKSPACE=https://raw.githubusercontent.com/ros-planning/moveit_docs/kinetic-devel/moveit.rosinstall
install:
# Set the display to virtual frame buffer 99. 99 is used because it is not likely to be in use for
# something else
- export DISPLAY=':99.0'
# Set Xvfb to listen for connections on frame buffer 99 ("Xvfb :99"), and dump STDOUT and STDERR
# output ("> /dev/null 2>&1"). This means that data printed from tests to std::cout or std::cerr
# will not show in CI output.
- Xvfb :99 > /dev/null 2>&1 &
before_script:
- git clone -q https://github.com/ros-planning/moveit_ci.git .moveit_ci
script:
Expand Down
2 changes: 2 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ if ! [ "$IN_DOCKER" ]; then
-e UPSTREAM_WORKSPACE \
-e TRAVIS_BRANCH \
-e TEST_BLACKLIST \
-e "DISPLAY" \
-v "/tmp/.X11-unix:/tmp/.X11-unix:rw" \
-v $(pwd):/root/$REPOSITORY_NAME moveit/moveit_docker:moveit-$ROS_DISTRO-ci \
/bin/bash -c "cd /root/$REPOSITORY_NAME; source .moveit_ci/travis.sh;"
return_value=$?
Expand Down