Skip to content

.github/workflows/config.yml: [run pull/requet] #5

.github/workflows/config.yml: [run pull/requet]

.github/workflows/config.yml: [run pull/requet] #5

Workflow file for this run

on: [push, pull_request]
env:
DISPLAY: ':0.0'
jobs:
ros:
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- ROS_DISTRO: melodic
PYTHON_VERSION: python2
- ROS_DISTRO: noetic
PYTHON_VERSION: python3
container:
image: ros:${{ matrix.ROS_DISTRO }}-ros-core
steps:
- name: Chcekout
uses: actions/checkout@v4
- name: Update apt packages
run: sudo apt update -y -qq
- name: Start X server
run: |
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections || echo "failing on ros-ubuntu is OK" # set non interactive tzdata https://stackoverflow.com/questions/8671308/non-interactive-method-for-dpkg-reconfigure-tzdata
sudo apt-get -y -qq install mesa-utils x11-xserver-utils xserver-xorg-video-dummy wget
export DISPLAY=:0
wget https://raw.githubusercontent.com/jsk-ros-pkg/jsk_travis/master/dummy.xorg.conf -O /tmp/dummy.xorg.conf
sudo Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile /tmp/xorg.log -config /tmp/dummy.xorg.conf $DISPLAY &
sleep 3 # wait x server up
export QT_X11_NO_MITSHM=1 # http://wiki.ros.org/docker/Tutorials/GUI
xhost +local:root
shell: bash
- name: Setup ROS
run: |
sudo apt -y -qq install ${{ matrix.PYTHON_VERSION }}-rosdep ${{ matrix.PYTHON_VERSION }}-catkin-tools
- name: Setup Workspace
run: |
source /opt/ros/${{ matrix.ROS_DISTRO }}/setup.bash
set -x
# setup workspace
mkdir -p ~/ws/src
cd ~/ws/src
ln -sf $GITHUB_WORKSPACE .
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
shell: bash
- name: Compile Packages
run: |
source /opt/ros/${{ matrix.ROS_DISTRO }}/setup.bash
set -x
cd ~/ws/
catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
shell: bash
- name: Test Packages
run: |
source /opt/ros/${{ matrix.ROS_DISTRO }}/setup.bash
set -x
cd ~/ws/
catkin test --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
shell: bash