Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 43 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: CI

on:
pull_request:
paths-ignore:
- 'README.md'
branches:
- '**'
workflow_call:
inputs:
ci_target_ref:
required: true
type: string

env:
ROS_DISTRO: rolling
ROS_DISTRO: jazzy

jobs:

micro_ros_build:
runs-on: ubuntu-latest
container:
image: ubuntu:jammy
image: ubuntu:24.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
path: src/micro_ros_setup
ref: ${{ inputs.ci_target_ref }}

- uses: ros-tooling/setup-ros@0.7.0
- uses: ros-tooling/setup-ros@0.7.13
with:
use-ros2-testing: false
required-ros-distributions: ${{ env.ROS_DISTRO }}

- name: Dependencies
run: |
apt update
apt install -y python3-pip
pip3 install colcon-common-extensions
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y

Expand All @@ -44,15 +44,22 @@ jobs:
run: |
(test -f install/micro_ros_setup/lib/micro_ros_setup/build_firmware.sh) && true || false

- uses: actions/upload-artifact@v1
- name: Sanitize Artifact Name
id: sanitize-name
run: |
sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g')
echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV
echo "::set-output name=sanitized_name::$sanitized_name"

- uses: actions/upload-artifact@v4.4.0
with:
name: micro_ros_build
name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }}
path: install

micro_ros_agent:
runs-on: ubuntu-latest
container:
image: ubuntu:jammy
image: ubuntu:24.04
strategy:
fail-fast: false
needs: micro_ros_build
Expand All @@ -61,24 +68,30 @@ jobs:
- uses: actions/checkout@v4
with:
path: src/micro_ros_setup
ref: ${{ inputs.ci_target_ref }}

- uses: ros-tooling/setup-ros@0.7.0
- uses: ros-tooling/setup-ros@0.7.13
with:
use-ros2-testing: false
required-ros-distributions: ${{ env.ROS_DISTRO }}

- name: dependencies
run: |
apt update
apt install -y python3-pip
pip3 install colcon-common-extensions
apt install -y ros-${{ env.ROS_DISTRO }}-rmw-fastrtps-cpp
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y

- uses: actions/download-artifact@v1
- name: Sanitize Artifact Name
id: sanitize-name
run: |
sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g')
echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV
echo "::set-output name=sanitized_name::$sanitized_name"

- uses: actions/download-artifact@v4.1.7
with:
name: micro_ros_build
name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }}
path: install

# Workaround https://github.com/actions/upload-artifact/issues/38
Expand All @@ -100,7 +113,7 @@ jobs:
runs-on: ubuntu-latest
needs: micro_ros_build
container:
image: ubuntu:jammy
image: ubuntu:24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -200,16 +213,13 @@ jobs:
configuration: weather_publisher
binary: 'firmware/bin/weather_publisher'

- rtos: mbed
platform: disco_l475vg_iot01a
binary: 'firmware/micro_ros_mbed/cmake_build/DISCO_L475VG_IOT01A/develop/GCC_ARM/micro_ros_mbed.bin'

steps:
- uses: actions/checkout@v4
with:
path: src/micro_ros_setup
ref: ${{ inputs.ci_target_ref }}

- uses: ros-tooling/setup-ros@0.7.0
- uses: ros-tooling/setup-ros@0.7.13
with:
use-ros2-testing: false
required-ros-distributions: ${{ env.ROS_DISTRO }}
Expand All @@ -219,14 +229,19 @@ jobs:
apt update
apt upgrade -y
apt-get update
apt install -y python3-pip
pip3 install colcon-common-extensions cmake
rosdep update --rosdistro ${{ env.ROS_DISTRO }}
rosdep install --rosdistro ${{ env.ROS_DISTRO }} -y --from-paths src --ignore-src -y

- uses: actions/download-artifact@v1
- name: Sanitize Artifact Name
id: sanitize-name
run: |
sanitized_name=$(echo "${{ inputs.ci_target_ref }}" | sed 's/[\/:*?"<>|\\]/_/g')
echo "sanitized_name=$sanitized_name" >> $GITHUB_ENV
echo "::set-output name=sanitized_name::$sanitized_name"

- uses: actions/download-artifact@v4.1.7
with:
name: micro_ros_build
name: micro_ros_build_${{ steps.sanitize-name.outputs.sanitized_name }}
path: install

# Workaround https://github.com/actions/upload-artifact/issues/38
Expand Down
Loading