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.
- 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 ID of a specific workflow run.
-
- Install colcon and its dependencies depending on the platform.
-
- Install Fast DDS and general eProsima projects dependencies.
-
- Instal
gtest
andgmock
C++ library.
- Instal
-
- Instal
Open SSL
C++ library.
- Instal
-
- Install python packages.
-
- Instal
yaml-cpp
C++ library.
- Instal
-
- 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.
-
- Set the platform OS version in a environment variable.
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
- built_fastdds_ubuntu-20.04_Debug_nightly
- built_fastdds_ubuntu-20.04_Release_nightly
- built_fastdds_ubuntu-22.04_Debug_nightly
- built_fastdds_ubuntu-22.04_Release_nightly
- built_fastdds_windows-2019_Debug_nightly
- built_fastdds_windows-2019_Release_nightly
- built_fastdds_windows-2022_Debug_nightly
- built_fastdds_windows-2022_Release_nightly
-
dev-utils
- built_dev_utils_ubuntu-20.04_Debug_nightly
- built_dev_utils_ubuntu-20.04_Release_nightly
- built_dev_utils_ubuntu-22.04_Debug_nightly
- built_dev_utils_ubuntu-22.04_Release_nightly
- built_dev_utils_windows-2019_Debug_nightly
- built_dev_utils_windows-2019_Release_nightly
- built_dev_utils_windows-2022_Debug_nightly
- built_dev_utils_windows-2022_Release_nightly
-
DDS Pipe
- built_ddspipe_ubuntu-20.04_Debug_nightly
- built_ddspipe_ubuntu-20.04_Release_nightly
- built_ddspipe_ubuntu-22.04_Debug_nightly
- built_ddspipe_ubuntu-22.04_Release_nightly
- built_ddspipe_windows-2019_Debug_nightly
- built_ddspipe_windows-2019_Release_nightly
- built_ddspipe_windows-2022_Debug_nightly
- built_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: built_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:
built_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.
π Fast DDS manual build allows to specify Fast DDS and its eProsima dependencies version as inputs of the workflow. In order to use the manually set versions instead of the ones taken from the
.repos
file, just disableuse_repos_file
option.
π eProsima/dev-utils build allows to specify the version as inputs of the workflow. In order to use the manually set versions instead of the one taken from the
.repos
file, just disableuse_repos_file
option.
π eProsima/DDS-Pipe build allows to specify the version as inputs of the workflow. In order to use the manually set versions instead of the one taken from the
.repos
file, just disableuse_repos_file
option.
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:
built_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 |
---|---|---|
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 |
mirror-branch-action | Mirror branch within the same repository | 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 |
upload-artifact | Upload build artifact | MIT license |
wait-on-check-action | Wait on certain check | MIT license |