Use action-ros-ci to build from source#1676
Conversation
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>
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 test sdformat with packages_up_to_sdformat.yaml
I reproduced this build in https://github.com/scpeters/sdformat/actions/runs/28207204166 using the following parameters:
I repeated this test with a gazebodistro yaml URL in https://github.com/scpeters/sdformat/actions/runs/28207305850 using the following parameters:
test gz-physics with collection.yaml
I reproduced this build in https://github.com/scpeters/sdformat/actions/runs/28207241507 using the following parameters:
job listing screenshothere'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:
|




🎉 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 sourceworkflow is added in 6075e0a withworkflow_dispatchmanual triggering, since I expect this CI job to initially be triggered manually for specific testing scenarios, not for every pull request or push tomain. It has the following configuration:action-ros-ciwith colcon workspace packages specified invcs-repo-file-urlvcs-repo-file-urlworkflow_dispatchmanual triggering with three input parameters:packages-to-test: dependencies of these packages will be built, but only these packages will be tested (defaultsdformat)vcs-repo-file: location of the VCS repo file from which the colcon workspace will be populatedvcs-repo-file-base: ifrelative, then interpretvcs-repo-fileas a relative path within this github repo; ifurlinterpretvcs-repo-fileas 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 ofvcs-repo-fileandvcs-repo-file-basepoint to this file)Backport Policy
Test it
This workflow cannot be run using
workflow_dispatchuntil it is merged to themainbranch. To test before merging to main I replaced theworkflow_dispatchtrigger withpushto this PR branch in 158833d.Test with custom dependency branches
The resulting CI workflow run from 158833d successfully built and tested
sdformat, butcolcon test-resultfailed 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 modifiespackages_up_to_sdformat.yamlto 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 andvcs-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
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.Backports: If this is a backport, please use Rebase and Merge instead.