Skip to content

Use action-ros-ci to build from source#1676

Draft
scpeters wants to merge 4 commits into
mainfrom
scpeters/action_ros_ci_rotary
Draft

Use action-ros-ci to build from source#1676
scpeters wants to merge 4 commits into
mainfrom
scpeters/action_ros_ci_rotary

Conversation

@scpeters

Copy link
Copy Markdown
Member

🎉 New feature

Part of gazebo-tooling/action-gz-ci#80 and gazebo-tooling/release-tools#851

Summary

We currently don't have an easy way to run Ubuntu CI with multiple dependencies built from source either in Jenkins (gazebo-tooling/release-tools#851) or with action-gz-ci in a GitHub workflow (gazebo-tooling/action-gz-ci#80). This PR is a demonstration of the suggestion in gazebo-tooling/action-gz-ci#80 (comment) to use action-ros-ci to build and test multiple packages from source in a colcon workspace. This supersedes a previous draft PR #1648 targeting sdf16.

The Ubuntu CI from source workflow is added in 6075e0a with workflow_dispatch manual triggering, since I expect this CI job to initially be triggered manually for specific testing scenarios, not for every pull request or push to main. It has the following configuration:

  • execute in rostooling/setup-ros-docker:ubuntu-resolute-latest container image
  • use action-ros-ci with colcon workspace packages specified in vcs-repo-file-url
  • use actions/checkout to checkout sdformat from the current branch rather than the branch specified in vcs-repo-file-url
  • workflow_dispatch manual triggering with three input parameters:
    • packages-to-test: dependencies of these packages will be built, but only these packages will be tested (default sdformat)
    • vcs-repo-file: location of the VCS repo file from which the colcon workspace will be populated
    • vcs-repo-file-base: if relative, then interpret vcs-repo-file as a relative path within this github repo; if url interpret vcs-repo-file as a URL to the repo file (such as a link to a file in gazebosim/gazebodistro or a gist)

This commit also includes two vcs repo files:

  • .github/ci/packages_up_to_sdformat.yaml (default values of vcs-repo-file and vcs-repo-file-base point to this file)
  • `.github/ci/collection.yaml, which is equivalent to gazebodistro's collection-rotary.yaml

Backport Policy

  • This is safe to backport to the following versions:
    • Jetty
    • Ionic
    • Harmonic
    • Fortress
  • This should not be backported
  • I am not sure
  • Other (fill in yourself) we can backport this, but it will require changes to the repositories yaml files, so I think it should be done manually rather than with mergify

Test it

This workflow cannot be run using workflow_dispatch until it is merged to the main branch. To test before merging to main I replaced the workflow_dispatch trigger with push to this PR branch in 158833d.

Test with custom dependency branches

The resulting CI workflow run from 158833d successfully built and tested sdformat, but colcon test-result failed due to an issue with gz-tools that is fixed by gazebosim/gz-tools#172 (confirmed by the successful CI workflow run for 94519c4 that modifies packages_up_to_sdformat.yaml to use the gz-tools branch from gazebosim/gz-tools#172)

Test reverse dependencies against this branch

The package to test was changed to gz-physics and vcs-repo-filewas changed tocollection.yaml` in 1576cf1, resulting in the following CI workflow run that built and tested gz-physics but was marked as failed since the gz-tools branch was not updated:

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the feature
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.

scpeters added 4 commits June 24, 2026 14:51
This adds a GitHub workflow for manually building
a package and its dependencies from source in a colcon
workspace using action-ros-ci. The job is intended to
be triggered manually via workflow_dispatch and with
input parameters to specify which packages should be
tested and which packages and versions to build. Two
repos files are provided for convenience for building
only the dependencies of a package or the entire
gazebo collection.

Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
@scpeters

Copy link
Copy Markdown
Member Author

This workflow cannot be run using workflow_dispatch until it is merged to the main branch. To test before merging to main I replaced the workflow_dispatch trigger with push to this PR branch

In addition to the tests listed in the PR description, I also merged the first commit of this PR to the default branch of my fork at scpeters@6075e0a. This allows running via workflow_dispatch.

test sdformat with packages_up_to_sdformat.yaml

The resulting CI workflow run from 158833d successfully built and tested sdformat, but colcon test-result failed due to an issue with gz-tools that is fixed by gazebosim/gz-tools#172

I reproduced this build in https://github.com/scpeters/sdformat/actions/runs/28207204166 using the following parameters:

Screenshot 2026-06-25 at 4 33 55 PM

I repeated this test with a gazebodistro yaml URL in https://github.com/scpeters/sdformat/actions/runs/28207305850 using the following parameters:

Screenshot 2026-06-25 at 4 46 15 PM

test gz-physics with collection.yaml

The package to test was changed to gz-physics and vcs-repo-filewas changed tocollection.yaml` in 1576cf1, resulting in the following CI workflow run that built and tested gz-physics but was marked as failed since the gz-tools branch was not updated:

I reproduced this build in https://github.com/scpeters/sdformat/actions/runs/28207241507 using the following parameters:

Screenshot 2026-06-25 at 4 34 45 PM

job listing screenshot

here's a screenshot of what the workflow history at https://github.com/scpeters/sdformat/actions/workflows/ci_dependencies_from_source.yaml looked like after starting these jobs:

Screenshot 2026-06-25 at 4 37 08 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants