-
Notifications
You must be signed in to change notification settings - Fork 36
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
Modify CI to track ros testing repo #256
Modify CI to track ros testing repo #256
Conversation
@Yadunund @clalancette Could you please review this PR? |
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.
Thanks for kicking off this initiative!
I feel that the using binaries from the testing
repo may not highlight issues soon enough. It relies on someone blooming changes from the core repos and then waiting for the rosdistro PR to be merged to kick-off the build jobs.
On the other hand we expect core packages for released distros like jazzy, iron etc to be fairly stable so we don't need to test with the latest source code or binaries from the test repo.
What do you think of the following:
- Update the
build.yaml
workflow to rely on setup-ros.- If we're testing for
rolling
, the job will build--packages-up-to rmw_zenoh_cpp
from source. - Else, we configure
setup-ros
to use regular ROS 2 core binaries and build uptormw_zenoh_cpp
- If we're testing for
- Configure the build job to run on a nightly schedule using a cron config. This way the maintainers will be notified if any breaking changes get merged in core upstream repos.
Agreed with what @Yadunund laid out above. |
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
I made the changes @Yadunund
|
rolling is failing because of the |
…ld_ci_with_industrial_ci
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.
Thanks @ahcorde for the changes. Left a comment to reuse the same job across distros/os.
.github/workflows/build.yaml
Outdated
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
test: | ||
build_and_test_source_rolling: |
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.
Instead of having three separate jobs like this, can we retain the distro
matrix from earlier and setup one job only to run for each distro in the matrix? Within this job, we can have a special if
condition to check if distro == rolling
and if so, build from source. If you need access to both the ROS distro version and ubuntu version, the matrix can be defined like so.
Also it appears that your changes now pull a rostooling/setup-ros-docker:ubuntu-x
image. How often is this image updated? And why not use ros-tooling/[email protected]
to setup from latest ubuntu
base image like so.
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.
Here is an example of using an if
condition within the action: https://github.com/open-rmf/rmf_ci_templates/blob/1ae7b4f64644ab2f8724e9a1e1b3d14803caa61e/.github/workflows/reusable_build.yaml#L53
Signed-off-by: CihatAltiparmak <[email protected]>
Signed-off-by: CihatAltiparmak <[email protected]>
.github/workflows/build.yaml
Outdated
ROS_DISTRO: [rolling, jazzy, iron] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rostooling/setup-ros-docker:ubuntu-noble-latest |
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.
We can't alwayse use noble
since iron is distributed on jammy
. Please see my previous comment on how the matrix can be updated to include distro and os. #256 (comment)
Not addressed form the same comment:
- Using If condition to include
vcs-repo-file-url
- Using ros-tooling/[email protected] instead of the
rostooling/setup-ros-docker:ubuntu
image
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.
Firstly sorry for some commits, but would using separate jobs for source and binaries be good instead of using if? I am yet to complete my work. I will ping you.
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'd prefer to have everything in the same job. The CI here is a temporary measure until we start running the usual CI jobs using the ROS buildfarm.
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've applied, @Yadunund and i've readded the fail-fast param which @ahcorde has overlooked by deleting this. Would you review in your available time? (Inspired by https://github.com/ros-tooling/setup-ros/blob/a6ce30ecca1e5dcc10ae5e6a44fe2169115bf852/README.md?plain=1#L249-L252 and https://github.com/ros2/ros2_tracing/blob/a866b9c701311bc8200a00c949b4a0fff9803777/.github/workflows/test.yml#L68) Btw if you want, we can merge rolling
branch to this branch so that all CI can pass.
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.
thank you for the changes @CihatAltiparmak
Signed-off-by: CihatAltiparmak <[email protected]>
…ld_ci_with_industrial_ci
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 will wait for a final review from @Yadunund
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.
It looks like CI time for binary jobs has increased by little over 2 mins due to the fact that we're installing ROS binaries as part of the workflow. Left a suggestion for how we could tackle this.
.github/workflows/build.yaml
Outdated
# Jazzy (binary) | ||
- ROS_DISTRO: jazzy | ||
BUILD_TYPE: binary | ||
DOCKER_IMAGE: ubuntu:noble |
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 think we should remove this DOCKER_IMAGE
flag as it's one extra item to configure.
See commend below for relevant suggestion.
.github/workflows/build.yaml
Outdated
container: | ||
image: ros:${{ matrix.distro }}-ros-base | ||
timeout-minutes: 30 | ||
image: ${{ matrix.DOCKER_IMAGE }} |
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.
Our CI times have increased by 2mins by installed ROS binaries for cases where BUILD_TYPE
is binary
. Can we use an if condition here to use ros:${{ matrix. ROS_DISTRO }}-ros-base
here if matrix.BUILD_TYPE == 'binary'
; else ubuntu:noble
. We won't require the DOCKER_IMAGE variable anymore.
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've modified based on your suggestion. But i've also had to install coverage tools in case of using binary because of crashing CI. I hope i've decreased CI check time. Finally, my approach is okay with binary builds, but It can create some problems in case that you want to build from iron source because iron fails in ubuntu-noble
While modifying, i've utilized https://github.com/open-rmf/rmf_ci_templates/blob/1ae7b4f64644ab2f8724e9a1e1b3d14803caa61e/.github/workflows/reusable_build.yaml#L56-L59
Signed-off-by: CihatAltiparmak <[email protected]>
Signed-off-by: CihatAltiparmak <[email protected]>
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.
LGTM! Thanks for iterating @CihatAltiparmak and for addressing the build error on Rolling!
* Modified CI in a way that rmw_zenoh can also be tested with ROS testing repos * Fixed indentation error in workflow yaml * Build rolling from source, Iron and Jazzy from binaries and cron job too Signed-off-by: Alejandro Hernández Cordero <[email protected]> * Fixed syntaz Signed-off-by: Alejandro Hernández Cordero <[email protected]> * Use Ubuntu jammy with Iron Signed-off-by: Alejandro Hernández Cordero <[email protected]> * Applied the suggestions in ( ros2#256 (comment) ) Signed-off-by: CihatAltiparmak <[email protected]> * Fixed vcs-url * Added matrix, changed setup-ros and reverted deleted fail-fast-param Signed-off-by: CihatAltiparmak <[email protected]> * Removed DOCKER_IMAGE argument Signed-off-by: CihatAltiparmak <[email protected]> * Added lcov package Signed-off-by: CihatAltiparmak <[email protected]> --------- Signed-off-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: CihatAltiparmak <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]>
* Modified CI in a way that rmw_zenoh can also be tested with ROS testing repos * Fixed indentation error in workflow yaml * Build rolling from source, Iron and Jazzy from binaries and cron job too Signed-off-by: Alejandro Hernández Cordero <[email protected]> * Fixed syntaz Signed-off-by: Alejandro Hernández Cordero <[email protected]> * Use Ubuntu jammy with Iron Signed-off-by: Alejandro Hernández Cordero <[email protected]> * Applied the suggestions in ( ros2#256 (comment) ) Signed-off-by: CihatAltiparmak <[email protected]> * Fixed vcs-url * Added matrix, changed setup-ros and reverted deleted fail-fast-param Signed-off-by: CihatAltiparmak <[email protected]> * Removed DOCKER_IMAGE argument Signed-off-by: CihatAltiparmak <[email protected]> * Added lcov package Signed-off-by: CihatAltiparmak <[email protected]> --------- Signed-off-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: CihatAltiparmak <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]>
To prevent the errors stated in this PR ( #255 ) , i have refactored the build CI so that it can be tracked the modifications, API changes etc. for rolling, jazzy and iron continuously. I don't know what type of approach this team has, however i wanted to come up with some option. It's ready to your service. It doesn't matter if you accepted or not. Btw to just modify container except this PR's idea can be another option. I can do it too.