Skip to content

Ouroboros-ROS-CI

Ouroboros-ROS-CI #12

name: Ouroboros-ROS-CI
run-name: Ouroboros-ROS-CI
on:
push:
branches: main
pull_request:
branches:
- main
- develop
jobs:
Ouroboros-ROS-CI:
runs-on: ubuntu-latest
container: ros:noetic-ros-base-focal
steps:
- name: Update git
run: sudo apt update && sudo apt install -y git
- name: Check out repository code
uses: actions/checkout@v4
with:
path: src/ouroboros_repo
submodules: recursive
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Dependencies
run: sudo apt install -y libeigen3-dev pkg-config
- name: Install Ouroboros
run: pwd && ls && cd src/ouroboros_repo && pwd && pip install .
- name: Install ROS packages with rosdep
shell: bash
run: |
source /opt/ros/noetic/setup.bash
rosdep update
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
shell: bash
run: |
source /opt/ros/noetic/setup.bash
catkin build -s
- name: Run test script
shell: bash
run: |
source devel/setup.bash
cd src/ouroboros_repo
pytest extra/ouroboros_ros/tests
- run: echo "🍏 This job's status is ${{ job.status }}."
# Ouroboros-ROS-CI:
# runs-on: ubuntu-20.04
# steps:
# - name: Check out repository code
# uses: actions/checkout@v4
# with:
# path: ouroboros_repo
# submodules: recursive
# - name: Install ROS
# run: |
# sudo 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 -y
# curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
# sudo apt-get update -qq
# sudo apt-get install -y ros-noetic-desktop-full
# sudo apt-get install dpkg
# sudo apt-get install -y python3-rosinstall python3-rosinstall-generator build-essential
# sudo apt-get install -y python3-catkin-tools
# sudo apt-get install -y python3-rosdep
# sudo apt-get install -y python3-wstool
# - name: Check if ROS installed
# run: |
# if [ -d "/opt/ros/noetic" ]; then
# echo "ROS Noetic is installed!"
# else
# echo "ROS Noetic is NOT installed!"
# fi
# - name: Install ROS packages with rosdep
# run: |
# source /opt/ros/noetic/setup.bash
# sudo rosdep init
# rosdep update
# mkdir -p ~/catkin_ws/src
# mv ${{ github.workspace }}/ouroboros_repo ~/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/noetic/setup.bash
# cd ~/catkin_ws
# catkin build -s
# source devel/setup.bash
# - name: Install Ouroboros
# run: cd ~/catkin_ws/src/ouroboros_repo && python -m pip install --upgrade pip && pip install .
# - name: Run test script
# run: cd ~/catkin_ws/src/ouroboros_repo && source ~/catkin_ws/devel/setup.bash && pytest --ignore=third_party
# - run: echo "🍏 This job's status is ${{ job.status }}."