Skip to content

Commit 2e62e20

Browse files
Mario-DLJesusPoderoso
authored andcommitted
Add Ubuntu weekly ci (#5038)
* Refs #21267: Add weekly ubuntu CI to test 2.x branches with CDR 1.1.x Signed-off-by: Mario Dominguez <[email protected]> * Refs #21267: Change windows reusable ci to use new merge meta files eProsima CI action Signed-off-by: Mario Dominguez <[email protected]> * Refs #21267: move the !(skip_ci) inside the reusable workflows Signed-off-by: Mario Dominguez <[email protected]> * Refs #21267: compile fastdds_python package only Signed-off-by: Mario Dominguez <[email protected]> * Refs #21267: Apply Jesus suggestions Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit e6773fb)
1 parent 0e4e234 commit 2e62e20

File tree

3 files changed

+33
-21
lines changed

3 files changed

+33
-21
lines changed

.github/workflows/reusable-ubuntu-ci.yml

+27-1
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,21 @@ on:
2727
description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)'
2828
required: true
2929
type: string
30+
fastcdr-branch:
31+
description: 'Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)'
32+
required: false
33+
type: string
34+
default: '1.0.x'
3035
security:
3136
description: 'Enable security features'
3237
required: false
3338
type: boolean
3439
default: true
40+
run-build:
41+
description: 'Build Fast DDS (CI skipped otherwise)'
42+
required: false
43+
type: boolean
44+
default: true
3545
run-tests:
3646
description: 'Run test suite of Fast DDS, Fast DDS python, and Fast DDS Discovery Server'
3747
required: false
@@ -53,6 +63,7 @@ defaults:
5363
jobs:
5464
fastdds_build:
5565
runs-on: ${{ inputs.os-image }}
66+
if: ${{ inputs.run-build == true }}
5667
strategy:
5768
fail-fast: false
5869
matrix:
@@ -105,6 +116,20 @@ jobs:
105116
with:
106117
api_token: ${{ secrets.GITHUB_TOKEN }}
107118

119+
- name: Get Fast CDR branch
120+
id: get_fastcdr_branch
121+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
122+
with:
123+
remote_repository: eProsima/Fast-CDR
124+
fallback_branch: ${{ inputs.fastcdr-branch }}
125+
126+
- name: Download Fast CDR
127+
uses: eProsima/eProsima-CI/external/checkout@v0
128+
with:
129+
repository: eProsima/Fast-CDR
130+
path: ${{ github.workspace }}/src/fastcdr
131+
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
132+
108133
- name: Fetch Fast DDS dependencies
109134
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
110135
with:
@@ -296,10 +321,11 @@ jobs:
296321
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
297322
with:
298323
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta
299-
colcon_build_args: ${{ inputs.colcon-args }}
324+
colcon_build_args: ${{ inputs.colcon-args }} --packages-select fastdds_python
300325
cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}'
301326
cmake_args_default: ''
302327
cmake_build_type: ${{ matrix.cmake-build-type }}
328+
workspace_dependencies: ${{ github.workspace }}/install
303329
workspace: ${{ github.workspace }}
304330

305331
- name: Upload python build artifacts

.github/workflows/reusable-windows-ci.yml

+4-16
Original file line numberDiff line numberDiff line change
@@ -142,22 +142,10 @@ jobs:
142142
skip_existing: 'true'
143143

144144
- name: Prepare build meta file
145-
run: |
146-
$build_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_build.meta'
147-
$test_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_test.meta'
148-
$build_test_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_build_test.meta'
149-
150-
# Read the content of the build meta file
151-
$build_meta_content = Get-Content -Path $build_meta_file
152-
153-
# 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])
154-
$test_meta_content = Get-Content -Path $test_meta_file | Select-Object -Skip 3
155-
156-
# Combine the content of the build meta file and the test meta file
157-
$combined_content = $build_meta_content + $test_meta_content
158-
159-
# Write the combined content to the build test meta file
160-
$combined_content | Out-File -FilePath $build_test_meta_file -Encoding UTF8
145+
uses: eProsima/eProsima-CI/windows/merge_yaml_metas@v0
146+
with:
147+
metas: "@('${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta', '${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta')"
148+
path: '${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build_test.meta'
161149

162150
- name: Build
163151
id: build

.github/workflows/ubuntu-ci.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ concurrency:
5454
jobs:
5555
ubuntu-ci:
5656

57-
if: ${{ (
58-
!contains(github.event.pull_request.labels.*.name, 'skip-ci') &&
59-
!contains(github.event.pull_request.labels.*.name, 'conflicts')
60-
) }}
57+
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
6158
uses: ./.github/workflows/reusable-ubuntu-ci.yml
6259
with:
6360
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
@@ -69,5 +66,6 @@ jobs:
6966
ctest-args: ${{ inputs.ctest-args || '-LE xfail' }}
7067
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.10.x' }}
7168
security: ${{ ((inputs.security == true) && true) || github.event_name == 'pull_request' }}
69+
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
7270
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }}
7371
use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }}

0 commit comments

Comments
 (0)