Skip to content

Commit

Permalink
Workflows c++
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthuino committed Jan 24, 2024
1 parent 51478a6 commit 12ca14f
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ROS1_Test_Workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: ROS1 Test Workflow

on:
pull_request:
branches: [ main ]

env:
WORKSPACE: "rob_ws"
ROS_DISTRO: "noetic"

jobs:
build-and-test:
runs-on: ubuntu-latest

container:
image: cario360/ros-tiago

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup ROS Environment
run: |
echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
source ~/.bashrc
shell: bash

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-catkin-tools python3-osrf-pycommon
shell: bash

- name: Build
run: |
cd $WORKSPACE
source /opt/ros/$ROS_DISTRO/setup.bash
catkin build
shell: bash


- name: Launch ROS core
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
roscore &
shell: bash

- name: Run Tests
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
cd $WORKSPACE
catkin test
catkin_test_results build
shell: bash
49 changes: 49 additions & 0 deletions .github/workflows/ROS2_Test_Workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ROS2 Test Workflow

on:
pull_request:
branches: [ main ]

env:
WORKSPACE: "vision_ws"
ROS_DISTRO: "foxy"

jobs:
build-and-test:
runs-on: ubuntu-latest

container: # TODO : change docker image
image: cario360/ros2

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup ROS Environment # TODO : check if this is needed
run: |
echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
source ~/.bashrc
shell: bash

- name: Install Dependencies # TODO : check if this is needed
run: |
apt-get update
apt-get install -y python3-colcon-common-extensions
shell: bash

- name: Build
run: |
cd ros2_ws
source /opt/ros/$ROS_DISTRO/setup.bash
colcon build
shell: bash

- name: Run Tests
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
cd ros2_ws
colcon test
colcon test-result --all
shell: bash

# catkin test $(ls src/pge_packages/)
File renamed without changes.

0 comments on commit 12ca14f

Please sign in to comment.