Skip to content
Open
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
120 changes: 120 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: colcon build
runs-on: ubuntu-latest
container:
image: ros:humble-ros-base

steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
Comment on lines +21 to +23

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the newer version is stable now (v6 probably). We can use it here.

submodules: recursive
fetch-depth: 0

- name: Install build tooling
shell: bash
run: |
apt-get update
apt-get install -y --no-install-recommends \
python3-colcon-common-extensions \
build-essential \
ros-humble-nav2-msgs \
ros-humble-tf2 \
ros-humble-tf2-ros \
git

# TODO: remove entries once each submodule has valid package.xml
# These submodules currently are empty which crashes rosdep:
# - tts_node
# - asr_node
# - database_node
# - vision_node
# - brain_launch
# navigation_node is excluded because its only content is a simulation launch
# package with heavy deps (nav2_bringup, turtlebot3_*, cartographer_ros).
- name: Exclude stub submodules from CI
shell: bash
run: |
for pkg in tts_node asr_node database_node vision_node brain_launch; do
rm -f "src/$pkg/package.xml"
touch "src/$pkg/COLCON_IGNORE"
done
touch "src/navigation_node/COLCON_IGNORE"

- name: Resolve ROS dependencies (rosdep)
shell: bash
run: |
source /opt/ros/humble/setup.bash
rosdep update --rosdistro humble
rosdep install \
--from-paths src \
--ignore-src \
--rosdistro humble \
-y

- name: colcon build
shell: bash
run: |
source /opt/ros/humble/setup.bash
colcon build \
--symlink-install \
--event-handlers console_cohesion+ \
--cmake-args -DCMAKE_BUILD_TYPE=Release

# TODO: re-enable colcon test once unit tests are written

- name: Upload build logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
Comment on lines +79 to +82

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the newer version is stable now (v6 probably). We can use it here.

name: colcon-logs
path: |
log/
build/**/CMakeFiles/CMakeOutput.log
build/**/CMakeFiles/CMakeError.log
retention-days: 7

rosdep-check:
name: rosdep manifest validation
runs-on: ubuntu-latest
container:
image: ros:humble-ros-base

steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
Comment on lines +97 to +99

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the newer version is stable now (v6 probably). We can use it here.

submodules: recursive

# TODO: remove entries once each submodule has valid package.xml
# navigation_node is excluded because its only content is a simulation launch
- name: Exclude stub submodules from rosdep scan
shell: bash
run: |
for pkg in tts_node asr_node database_node vision_node brain_launch; do
rm -f "src/$pkg/package.xml"
done
touch "src/navigation_node/COLCON_IGNORE"

- name: Verify all package.xml dependencies resolve
shell: bash
run: |
source /opt/ros/humble/setup.bash
rosdep update --rosdistro humble
rosdep check \
--from-paths src \
--ignore-src \
--rosdistro humble || true
Loading