[2024年度ゼミ] Tsubaki's work #302
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
DISPLAY: ':0.0' | |
jobs: | |
ros: | |
runs-on: ubuntu-latest | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- ROS_DISTRO: indigo | |
CONTAINER: jskrobotics/ros-ubuntu:14.04-pcl | |
NOT_TEST_INSTALL: true | |
- ROS_DISTRO: indigo | |
CONTAINER: jskrobotics/ros-ubuntu:14.04-pcl | |
BEFORE_SCRIPT: "ls -al; ls -al jsk_demos/; TEST_ROBOT=pr2 ./jsk_demos/.travis.before_script.sh" | |
TEST_PKGS : "detect_cans_in_fridge_201202 elevator_move_base_pr2 interactive_behavior_201409 jsk_2011_07_pr2_semantic jsk_2013_04_pr2_610 jsk_demo_common jsk_maps" | |
NOT_TEST_INSTALL: true | |
- ROS_DISTRO: indigo | |
CONTAINER: jskrobotics/ros-ubuntu:14.04-pcl | |
BEFORE_SCRIPT: "TEST_ROBOT=fetch ./jsk_demos/.travis.before_script.sh" | |
TEST_PKGS: "jsk_2017_10_semi jsk_maps" | |
NOT_TEST_INSTALL: true | |
- ROS_DISTRO: kinetic | |
CONTAINER: jskrobotics/ros-ubuntu:16.04-pcl | |
- ROS_DISTRO: melodic | |
CONTAINER: jskrobotics/ros-ubuntu:18.04-pcl | |
- ROS_DISTRO: melodic | |
CONTAINER: jskrobotics/ros-ubuntu:18.04-pcl | |
BEFORE_SCRIPT: "TEST_ROBOT=fetch ./jsk_demos/.travis.before_script.sh" | |
- ROS_DISTRO: noetic | |
CONTAINER: jskrobotics/ros-ubuntu:20.04-pcl | |
EXTRA_DEB : "python3-rospkg python3-rospkg-modules" # drc_task_common need rospkg, but not installed | |
USE_DEB : false | |
container: ${{ matrix.CONTAINER }} | |
steps: | |
- name: Install latest git ( use sudo for ros-ubuntu ) | |
run: | | |
# https://github.com/osrf/docker_images/issues/697#issuecomment-1819626877 | |
sudo apt-key del 4B63CF8FDE49746E98FA01DDAD19BAB3CBF125EA || echo "OK" | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4B63CF8FDE49746E98FA01DDAD19BAB3CBF125EA || echo "OK" | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys AD19BAB3CBF125EA || echo "OK" | |
[ -e /etc/apt/sources.list.d/ubuntu-esm-infra-$(lsb_release -cs).list ] && sudo rm /etc/apt/sources.list.d/ubuntu-esm-infra-$(lsb_release -cs).list ## fix Err https://esm.ubuntu.com trusty-infra-security/main amd64 Packages, gnutls_handshake() failed: Handshake failed | |
(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 -E 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) | |
sudo chown -R $USER $GITHUB_WORKSPACE | |
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/ | |
- name: Chcekout | |
uses: actions/[email protected] | |
- name: Start X server | |
run: | | |
if [[ "${{ matrix.CONTAINER }}" =~ "jskrobotics/ros-ubuntu:14.04" ]]; then exit 0; fi | |
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: Run jsk_travis | |
uses: jsk-ros-pkg/jsk_travis@master | |
with: | |
ROS_PARALLEL_JOBS : "-j8" | |
CATKIN_PARALLEL_JOBS : "-p8" | |
ROS_PARALLEL_TEST_JOBS : "-j8" | |
CATKIN_PARALLEL_TEST_JOBS : "-p8" | |
BEFORE_SCRIPT : "mkdir -p ros-${{ matrix.ROS_DISTRO }}-julius/DEBIAN; /bin/echo -e 'Package: ros-${{ matrix.ROS_DISTRO }}-julius\nVersion: 100.0.0\nArchitecture: all\nMaintainer: [email protected]\nDescription: To speedup install process\n' > ros-${{ matrix.ROS_DISTRO }}-julius/DEBIAN/control; dpkg-deb --build ros-${{ matrix.ROS_DISTRO }}-julius; sudo dpkg -i ./ros-${{ matrix.ROS_DISTRO }}-julius.deb; ${{ matrix.BEFORE_SCRIPT }}" | |
ROS_DISTRO : ${{ matrix.ROS_DISTRO }} | |
USE_DEB : ${{ matrix.USE_DEB }} | |
NOT_TEST_INSTALL : ${{ matrix.NOT_TEST_INSTALL }} | |
TEST_PKGS : ${{ matrix.TEST_PKGS }} | |
EXTRA_DEB : ${{ matrix.EXTRA_DEB }} |