Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 0 additions & 134 deletions .github/workflows/build_and_test.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/config/build.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
names:
fastdds:
cmake-args:
- "-DSECURITY=ON"
- "-DLOG_CONSUMER_DEFAULT=STDOUT"
10 changes: 10 additions & 0 deletions .github/workflows/config/ubuntu_test.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
names:
fastdds_python:
cmake-args:
- "-DBUILD_TESTING=ON"
- "-DBUILD_DOCUMENTATION=ON"
ctest-args: [
"--repeat", "until-pass:3",
"--timeout", "300",
"--label-exclude", "xfail"
]
9 changes: 9 additions & 0 deletions .github/workflows/config/windows_test.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
names:
fastdds_python:
cmake-args:
- "-DBUILD_TESTING=ON"
ctest-args: [
"--repeat", "until-pass:3",
"--timeout", "300",
"--label-exclude", "xfail"
]
225 changes: 225 additions & 0 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
name: Fast DDS Python Ubuntu CI reusable workflow

on:
workflow_call:
inputs:
os-version:
description: 'The OS image for the workflow'
required: false
default: 'ubuntu-22.04'
type: string
label:
description: 'ID associated to the workflow'
required: true
type: string
colcon-args:
description: 'Extra arguments for colcon cli'
required: false
type: string
cmake-args:
description: 'Extra arguments for cmake cli'
required: false
type: string
ctest-args:
description: 'Extra arguments for ctest cli'
required: false
type: string
fastdds-python-branch:
description: 'Branch or tag of Fast DDS Python repository'
required: true
type: string
fastdds-branch:
description: 'Branch or tag of Fast DDS repository'
required: true
type: string
run-build:
description: 'Build Fast DDS Python (CI skipped otherwise)'
required: false
type: boolean
default: true
run-tests:
description: 'Run test suite of Fast DDS python'
required: false
type: boolean
default: false
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false
defaults:
run:
shell: bash

jobs:
fastdds_python_build:
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-build == true }}
strategy:
fail-fast: false
matrix:
cmake-build-type:
- 'RelWithDebInfo'
steps:
- name: Add ci-pending label if PR
if: ${{ github.event_name == 'pull_request' }}
uses: eProsima/eProsima-CI/external/add_labels@v0
with:
labels: ci-pending
number: ${{ github.event.number }}
repo: eProsima/Fast-DDS-Python

- name: Sync eProsima/Fast-DDS-Python repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/fastdds_python
ref: ${{ inputs.fastdds-python-branch }}

- name: Install Fix Python version
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.22.6'

- name: Install apt dependencies
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen
update: false
upgrade: false

- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0

- name: Install Python dependencies
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
with:
packages: vcstool xmlschema
upgrade: false

- name: Setup CCache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
if: ${{ inputs.use-ccache == true }}
with:
api_token: ${{ secrets.GITHUB_TOKEN }}

- name: Get Fast DDS branch
id: get_fastdds_branch
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-DDS
fallback_branch: ${{ inputs.fastdds-branch }}

- name: Download Fast DDS repo
uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-DDS
path: src/fastdds
ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }}

- name: Fetch Fast DDS Python dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos
destination_workspace: src
skip_existing: 'true'

- name: Colcon build
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta
colcon_build_args: ${{ inputs.colcon-args }}
cmake_args: ${{ inputs.cmake-args }}
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace: ${{ github.workspace }}

- name: Upload build artifacts
uses: eProsima/eProsima-CI/external/upload-artifact@v0
with:
name: fastdds_python_build_${{ inputs.label }}
path: ${{ github.workspace }}

fastdds_python_test:
needs: fastdds_python_build
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-tests == true }}
strategy:
fail-fast: false
matrix:
cmake-build-type:
- 'RelWithDebInfo'
steps:
- name: Download python build artifacts
uses: eProsima/eProsima-CI/external/download-artifact@v0
with:
name: fastdds_python_build_${{ inputs.label }}
path: ${{ github.workspace }}

- name: Install Fix Python version
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.22.6'

- name: Install apt packages
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev libssl-dev swig

- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0

- name: Install Python dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: xmlschema pytest

- name: Setup CCache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
if: ${{ inputs.use-ccache == true }}
with:
api_token: ${{ secrets.GITHUB_TOKEN }}

- name: Colcon build
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
colcon_build_args: ${{ inputs.colcon-args }}
colcon_build_args_default: '--packages-select fastdds_python'
cmake_args: ${{ inputs.cmake-args }}
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace: ${{ github.workspace }}
workspace_dependencies: ${{ github.workspace }}/install

- name: Colcon test
id: python_test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
colcon_test_args: ${{ inputs.colcon-args }}
colcon_test_args_default: --event-handlers=console_direct+
ctest_args: ${{ inputs.ctest-args }}
packages_names: fastdds_python
workspace: ${{ github.workspace }}
workspace_dependencies: ''
test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }}

- name: Fast DDS Python test summary
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
if: ${{ !cancelled() }}
with:
junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}"
print_summary: 'True'
show_failed: 'True'
show_disabled: 'False'
show_skipped: 'False'
Loading