Skip to content

Commit

Permalink
add test to compile on 22.04, see jsk-ros-pkg#1770
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Dec 10, 2022
1 parent 7697952 commit 4e8008c
Showing 1 changed file with 138 additions and 63 deletions.
201 changes: 138 additions & 63 deletions .github/workflows/config.yml
Expand Up @@ -8,79 +8,154 @@ env:
DISPLAY: ':0.0'

jobs:
ros:
# ros:
# runs-on: ubuntu-latest
# # continue-on-error: ${{ matrix.experimental }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - ROS_DISTRO: indigo
# CONTAINER: jskrobotics/ros-ubuntu:14.04
# ROS_PARALLEL_TEST_JOBS: "-j8"
# # latest catkin_virtualenv with pip==21.0.1 is incompatible with python 2.x
# # https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/237
# BEFORE_SCRIPT : "sudo pip install virtualenv==15.1.0"
# - ROS_DISTRO: kinetic
# CONTAINER: ubuntu:16.04
# ROS_PARALLEL_TEST_JOBS: "-j8"
# - ROS_DISTRO: melodic
# CONTAINER: ubuntu:18.04
# ROS_PARALLEL_TEST_JOBS: "-j8"
# - ROS_DISTRO: noetic
# CONTAINER: ubuntu:20.04
# ROS_PARALLEL_TEST_JOBS: "-j8"


# container: ${{ matrix.CONTAINER }}
# steps:
# - name: Install latest git ( use sudo for ros-ubuntu )
# run: |
# (apt-get update && apt-get install -y sudo) || echo "OK"
# sudo apt-get update && sudo apt-get install -y software-properties-common && sudo apt-get update && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git

# - name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613
# run: |
# set -x
# export USER=$(whoami)
# if [ "${{ matrix.CONTAINER }}" = "jskrobotics/ros-ubuntu:14.04" ]; then
# git config --global --add safe.directory $GITHUB_WORKSPACE || echo "OK" # Show 'could not lock config file /github/home/.gitconfig: Permission denied', but it is ok
# sudo mkdir -p /__w/
# sudo chmod 777 -R /__w/
# sudo chown -R $USER $HOME
# # sudo mkdir -p /home/runner/work/_temp/_github_workflow/
# # sudo chown -R $USER $HOME /home/runner/work/_temp/_github_workflow/
# # ls -al /home/runner/work/_temp/_github_workflow/
# else
# git config --global --add safe.directory $GITHUB_WORKSPACE
# fi

# - name: Chcekout
# uses: actions/checkout@v3.0.2

# - name: Start X server
# run: |
# if [[ "${{ matrix.CONTAINER }}" =~ "jskrobotics/ros-ubuntu:14.04" ]]; then exit 0; fi
# echo 'debconf debconf/frontend select Noninteractive' | 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: Run jsk_travis
# uses: jsk-ros-pkg/jsk_travis@master
# with:
# ROS_PARALLEL_JOBS : ${{ matrix.ROS_PARALLEL_JOBS }}
# CATKIN_PARALLEL_JOBS : ${{ matrix.CATKIN_PARALLEL_JOBS }}
# ROS_PARALLEL_TEST_JOBS : ${{ matrix.ROS_PARALLEL_TEST_JOBS }}
# CATKIN_PARALLEL_TEST_JOBS : ${{ matrix.CATKIN_PARALLEL_TEST_JOBS }}
# ROS_DISTRO : ${{ matrix.ROS_DISTRO }}
# USE_DEB : ${{ matrix.USE_DEB }}
# NOT_TEST_INSTALL : ${{ matrix.NOT_TEST_INSTALL }}
# TEST_PKGS : ${{ matrix.TEST_PKGS }}
# BEFORE_SCRIPT : ${{ matrix.BEFORE_SCRIPT }}
# EXTRA_DEB : ${{ matrix.EXTRA_DEB }}


ubuntu:
runs-on: ubuntu-latest
# continue-on-error: ${{ matrix.experimental }}

strategy:
fail-fast: false
matrix:
include:
- ROS_DISTRO: indigo
CONTAINER: jskrobotics/ros-ubuntu:14.04
ROS_PARALLEL_TEST_JOBS: "-j8"
# latest catkin_virtualenv with pip==21.0.1 is incompatible with python 2.x
# https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/237
BEFORE_SCRIPT : "sudo pip install virtualenv==15.1.0"
- ROS_DISTRO: kinetic
CONTAINER: ubuntu:16.04
ROS_PARALLEL_TEST_JOBS: "-j8"
- ROS_DISTRO: melodic
CONTAINER: ubuntu:18.04
ROS_PARALLEL_TEST_JOBS: "-j8"
- ROS_DISTRO: noetic
CONTAINER: ubuntu:20.04
ROS_PARALLEL_TEST_JOBS: "-j8"


container: ${{ matrix.CONTAINER }}
- DISTRO: ubuntu:22.04
- DISTRO: ubuntu:22.10

