Skip to content

CI of RobotArrayVisualization #37

CI of RobotArrayVisualization

CI of RobotArrayVisualization #37

Workflow file for this run

name: CI of RobotArrayVisualization
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
schedule:
- cron: '0 0 * * 0'
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
build-type: [RelWithDebInfo, Debug]
mc-rtc-version: [head, stable]
compiler: [gcc]
test-name: [TestSingleRobotStateArrayDisplay]
exclude:
- build-type: Debug
mc-rtc-version: stable
include:
- os: ubuntu-20.04
build-type: RelWithDebInfo
mc-rtc-version: head
compiler: gcc
test-name: TestMultiRobotStateArrayDisplay
runs-on: ${{ matrix.os }}
steps:
- name: Setup environment variables
run: |
set -e
set -x
if [ "${{ matrix.os }}" == "ubuntu-20.04" ] && \
[ "${{ matrix.build-type }}" == "RelWithDebInfo" ] && \
[ "${{ matrix.mc-rtc-version }}" == "head" ] && \
[ "${{ matrix.compiler }}" == "gcc" ]
then
echo "RUN_RECORDING_STEPS=true" >> $GITHUB_ENV
else
echo "RUN_RECORDING_STEPS=false" >> $GITHUB_ENV
fi
echo "DISPLAY=:1" >> $GITHUB_ENV
- name: Install dependencies
uses: jrl-umi3218/github-actions/install-dependencies@master
with:
ubuntu: |
apt-mirrors:
mc-rtc:
cloudsmith: mc-rtc/${{ matrix.mc-rtc-version }}
apt: librbdyn-dev doxygen graphviz
ros: |
apt: ros-base
- name: Setup display
run: |
set -e
set -x
sudo apt-get install -y -qq xvfb ffmpeg mesa-utils fluxbox xserver-xorg xserver-xorg-core xserver-xorg-video-all libwayland-egl1-mesa
Xvfb ${{ env.DISPLAY }} -screen 0 1920x1080x24 &
sleep 10s
fluxbox 2> /dev/null &
- name: Catkin build
uses: jrl-umi3218/github-actions/build-catkin-project@master
with:
build-type: ${{ matrix.build-type }}
catkin-test-args: --no-deps
build-packages: robot_array_rviz_plugins
test-packages: robot_array_rviz_plugins
- name: Record video
if: env.RUN_RECORDING_STEPS == 'true'
run: |
. ${GITHUB_WORKSPACE}/catkin_ws/devel/setup.bash
set -e
set -x
ffmpeg -y -f x11grab -s 1920x1080 -r 30 -i ${DISPLAY} -qscale 0 -vcodec huffyuv /tmp/video.avi > /dev/null 2>&1 < /dev/null &
FFMPEG_PID=$!
sleep 1s
rostest robot_array_rviz_plugins ${{ matrix.test-name }}.test --text
sleep 5s
kill -2 ${FFMPEG_PID}
sleep 5s
mkdir -p /tmp/results
ffmpeg -nostats -i /tmp/video.avi /tmp/results/RARP-video-${{ matrix.test-name }}.mp4
- name: Upload video
if: env.RUN_RECORDING_STEPS == 'true'
uses: actions/upload-artifact@v3
with:
name: RARP-ci-results
path: /tmp/results