From 4554f7429d45a0c7a5b92a7cd9c8ede9073863c2 Mon Sep 17 00:00:00 2001 From: Zhefan Xu Date: Fri, 22 Mar 2024 23:03:14 -0400 Subject: [PATCH] Update Ubuntu18.04-build.yaml --- .github/workflows/Ubuntu18.04-build.yaml | 63 ++++++++++-------------- 1 file changed, 25 insertions(+), 38 deletions(-) diff --git a/.github/workflows/Ubuntu18.04-build.yaml b/.github/workflows/Ubuntu18.04-build.yaml index b573344..820bee3 100644 --- a/.github/workflows/Ubuntu18.04-build.yaml +++ b/.github/workflows/Ubuntu18.04-build.yaml @@ -12,56 +12,43 @@ on: paths-ignore: - '**/README.md' + jobs: build: runs-on: ubuntu-latest - container: - image: ubuntu:18.04 - options: --privileged # Allow privileged mode to use sudo - + container: ubuntu:18.04 env: ROS_CI_DESKTOP: "`lsb_release -cs`" ROS_DISTRO: melodic - steps: - - name: Install sudo + - uses: actions/checkout@v2 + with: + submodule: recursive + - name: Install sudo and software-properties-common run: | apt-get update - apt-get install -y sudo - + apt-get install -y sudo software-properties-common + - name: Install ROS Melodic + run: | + sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' + sudo apt install curl + curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - + sudo apt update + sudo apt install ros-melodic-desktop-full + source /opt/ros/${ROS_DISTRO}/setup.bash + - name: Install ROS packages with rosdep + run: | + sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential + sudo apt install python-rosdep + sudo rosdep init + rosdep update - 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 + sudo apt install -y ros-${ROS_DISTRO}-octomap* ros-${ROS_DISTRO}-mavros* ros-${ROS_DISTRO}-vision-msgs + - name: catkin make run: | - sudo mkdir -p ~/catkin_ws/src - sudo ln -s $GITHUB_WORKSPACE ~/catkin_ws/src/ + mkdir -p ~/catkin_ws/src + ln -s $GITHUB_WORKSPACE ~/catkin_ws/src/ cd ~/catkin_ws source /opt/ros/${ROS_DISTRO}/setup.bash catkin_make