This is a github CI auxiliary repo that contains common github steps, actions, and workflows shared along multiple eProsima libraries and tools. The main idea is to collect every repeated or generic step of any CI to have a single more maintainable generic point.
Looking for commercial support? Write us to [email protected]
Find more about us at eProsima’s webpage.
- User manual
- Out-of-the-box Actions Implemented
- Actions Implemented
- Dependencies built
- External Actions
In order to use this repository, the following recommendations are suggested:
- Always use a fix version.
When using any of these actions, set it with a
@v<X>
version. - Use
multiplatform
actions when possible. They automatically will redirect the action to the proper OS. - If planning a long well preserved CI, use
@vX.Y
versioning, to be sure that CI will not change and break something in the future. However, this may be a problem because it will not be updated with improvements or external versions. - Actions are documented in their own
<platform>/<action_name>/action.yml
files. Check each file for description and argument definitions.
For more information about versioning handle of this project, check following file.
-
- Check the C++ linter of the new files added to the repository.
- Only on ubuntu.
-
- Check the Python linter of the new files added to the repository.
- Only on ubuntu.
-
- Build Sphinx documentation, test it and upload results.
- Only on ubuntu.
- Only for documentation projects based in cmake_utils.
-
- Build a project using colcon and ASAN flags and execute tests.
-
- Build a project using colcon and CLang flags and execute tests.
-
- Execute clang-tidy-check over a built project for static analysis.
-
- Execute
colcon build
command to build a project.
- Execute
-
- Build a project using colcon and execute tests.
-
- Build a project using colcon and execute only flaky tests (labeled as
xfail
).
- Build a project using colcon and execute only flaky tests (labeled as
-
- Execute
colcon test
command to test a project.
- Execute
-
- Download an artifact previously generated from a workflow run.
-
- Download eProsima/dev-utils setting the specific version of the repository.
-
- Download eProsima/DDS-Pipe setting the specific version of the repository.
-
- Download Fast DDS and its eProsima dependencies setting the specific version of each repository.
-
- Build a project and upload the installed objects as an artifact.
-
- Download a
.repos
and acolcon.meta
file from a repository.
- Download a
-
- Download a file from a repository.
-
- Get the related branch from a remote repository.
-
- Get the ID of a specific workflow run.
-
- Install colcon and its dependencies depending on the platform.
-
- Install Fast DDS and general eProsima projects dependencies.
-
- Install
gtest
andgmock
C++ library.
- Install
-
- Install
Open SSL
C++ library.
- Install
-
- Install python packages.
-
- Install
yaml-cpp
C++ library.
- Install
-
- Create a workflow summary with the results of the tests from jUnit reports.
-
- Build a project using colcon and TSAN flags and execute tests.
-
- Import several repositories from a Yaml file using
vcs
.
- Import several repositories from a Yaml file using
-
- Build a project using colcon and coverage flags, execute tests and upload results.
-
- Get the files that differ from one github reference to another.
The result can be parsed with
grep
.
- Get the files that differ from one github reference to another.
The result can be parsed with
-
- Get all branches of a specific repository.
-
- Install apt packages.
-
- Create a workflow summary with the results of the tests from jUnit reports.
-
- Set the platform OS version in a environment variable.
-
- Set a specific CMake version
-
- Setup a Python virtual environment and add it to the PATH.
- install_brew_packages
- Install brew packages.
- install_python_packages
- Install python packages.
- install_colcon
- Install colcon and its dependencies.
There are several workflows implemented that build projects and upload them as artifacts. These are used for other projects to speed up the build process of the dependencies.
So far, the following workflows are running to upload artifacts:
These are the artifacts that are generated every night with the latest versions of each project:
-
Fast DDS
- build_fastdds__ubuntu-22.04_Debug_nightly
- build_fastdds__ubuntu-22.04_Release_nightly
- build_fastdds__ubuntu-24.04_Debug_nightly
- build_fastdds__ubuntu-24.04_Release_nightly
- build_fastdds__windows-2019_Debug_nightly
- build_fastdds__windows-2019_Release_nightly
- build_fastdds__windows-2022_Debug_nightly
- build_fastdds__windows-2022_Release_nightly
-
dev-utils
- build_dev_utils__ubuntu-22.04_Debug_nightly
- build_dev_utils__ubuntu-22.04_Release_nightly
- build_dev_utils__ubuntu-24.04_Debug_nightly
- build_dev_utils__ubuntu-24.04_Release_nightly
- build_dev_utils__windows-2019_Debug_nightly
- build_dev_utils__windows-2019_Release_nightly
- build_dev_utils__windows-2022_Debug_nightly
- build_dev_utils__windows-2022_Release_nightly
-
DDS Pipe
- build_ddspipe__ubuntu-22.04_Debug_nightly
- build_ddspipe__ubuntu-22.04_Release_nightly
- build_ddspipe__ubuntu-24.04_Debug_nightly
- build_ddspipe__ubuntu-24.04_Release_nightly
- build_ddspipe__windows-2019_Debug_nightly
- build_ddspipe__windows-2019_Release_nightly
- build_ddspipe__windows-2022_Debug_nightly
- build_ddspipe__windows-2022_Release_nightly
In order to use one of these artifacts, use the following action as a step:
- name: Get fastdds artifact
uses: eProsima/eProsima-CI/multiplatform/download_dependency@main
with:
artifact_name: build_fastdds_ubuntu-20.04_Debug_nightly
workflow_source: build_fastdds.yml
workflow_source_repository: eProsima/eProsima-CI
# Path where to download the installs from the artifact
target_workspace: ${{ github.workspace }}/install
# If inside an action, this value must be generated in workflow and passed as argument
secret_token: ${{ secrets.GITHUB_TOKEN }}
workflow_conclusion: completed
The artifacts can be customized so the artifacts generated follow specific configurations.
These configurations are set in a .repos
and colcon.meta
files in a new branch in eProsima-CI.
In order to change the dependencies required to build within an artifact,
set dependencies.repos with the new repositories to download and build.
In order to change CMake options when building the artifact, set files in files in .github/workflows/configurations/metas
.
Run the manual_build
workflow with these arguments:
build_configuration_branch
: Branch created with.repos
andcolcon.meta
files.artifacts_name_postfix
: Postfix of the name of the artifact used to download and link, and also postfix of the name of the generated artifact.
⚠️ Do not generate custom artifacts with postfix_nightly
, as this is the main name other repos will use.
The workflow manual_build supports to create any artifact giving a .repos
and colcon.meta
files.
In order to run this workflow, create a branch in this repository,
set dependencies.repos file with the repositories needed to build the project and set colcon.meta
files in .github/workflows/configurations/metas
.
Then, run the manual_build
workflow with these arguments:
build_configuration_branch
: Branch created with.repos
andcolcon.meta
files.artifacts_name_prefix
: Prefix of the name of the artifact to generate.artifacts_name_postfix
: Postfix of the name of the artifact to generate.
The result artifacts will be called <artifacts_name_prefix>_<os>_<cmake_build_type><artifacts_name_postfix>
.
This repository also includes a wrapper around the external actions being used by eProsima CI workflows. Thus, the maintainability and upgrading of these actions is performed in a single step. Find below the external actions listed:
External Action | Description | LICENSE |
---|---|---|
add_labels | Add labels from an issue or PR | Apache-2.0 license |
action-download-artifact | Download and extract an artifact | MIT license |
checkout | Checkout repository | MIT license |
codecov-action | Upload coverage report to codecov.io | MIT license |
create-pull-request | Create PR | MIT license |
get-cmake | Installs desired versions of CMake and Ninja | Mit license |
install_doxygen | Multi-platform action that installs doxygen | Mit license |
install_qt | Multi-platform action that installs Qt | MIT license |
mirror-branch-action | Mirror branch within the same repository | Apache-2.0 license |
remove_labels | Remove labels from an issue or PR | Apache-2.0 license |
setup-ccache-action | Setup CCache in a workflow | MIT license |
setup-python | Installs a version of Python or PyPy and (by default) adds it to the PATH | MIT license |
test-reporter | Display test results directly in GitHub | MIT license |
upload-artifact | Upload build artifact | MIT license |
wait-on-check-action | Wait on certain check | MIT license |
test-reporter | Generate test reports in workflow summaries | MIT license |