Skip to content

Commit d5fb295

Browse files
Get correct Fast CDR related branch in CI (#5730) (#5747)
* 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 753ee21 commit d5fb295

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

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

+19
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: '1.0.x'
2631
use-ccache:
2732
description: 'Use CCache to speed up the build'
2833
required: false
@@ -100,6 +105,20 @@ jobs:
100105
# TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group,
101106
# which entails logout/login or rebooting the machine. This is not feasible in a CI environment.
102107

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

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

+33
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: '1.0.x'
4247
discovery_server_ref:
4348
description: >
4449
Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server)
@@ -90,6 +95,20 @@ jobs:
9095
with:
9196
api_token: ${{ secrets.GITHUB_TOKEN }}
9297

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

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

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

+24
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: '1.0.x'
31+
cmake-config:
32+
description: 'CMake configuration to use'
33+
required: false
34+
type: string
35+
default: 'RelWithDebInfo'
2636

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

0 commit comments

Comments
 (0)