-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add gh actions build pipeline with rosdep check #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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: | ||
| 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment.
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.