Update Ubuntu18.04-build.yaml #33
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
name: Ubuntu18.04 Melodic | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**/README.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:18.04 | |
options: --privileged # Allow privileged mode to use sudo | |
env: | |
ROS_CI_DESKTOP: "`lsb_release -cs`" | |
ROS_DISTRO: melodic | |
steps: | |
- name: Install sudo | |
run: | | |
apt-get update | |
apt-get install -y sudo | |
- name: Install dependencies | |
run: | | |
sudo DEBIAN_FRONTEND=noninteractive apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
curl \ | |
python3-rosdep \ | |
python3-rosinstall \ | |
python3-rosinstall-generator \ | |
python3-wstool \ | |
build-essential \ | |
&& sudo rm -rf /var/lib/apt/lists/* | |
- name: Add ROS repository | |
run: echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/ros-latest.list | |
- name: Install ROS key | |
run: curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - | |
- name: Update package index | |
run: sudo apt-get update | |
- name: Install ROS Melodic | |
run: sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ros-melodic-desktop-full | |
- name: Initialize rosdep | |
run: yes | sudo rosdep init && sudo rosdep update | |
- name: Install additional ROS packages | |
run: sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ros-${ROS_DISTRO}-octomap* ros-${ROS_DISTRO}-mavros* ros-${ROS_DISTRO}-vision-msgs | |
- name: Set up catkin workspace | |
run: | | |
sudo mkdir -p ~/catkin_ws/src | |
sudo ln -s $GITHUB_WORKSPACE ~/catkin_ws/src/ | |
cd ~/catkin_ws | |
source /opt/ros/${ROS_DISTRO}/setup.bash | |
catkin_make |