Skip to content

Commit c6f89d3

Browse files
Get correct Fast CDR related branch in CI (#5748)
* Get correct Fast CDR related branch in CI (#5730) * Refs #22955: Add Fast CDR branch selection in reusable jobs Signed-off-by: Carlosespicur <[email protected]> * Refs #22955: Apply suggested changes Signed-off-by: Carlosespicur <[email protected]> --------- Signed-off-by: Carlosespicur <[email protected]> (cherry picked from commit c3ee5e3) # Conflicts: # .github/workflows/reusable-windows-ci.yml * Change Fast CDR branch and solve conflicts Signed-off-by: Carlosespicur <[email protected]> --------- Signed-off-by: Carlosespicur <[email protected]> Co-authored-by: Carlos Espinoza Curto <[email protected]> Co-authored-by: Carlosespicur <[email protected]>
1 parent a69d9d9 commit c6f89d3

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ on:
2323
description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)'
2424
required: true
2525
type: string
26+
fastcdr_branch:
27+
description: 'Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)'
28+
required: false
29+
type: string
30+
default: '2.2.x'
2631
use-ccache:
2732
description: 'Use CCache to speed up the build'
2833
required: false
@@ -101,6 +106,20 @@ jobs:
101106
# TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group,
102107
# which entails logout/login or rebooting the machine. This is not feasible in a CI environment.
103108

109+
- name: Get Fast CDR branch
110+
id: get_fastcdr_branch
111+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
112+
with:
113+
remote_repository: eProsima/Fast-CDR
114+
fallback_branch: ${{ inputs.fastcdr_branch }}
115+
116+
- name: Download Fast CDR
117+
uses: eProsima/eProsima-CI/external/checkout@v0
118+
with:
119+
repository: eProsima/Fast-CDR
120+
path: ${{ github.workspace }}/src/fastcdr
121+
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
122+
104123
- name: Fetch Fast DDS dependencies
105124
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
106125
with:

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ on:
3939
description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)'
4040
required: true
4141
type: string
42+
fastcdr_ref:
43+
description: 'Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)'
44+
required: false
45+
type: string
46+
default: '2.2.x'
4247
discovery_server_ref:
4348
description: >
4449
Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server)
@@ -91,6 +96,20 @@ jobs:
9196
with:
9297
api_token: ${{ secrets.GITHUB_TOKEN }}
9398

99+
- name: Get Fast CDR branch
100+
id: get_fastcdr_branch
101+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
102+
with:
103+
remote_repository: eProsima/Fast-CDR
104+
fallback_branch: ${{ inputs.fastcdr_ref }}
105+
106+
- name: Download Fast CDR
107+
uses: eProsima/eProsima-CI/external/checkout@v0
108+
with:
109+
repository: eProsima/Fast-CDR
110+
path: ${{ github.workspace }}/src/fastcdr
111+
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
112+
94113
- name: Fetch Fast DDS dependencies
95114
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
96115
with:
@@ -371,6 +390,20 @@ jobs:
371390
with:
372391
api_token: ${{ secrets.GITHUB_TOKEN }}
373392

393+
- name: Get Fast CDR branch
394+
id: get_fastcdr_branch
395+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
396+
with:
397+
remote_repository: eProsima/Fast-CDR
398+
fallback_branch: ${{ inputs.fastcdr_ref }}
399+
400+
- name: Download Fast CDR
401+
uses: eProsima/eProsima-CI/external/checkout@v0
402+
with:
403+
repository: eProsima/Fast-CDR
404+
path: ${{ github.workspace }}/src/fastcdr
405+
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
406+
374407
- name: Fetch Fast DDS dependencies
375408
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
376409
with:

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ on:
2323
description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)'
2424
required: true
2525
type: string
26+
fastcdr_branch:
27+
description: 'Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)'
28+
required: false
29+
type: string
30+
default: '2.2.x'
31+
cmake-config:
32+
description: 'CMake configuration to use'
33+
required: false
34+
type: string
35+
default: 'RelWithDebInfo'
2636

2737
defaults:
2838
run:
@@ -118,6 +128,20 @@ jobs:
118128
# Show the result
119129
gc $hostfile
120130
131+
- name: Get Fast CDR branch
132+
id: get_fastcdr_branch
133+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
134+
with:
135+
remote_repository: eProsima/Fast-CDR
136+
fallback_branch: ${{ inputs.fastcdr_branch }}
137+
138+
- name: Download Fast CDR
139+
uses: eProsima/eProsima-CI/external/checkout@v0
140+
with:
141+
repository: eProsima/Fast-CDR
142+
path: ${{ github.workspace }}/src/fastcdr
143+
ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
144+
121145
- name: Fetch Fast DDS dependencies
122146
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
123147
with:

0 commit comments

Comments
 (0)