Skip to content

Commit fbb0da7

Browse files
committed
add .github/workflows/config.yml
1 parent 499b274 commit fbb0da7

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/config.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
7+
env:
8+
DISPLAY: ':0.0'
9+
10+
jobs:
11+
ros:
12+
runs-on: ubuntu-latest
13+
continue-on-error: false
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- ROS_DISTRO: melodic
19+
- ROS_DISTRO: noetic
20+
21+
container:
22+
image: ros:${{ matrix.ROS_DISTRO }}-ros-core
23+
24+
steps:
25+
- name: Chcekout
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: true
29+
30+
- name: Start X server
31+
run: |
32+
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
33+
sudo apt-get -y -qq install mesa-utils x11-xserver-utils xserver-xorg-video-dummy wget
34+
export DISPLAY=:0
35+
wget https://raw.githubusercontent.com/jsk-ros-pkg/jsk_travis/master/dummy.xorg.conf -O /tmp/dummy.xorg.conf
36+
sudo Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile /tmp/xorg.log -config /tmp/dummy.xorg.conf $DISPLAY &
37+
sleep 3 # wait x server up
38+
export QT_X11_NO_MITSHM=1 # http://wiki.ros.org/docker/Tutorials/GUI
39+
xhost +local:root
40+
shell: bash
41+
42+
- name: Setup Workspace
43+
run: |
44+
source /opt/ros/${{ matrix.ROS_DISTRO }}/setup.bash
45+
set -x
46+
# setup workspace
47+
mkdir -p ~/ws/src
48+
cd ~/ws/src
49+
ln -sf $GITHUB_WORKSPACE .
50+
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
51+
shell: bash
52+
53+
- name: Compile Packages
54+
run: |
55+
source /opt/ros/${{ matrix.ROS_DISTRO }}/setup.bash
56+
set -x
57+
cd ~/ws/
58+
catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
59+
shell: bash
60+
61+
- name: Test Packages
62+
run: |
63+
source /opt/ros/${{ matrix.ROS_DISTRO }}/setup.bash
64+
set -x
65+
cd ~/ws/
66+
catkin test --no-status -sv ${{ matrix.CATKIN_OPTIONS }} --cmake-args -DCATKIN_ENABLE_TESTING=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.CMAKE_OPTIONS }}
67+
shell: bash

0 commit comments

Comments
 (0)