container: ${{ matrix.DISTRO }}

steps:
- name: Install latest git ( use sudo for ros-ubuntu )
- name: Chcekout Source
uses: actions/checkout@v3.0.2

- name: Install Buildtools
run: |
(apt-get update && apt-get install -y sudo) || echo "OK"
sudo apt-get update && sudo apt-get install -y software-properties-common && sudo apt-get update && sudo add-apt-repository -y ppa:git-core/ppa && sudo apt-get update && sudo apt-get install -y git
set -x
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
apt update -q
apt install -y -q -qq catkin git curl build-essential libboost-all-dev python3-pip python3-venv python3-rosdep2
apt install -y -q -qq ros-desktop-dev rosbash
apt install -y -q -qq libself-test-dev libpcl-ros-dev
apt install -y -q -qq ros-core-dev ros-robot-dev
pip install vcstool
rosdep update
- name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613
- name: Setup rosinstall_generator
run: |
set -x
export USER=$(whoami)
if [ "${{ matrix.CONTAINER }}" = "jskrobotics/ros-ubuntu:14.04" ]; then
git config --global --add safe.directory $GITHUB_WORKSPACE || echo "OK" # Show 'could not lock config file /github/home/.gitconfig: Permission denied', but it is ok
sudo mkdir -p /__w/
sudo chmod 777 -R /__w/
sudo chown -R $USER $HOME
# sudo mkdir -p /home/runner/work/_temp/_github_workflow/
# sudo chown -R $USER $HOME /home/runner/work/_temp/_github_workflow/
# ls -al /home/runner/work/_temp/_github_workflow/
else
git config --global --add safe.directory $GITHUB_WORKSPACE
fi
- name: Chcekout
uses: actions/checkout@v3.0.2
# install rosinstall_geneartor with --depend-type buildtool build, see https://github.com/ros-infrastructure/rosinstall_generator/pull/81
git clone https://github.com/k-okada/rosinstall_generator -b add_depend_type
cd rosinstall_generator
python3 ./setup.py install
- name: Start X server
- name: Setup Dependencies Workspace
run: |
if [[ "${{ matrix.CONTAINER }}" =~ "jskrobotics/ros-ubuntu:14.04" ]]; then exit 0; fi
echo 'debconf debconf/frontend select Noninteractive' | 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
set -x
# install dependencies
mkdir -p ~/ws_depend/src
cd ~/ws_depend/src
ROS_PACKAGE_PATH=/usr/share rosinstall_generator --rosdistro noetic --from-path $GITHUB_WORKSPACE --deps --exclude RPP --depend-type buildtool build | tee repos
vcs import --shallow < repos
# override to use latest development for 22.04
rosinstall_generator laser_filters laser_assembler map_server --rosdistro noetic --upstream-development | vcs import --force
rosinstall_generator catkin_virtualenv --rosdistro noetic | vcs import --force
rm -fr jsk_common
curl -s -L -O https://patch-diff.githubusercontent.com/raw/locusrobotics/catkin_virtualenv/pull/89.diff
patch -p1 < 89.diff
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
cd ..
catkin_make_isolated --cmake-args -DCATKIN_ENABLE_TESTING=OFF
- name: Run jsk_travis
uses: jsk-ros-pkg/jsk_travis@master
with:
ROS_PARALLEL_JOBS : ${{ matrix.ROS_PARALLEL_JOBS }}
CATKIN_PARALLEL_JOBS : ${{ matrix.CATKIN_PARALLEL_JOBS }}
ROS_PARALLEL_TEST_JOBS : ${{ matrix.ROS_PARALLEL_TEST_JOBS }}
CATKIN_PARALLEL_TEST_JOBS : ${{ matrix.CATKIN_PARALLEL_TEST_JOBS }}
ROS_DISTRO : ${{ matrix.ROS_DISTRO }}
USE_DEB : ${{ matrix.USE_DEB }}
NOT_TEST_INSTALL : ${{ matrix.NOT_TEST_INSTALL }}
TEST_PKGS : ${{ matrix.TEST_PKGS }}
BEFORE_SCRIPT : ${{ matrix.BEFORE_SCRIPT }}
EXTRA_DEB : ${{ matrix.EXTRA_DEB }}
- name: Setup Workspace
run: |
set -x
# hack!
apt install -y -q -qq python-is-python3
sed -i s/noetic/Debian/ $GITHUB_WORKSPACE/jsk_rosbag_tools/CMakeLists.txt
# setup workspace
mkdir -p ~/ws_current/src
cd ~/ws_current/src
ln -sf $GITHUB_WORKSPACE .
rosdep install -qq -r -y --from-path . --ignore-src || echo "OK"
- name: Compile Packages
run: |
set -x
cd ~/ws_current/
source ~/ws_depend/devel_isolated/setup.bash
catkin_make_isolated --cmake-args -DCATKIN_ENABLE_TESTING=OFF
shell: bash

0 comments on commit 4e8008c

Please sign in to comment.