Skip to content

Latest commit

 

History

History
286 lines (209 loc) · 13.2 KB

README.md

File metadata and controls

286 lines (209 loc) · 13.2 KB

eProsima-CI

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.

Commercial support

Looking for commercial support? Write us to [email protected]

Find more about us at eProsima’s webpage.

Index


User manual

In order to use this repository, the following recommendations are suggested:

  1. Always use a fix version. When using any of these actions, set it with a @v<X> version.
  2. Use multiplatform actions when possible. They automatically will redirect the action to the proper OS.
  3. 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.
  4. 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.


Out-of-the-box Actions Implemented

  • uncrustify

    • Check the C++ linter of the new files added to the repository.
    • Only on ubuntu.
  • python_linter

    • Check the Python linter of the new files added to the repository.
    • Only on ubuntu.
  • sphinx_docs

    • Build Sphinx documentation, test it and upload results.
    • Only on ubuntu.
    • Only for documentation projects based in cmake_utils.

Actions Implemented

Multiplatform

Ubuntu

macOS

Workflows

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.

Artifacts uploaded

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

Generate artifacts manually

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 and colcon.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.

Custom artifact generation

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 and colcon.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>.

External Actions

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