build_ddspipe #187
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Workflow builds an artifact with DDS Pipe, dev-utils and Fast DDS installed. | |
# This is used by other workflows in this and other repositories to avoid compiling dependencies every time they are needed. | |
# | |
# DESCRIPTION: | |
# First, this workflow downloads the last successful build of dev-utils downloaded from build_dev_utils workflow artifacts. | |
# This workflow takes a .repos file from "./.github/workflows/configurations/ddspipe/dependencies.repos" (in this same repository) and downloads the repositories included. | |
# Then uses the colcon.meta files in "./.github/workflows/configurations/metas/<os>/colcon.meta" to build projects. | |
# Finally it takes the install directory generated from colcon build and uploads it as an artifact. | |
# The result artifact also contains Fast DDS installed project. | |
# This is done for several OS and cmake built types: | |
# - ubuntu-22.04 | ubuntu-20.04 | windows-2019 | windows-2022 | |
# - Debug | Release | |
# | |
# ARTIFACT RESULT: | |
# The artifact generated is called "built_ddspipe_<os>_<cmake_build_type><postfix>" | |
# - <os> is "ubuntu-20.04", "ubuntu-22.04", "windows-2019", or "windows-2022" | |
# - <cmake_build_type> is "Debug", or "Release" | |
# - <postfix> is "_nightly" for schedule runs every night, or is set manually by the user. | |
# | |
# SCHEDULE: | |
# This workflow runs every night at 00:00 using latest version of dev-utils (main). | |
# It waits till Fast DDS workflow has finished. | |
# | |
# MANUAL RUN: | |
# Running this workflow manually, the following arguments might be set: | |
# | |
# built_configuration_branch: set a branch to download dependencies.repos and colcon.meta files from | |
# this repository [Default: main] | |
# | |
# artifacts_name_postfix: set the postfix name for the uploading artifact [Default: _manual] | |
# Note: do not use "_nightly" in this argument, or other workflows may be affected | |
# | |
name: build_ddspipe | |
on: | |
workflow_dispatch: | |
inputs: | |
built_configuration_branch: | |
description: Branch or tag of eProsima-CI repository to get .repos and colcon.meta with which the workflow will be executed | |
required: false | |
default: main | |
use_repos_file: | |
description: > | |
Flag to use .repos file instead of manually set repository branches. | |
The .repos file will be downloaded from the eProsima-CI branch set in "built_configuration_branch". | |
required: false | |
type: boolean | |
default: true | |
artifacts_name_postfix: | |
description: Addition to artifacts name creation (do not use _nightly postfix when creating artifacts with specific arguments). | |
required: false | |
default: _manual | |
ddspipe_branch: | |
description: > | |
Branch, tag or commit of eProsima/DDS-Pipe repository. | |
Check available branches in https://github.com/eProsima/DDS-Pipe. | |
required: false | |
default: main | |
build_dev_utils: | |
description: > | |
Flag to re-build eProsima/dev-utils. | |
This will run build_dev_utils workflow and wait for the results. | |
required: false | |
type: boolean | |
default: false | |
dev_utils_branch: | |
description: > | |
Branch, tag or commit of eProsima/dev-utils repository. | |
Check available branches in https://github.com/eProsima/dev-utils. | |
required: false | |
type: string | |
default: main | |
build_fastdds: | |
description: > | |
Flag to re-build Fast DDS. | |
This will run build_fastdds workflow and wait for the results. | |
required: false | |
type: boolean | |
default: false | |
foonathan_memory_vendor_branch: | |
description: > | |
Branch, tag or commit of eProsima/foonathan_memory_vendor repository. | |
Check available branches in https://github.com/eProsima/foonathan_memory_vendor. | |
required: false | |
type: string | |
default: master | |
fastcdr_branch: | |
description: > | |
Branch, tag or commit of eProsima/Fast-CDR repository. | |
Check available branches in https://github.com/eProsima/Fast-CDR. | |
required: false | |
type: string | |
default: master | |
fastdds_branch: | |
description: > | |
Branch, tag or commit of eProsima/Fast-DDS repository. | |
Check available branches in https://github.com/eProsima/Fast-DDS. | |
required: false | |
type: string | |
default: master | |
schedule: | |
# Every night at 00:00 | |
# TODO change it so it waits for fastdds_build running at same time (00:00) | |
- cron: '0 2 * * *' | |
env: | |
default_configuration_branch: main | |
default_artifact_postfix: _nightly | |
artifact_prefix: built_ddspipe | |
default_ddspipe_branch: main | |
jobs: | |
build_dev_utils: | |
name: build_dev_utils | |
uses: eProsima/eProsima-CI/.github/workflows/build_dev_utils.yml@feature/manual-ddspipe-build | |
if: inputs.build_dev_utils | |
with: | |
built_configuration_branch: ${{ inputs.built_configuration_branch }} | |
use_repos_file: ${{ inputs.use_repos_file }} | |
artifacts_name_postfix: ${{ inputs.artifacts_name_postfix }} | |
dev_utils_branch: ${{ inputs.dev_utils_branch }} | |
build_fastdds: ${{ inputs.build_fastdds }} | |
foonathan_memory_vendor_branch: ${{ inputs.foonathan_memory_vendor_branch }} | |
fastcdr_branch: ${{ inputs.fastcdr_branch }} | |
fastdds_branch: ${{ inputs.fastdds_branch }} | |
build_ddspipe: | |
name: build_ddspipe | |
if: ${{ always() }} | |
needs: build_dev_utils | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
cmake_build_type: | |
- Release | |
- Debug | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
- windows-2019 | |
- windows-2022 | |
# Windows env variables | |
env: | |
CXXFLAGS: /MP | |
OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64" | |
steps: | |
- name: Sync this repository | |
uses: eProsima/eProsima-CI/external/checkout@main | |
with: | |
path: src/eprosima-CI | |
- name: Install Fast DDS dependencies | |
uses: eProsima/eProsima-CI/multiplatform/install_fastdds_dependencies@main | |
with: | |
cmake_build_type: ${{ matrix.cmake_build_type }} | |
- name: Install yaml cpp dependency | |
uses: eProsima/eProsima-CI/multiplatform/install_yamlcpp@main | |
with: | |
cmake_build_type: ${{ matrix.cmake_build_type }} | |
- name: Get dev-utils artifact | |
uses: eProsima/eProsima-CI/external/download-artifact@main | |
if: inputs.build_dev_utils | |
with: | |
name: built_fastdds_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }} | |
path: install | |
- name: Get dev-utils artifact | |
uses: eProsima/eProsima-CI/multiplatform/download_dependency@main | |
if: (!inputs.build_dev_utils) | |
with: | |
artifact_name: built_dev_utils_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }} | |
workflow_source: build_dev_utils.yml | |
target_workspace: install | |
workflow_source_repository: ${{ github.repository }} | |
secret_token: ${{ secrets.GITHUB_TOKEN }} | |
workflow_conclusion: completed | |
- name: Get colcon.meta and .repos files to build artifact | |
uses: eProsima/eProsima-CI/multiplatform/get_configurations_from_repo@main | |
with: | |
source_repository_branch: ${{ inputs.built_configuration_branch || env.default_configuration_branch }} | |
colcon_meta_file_path: .github/workflows/configurations/metas/${{ matrix.os }}/colcon.meta | |
repos_file_path: .github/workflows/configurations/ddspipe/dependencies.repos | |
colcon_meta_file_result: ${{ github.workspace }}/colcon.meta | |
repos_file_result: ${{ github.workspace }}/dependencies.repos | |
- name: Fetch DDS Pipe repositories with vcs-tool | |
uses: eProsima/eProsima-CI/multiplatform/vcs_import@main | |
if: inputs.use_repos_file | |
with: | |
vcs_repos_file: ${{ github.workspace }}/dependencies.repos | |
destination_workspace: ${{ github.workspace }}/src | |
- name: Fetch DDS Pipe repositories | |
uses: eProsima/eProsima-CI/multiplatform/fetch_ddspipe_manual@feature/manual-ddspipe-build | |
if: (!inputs.use_repos_file) | |
with: | |
ddspipe_branch: ${{ inputs.ddspipe_branch || env.default_ddspipe_branch }} | |
destination_workspace: ${{ github.workspace }}/src | |
- name: Build workspace | |
uses: eProsima/eProsima-CI/multiplatform/colcon_build@main | |
with: | |
colcon_meta_file: ${{ github.workspace }}/colcon.meta | |
workspace: ${{ github.workspace }} | |
workspace_dependencies: install | |
cmake_build_type: ${{ matrix.cmake_build_type }} | |
- name: Upload binaries | |
uses: eProsima/eProsima-CI/external/upload-artifact@main | |
with: | |
name: ${{ env.artifact_prefix }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }} | |
path: ${{ github.workspace }}/install |