Skip to content

Update main.yml

Update main.yml #5

Workflow file for this run

name: ROS Build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-20.04
env:
ROS_CI_DESKTOP: "`lsb_release -cs`" # e.g. [trusty|xenial|...]
ROS_DISTRO: noetic
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: catkin_ws/src/hik_camera_driver
- name: Install ROS
run: |
sudo sh -c "echo \"deb http://packages.ros.org/ros/ubuntu $ROS_CI_DESKTOP main\" > /etc/apt/sources.list.d/ros-latest.list"
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt-get update -qq
sudo apt-get install dpkg
sudo apt-get install -y python3-catkin-pkg
sudo apt-get install -y python3-catkin-tools
sudo apt-get install -y python3-osrf-pycommon
sudo apt-get install -y python3-rosdep
sudo apt-get install -y python3-wstool
sudo apt-get install -y ros-cmake-modules
sudo apt-get install -y ros-$ROS_DISTRO-catkin
source /opt/ros/$ROS_DISTRO/setup.bash
- name: Install ROS packages with rosdep
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
sudo rosdep init
rosdep update
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
rosdep install --from-paths src --ignore-src -r -s # do a dry-run first
rosdep install --from-paths src --ignore-src -r -y
- name: catkin build
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
cd ~/catkin_ws
catkin config --install --cmake-args -DCMAKE_BUILD_TYPE=Release
catkin build --no-status
source devel/setup.bash
zip -q -r ~/hik_camera_driver.zip ~/catkin_ws
- name: lint
run: |
cd ~/catkin_ws
# nothing uses linting here so this fails:
# "Error: With --no-deps, you must specify packages to build."
# catkin build $(catkin list --depends-on roslint -u) --no-deps --catkin-make-args roslint
#
- name: Tests
run: |
cd ~/catkin_ws
# nothing uses linting here so this fails:
# "Error: With --no-deps, you must specify packages to build."
catkin run_tests
- name: Upload Package
uses: actions/upload-artifact@v2
with:
name: hik_camera_driver
path: ~/hik_camera_driver.zip