Skip to content
Open
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
29 changes: 24 additions & 5 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ defaults:
jobs:
fastdds_python_build:
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-build == true }}
strategy:
fail-fast: false
matrix:
Expand All @@ -75,52 +74,60 @@ jobs:
repo: eProsima/Fast-DDS-Python

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

- name: Install Fix Python version
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.24.4'

- name: Install apt dependencies
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev libssl-dev swig
update: false
upgrade: false

- name: Install colcon
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0

- name: Install Python dependencies
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
with:
packages: vcstool xmlschema
upgrade: false

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

- name: Get Fast CDR branch
id: get_fastcdr_branch
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-CDR
fallback_branch: ${{ inputs.fastcdr-branch }}
skip_base: true

- name: Download Fast CDR
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-CDR
Expand All @@ -129,26 +136,30 @@ jobs:

- name: Get Fast DDS branch
id: get_fastdds_branch
if: ${{ inputs.run-build == true }}
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
if: ${{ inputs.run-build == true }}
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
if: ${{ inputs.run-build == true }}
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
if: ${{ inputs.run-build == true }}
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
Expand All @@ -159,6 +170,7 @@ jobs:
workspace: ${{ github.workspace }}

- name: Upload build artifacts
if: ${{ inputs.run-build == true && inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/upload-artifact@v0
with:
name: fastdds_python_build_${{ inputs.label }}
Expand All @@ -167,50 +179,56 @@ jobs:
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
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/download-artifact@v0
with:
name: fastdds_python_build_${{ inputs.label }}
path: ${{ github.workspace }}

- name: Install Fix Python version
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.24.4'

- name: Install apt packages
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen

- name: Install colcon
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0

- name: Install Python dependencies
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: xmlschema pytest

- name: Setup CCache
if: ${{ inputs.run-tests == true && inputs.use-ccache == true }}
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
if: ${{ inputs.run-tests == true }}
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
Expand All @@ -223,6 +241,7 @@ jobs:

- name: Colcon test
id: python_test
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
Expand All @@ -236,7 +255,7 @@ jobs:

- name: Fast DDS Python test summary
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
if: ${{ !cancelled() }}
if: ${{ inputs.run-tests == true && !cancelled() }}
with:
junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}"
print_summary: 'True'
Expand Down
30 changes: 27 additions & 3 deletions .github/workflows/reusable-windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ defaults:
jobs:
fastdds_python_build:
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-build == true }}
strategy:
fail-fast: false
matrix:
Expand All @@ -88,27 +87,32 @@ jobs:
repo: eProsima/Fast-DDS-Python

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

- name: Install Fix Python version
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: ${{ inputs.cmake-version }}

- name: Install OpenSSL
if: ${{ inputs.run-build == true }}
uses: eProsima/eprosima-CI/windows/install_openssl@v0
with:
version: '3.1.1'

- name: Update OpenSSL environment variables
if: ${{ inputs.run-build == true }}
run: |
# Update the environment
if (Test-Path -Path $Env:ProgramW6432\OpenSSL)
Expand All @@ -130,26 +134,31 @@ jobs:
}

- name: Install colcon
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/windows/install_colcon@v0

- name: Install Python dependencies
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/windows/install_python_packages@v0
with:
packages: vcstool xmlschema pywin32

- name: Install swig
if: ${{ inputs.run-build == true }}
shell: pwsh
run: choco install swig --allow-downgrade --version=${{ inputs.swig-version }}

- name: Get Fast CDR branch
id: get_fastcdr_branch
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-CDR
fallback_branch: ${{ inputs.fastcdr-branch }}
skip_base: true

- name: Download Fast CDR
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/external/checkout@v0
with:
repository: eProsima/Fast-CDR
Expand All @@ -158,19 +167,22 @@ jobs:

- name: Get Fast DDS branch
id: get_fastdds_branch
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/multiplatform/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-DDS
fallback_branch: ${{ inputs.fastdds-branch }}

- name: Download Fast DDS repo
if: ${{ inputs.run-build == true }}
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
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos
Expand All @@ -179,6 +191,7 @@ jobs:

- name: Colcon build
continue-on-error: false
if: ${{ inputs.run-build == true }}
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta
Expand All @@ -190,6 +203,7 @@ jobs:
workspace: ${{ github.workspace }}

- name: Upload build artifacts
if: ${{ inputs.run-build == true && inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/upload-artifact@v0
with:
name: fastdds_python_build_${{ inputs.label }}
Expand All @@ -199,35 +213,39 @@ jobs:
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
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/download-artifact@v0
with:
name: fastdds_python_build_${{ inputs.label }}
path: ${{ github.workspace }}

- name: Install Fix Python version
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: ${{ inputs.cmake-version }}

- name: Install OpenSSL
if: ${{ inputs.run-tests == true }}
uses: eProsima/eprosima-CI/windows/install_openssl@v0
with:
version: '3.1.1'

- name: Update OpenSSL environment variables
if: ${{ inputs.run-tests == true }}
run: |
# Update the environment
if (Test-Path -Path $Env:ProgramW6432\OpenSSL)
Expand All @@ -249,22 +267,27 @@ jobs:
}

- name: Install colcon
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/windows/install_colcon@v0

- name: Install Python dependencies
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/windows/install_python_packages@v0
with:
packages: vcstool xmlschema pywin32 pytest

- name: Install swig
if: ${{ inputs.run-tests == true }}
shell: pwsh
run: choco install swig --allow-downgrade --version=${{ inputs.swig-version }}

- name: Install doxygen
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/external/install_doxygen@v0

- name: Colcon build
continue-on-error: false
if: ${{ inputs.run-tests == true }}
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/windows_test.meta
Expand All @@ -278,6 +301,7 @@ jobs:

- name: Colcon test
id: python_test
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta
Expand All @@ -291,7 +315,7 @@ jobs:

- name: Test summary
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
if: ${{ !cancelled() }}
if: ${{ inputs.run-tests == true && !cancelled() }}
with:
junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}"
print_summary: 'True'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ jobs:
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }}
fastdds-branch: ${{ inputs.fastdds-branch || 'master' }}
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test')) && !contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
use-ccache: ${{ inputs.use-ccache || false }}
Loading
Loading