Skip to content

Commit

Permalink
ROS CI based on Noetic Container
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenZephyr committed Feb 22, 2025
1 parent 2625dab commit f64b4da
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 49 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci-action-ros.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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: Dependencies
run: |
sudo apt install -y libeigen3-dev pkg-config ros-noetic-cv-bridge python3-pip
sudo pip install --upgrade pip
sudo python3 -m pip install catkin_tools empy catkin_pkg
- 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 }}."
49 changes: 0 additions & 49 deletions .github/workflows/ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,52 +33,3 @@ jobs:
- name: Run test script
run: cd ${{ github.workspace }}/ouroboros_repo && pytest --ignore=third_party --ignore=extra/ouroboros_ros
- 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 }}."

0 comments on commit f64b4da

Please sign in to comment.