Skip to content

Commit

Permalink
Refs #21228: Apply rev suggestions in main PR
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Jun 28, 2024
1 parent 808e0b5 commit 9896305
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 54 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/config/test.repos

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ names:
"--timeout", "300",
"--label-exclude", "xfail"
]
googletest-distribution:
cmake-args:
- "-Dgtest_force_shared_crt=ON"
- "-DBUILD_SHARED_LIBS=ON"
- "-DBUILD_GMOCK=ON"
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"
]
28 changes: 19 additions & 9 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ on:
required: false
type: boolean
default: true
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false

defaults:
run:
Expand Down Expand Up @@ -84,7 +89,7 @@ jobs:
- name: Install apt dependencies
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
with:
packages: libasio-dev libtinyxml2-dev libssl-dev swig
packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen
update: false
upgrade: false

Expand All @@ -97,6 +102,12 @@ jobs:
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
Expand Down Expand Up @@ -172,20 +183,19 @@ jobs:
- name: Install Python dependencies
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
with:
packages: vcstool xmlschema
packages: xmlschema pytest

- name: Fetch Fast DDS Python CI dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
- name: Setup CCache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
if: ${{ inputs.use-ccache == true }}
with:
vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.repos
destination_workspace: src
skip_existing: 'true'
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/test.meta
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 }}
cmake_args: ${{ inputs.cmake-args }}
cmake_args_default: ''
Expand All @@ -196,7 +206,7 @@ jobs:
id: python_test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta
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 }}
Expand Down
27 changes: 8 additions & 19 deletions .github/workflows/reusable-windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ jobs:
shell: pwsh
run: choco install swig --allow-downgrade --version=4.0.2.04082020

# Although this is a ubuntu action becuase it uses bash, it is compatible with windows
- name: Get Fast DDS branch
id: get_fastdds_branch
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
uses: eProsima/eProsima-CI/multiplatform/get_related_branch_from_repo@v0
with:
remote_repository: eProsima/Fast-DDS
fallback_branch: ${{ inputs.fastdds-branch }}
Expand Down Expand Up @@ -231,24 +230,14 @@ jobs:
shell: pwsh
run: choco install swig --allow-downgrade --version=4.0.2.04082020

- name: Install doxygen
uses: eProsima/eProsima-CI/external/install_doxygen@v0

- name: Prepare build meta file
run: |
$build_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build.meta'
$test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\test.meta'
$build_test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build_test.meta'
# Read the content of the build meta file
$build_meta_content = Get-Content -Path $build_meta_file
# Read the content of the test meta file, starting from line 4 (skipping "name" line [1], cmake project name line [2] and "cmake-args" line [3])
$test_meta_content = Get-Content -Path $test_meta_file | Select-Object -Skip 3
# Combine the content of the build meta file and the test meta file
$combined_content = $build_meta_content + $test_meta_content
# Write the combined content to the build test meta file
$combined_content | Out-File -FilePath $build_test_meta_file -Encoding UTF8
uses: eProsima/eProsima-CI/windows/merge_yaml_metas@v0
with:
metas: "@('${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta', '${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta')"
path: '${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build_test.meta'

- name: Colcon build
continue-on-error: false
Expand All @@ -266,7 +255,7 @@ jobs:
id: python_test
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta
colcon_test_args: ${{ inputs.colcon-args }}
colcon_test_args_default: --event-handlers=console_direct+
ctest_args: ${{ inputs.ctest-args }}
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
required: false
type: boolean
default: true
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false

pull_request:
types:
Expand All @@ -51,23 +56,21 @@ jobs:
strategy:
fail-fast: false
matrix:
os-version:
- 'ubuntu-22.04'
fastdds-python-branch:
- '1.4.x'
fastdds-branch:
- '2.14.x'
- '2.13.x'
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }}
uses: ./.github/workflows/reusable-ubuntu-ci.yml
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-version: ${{ inputs.os-version || matrix.os-version }}
label: '${{ matrix.os-version }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}'
os-version: ${{ inputs.os-version || 'ubuntu-22.04' }}
label: 'ubuntu-ci-1.4.x-${{ matrix.fastdds-branch }}'
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
ctest-args: ${{ inputs.ctest-args }}
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }}
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.4.x' }}
fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }}
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }}
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci')) && true || false }}
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }}
use-ccache: ${{ inputs.use-ccache || false }}
13 changes: 5 additions & 8 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,24 @@ jobs:
strategy:
fail-fast: false
matrix:
os-version:
- 'windows-2019'
vs-toolset:
- 'v141'
- 'v142'
fastdds-python-branch:
- '1.4.x'
fastdds-branch:
- '2.14.x'
- '2.13.x'
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }}
uses: ./.github/workflows/reusable-windows-ci.yml
with:
# It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-version: ${{ inputs.os-version || matrix.os-version }}
os-version: ${{ inputs.os-version || 'windows-2019' }}
vs-toolset: ${{ inputs.vs-toolset || matrix.vs-toolset }}
label: '${{ matrix.os-version }}-${{ matrix.vs-toolset }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}'
label: 'windows-${{ matrix.vs-toolset }}-ci-1.4.x-${{ matrix.fastdds-branch }}'
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
ctest-args: ${{ inputs.ctest-args }}
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }}
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.4.x' }}
fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }}
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }}
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci')) && true || false }}
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }}

0 comments on commit 9896305

Please sign in to comment.