build_ddspipe #157
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 | |
artifacts_name_postfix: | |
description: Addition to artifacts name creation (do not use _nightly postfix when creating artifacts with specific arguments). | |
required: false | |
default: _manual | |
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 | |
jobs: | |
build_ddspipe: | |
name: build_ddspipe | |
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: | |
# TODO fix it | |
# - name: Wait for dev-utils workflow run to finish | |
# uses: eProsima/eProsima-CI/external/wait-on-check-action@main | |
# with: | |
# check-name: build_dev_utils | |
# ref: main | |
# repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# allowed-conclusions: success,skipped,cancelled,failure | |
# # each 30 seconds check if finished | |
# wait-interval: 30 | |
- 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/multiplatform/download_dependency@main | |
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 | |
- name: Build and generate artifact | |
uses: eProsima/eProsima-CI/multiplatform/generate_dependency_artifact@main | |
with: | |
vcs_repos_file: ${{ github.workspace }}/dependencies.repos | |
artifact_name: ${{ env.artifact_prefix }}_${{ matrix.os }}_${{ matrix.cmake_build_type }}${{ inputs.artifacts_name_postfix || env.default_artifact_postfix }} | |
colcon_meta_file: ${{ github.workspace }}/colcon.meta | |
workspace: ${{ github.workspace }} | |
workspace_dependencies: install | |
cmake_build_type: ${{ matrix.cmake_build_type }} |