Skip to content

Commit f6d8c14

Browse files
authored
Manual cherry-pick of PR #4549 (#4556)
* Refs #20542: Manual cherry-pick of PR #4549 Signed-off-by: EduPonz <[email protected]> * Refs #20542: Add missing ci.meta Signed-off-by: EduPonz <[email protected]> * Refs #20542: Fix metas as yml Signed-off-by: EduPonz <[email protected]> * Refs #20542: Fix paths to .metas Signed-off-by: EduPonz <[email protected]> --------- Signed-off-by: EduPonz <[email protected]>
1 parent 6dc23dd commit f6d8c14

12 files changed

+86
-196
lines changed
Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,19 @@
1-
{
2-
"names":
3-
{
4-
"fastrtps":
5-
{
6-
"cmake-args":
7-
[
8-
"-DCMAKE_BUILD_TYPE=Debug",
9-
"-DEPROSIMA_BUILD_TESTS=ON",
10-
"-DGTEST_INDIVIDUAL=ON",
11-
"-DRTPS_API_TESTS=ON",
12-
"-DFASTRTPS_API_TESTS=ON",
13-
"-DFASTDDS_PIM_API_TESTS=ON",
14-
"-DPERFORMANCE_TESTS=ON",
15-
"-DNO_TLS=OFF",
16-
"-DSECURITY=ON",
17-
"-DFASTDDS_STATISTICS=ON",
18-
"-DSANITIZER=Address",
19-
"-DCMAKE_CXX_FLAGS='-Werror'"
20-
]
21-
},
22-
23-
"discovery-server":
24-
{
25-
"cmake-args":
26-
[
27-
"-DCMAKE_BUILD_TYPE=Debug",
28-
"-DSANITIZER=Address",
29-
]
30-
}
31-
}
32-
}
1+
names:
2+
fastrtps:
3+
cmake-args:
4+
- "-DCMAKE_BUILD_TYPE=Debug"
5+
- "-DEPROSIMA_BUILD_TESTS=ON"
6+
- "-DGTEST_INDIVIDUAL=ON"
7+
- "-DRTPS_API_TESTS=ON"
8+
- "-DFASTRTPS_API_TESTS=ON"
9+
- "-DFASTDDS_PIM_API_TESTS=ON"
10+
- "-DPERFORMANCE_TESTS=ON"
11+
- "-DNO_TLS=OFF"
12+
- "-DSECURITY=ON"
13+
- "-DFASTDDS_STATISTICS=ON"
14+
- "-DSANITIZER=Address"
15+
- "-DCMAKE_CXX_FLAGS='-Werror'"
16+
discovery-server:
17+
cmake-args:
18+
- "-DCMAKE_BUILD_TYPE=Debug"
19+
- "-DSANITIZER=Address"

.github/workflows/config/default_ci.meta renamed to .github/workflows/config/ci.meta

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ names:
1616
- "-DNO_TLS=OFF"
1717
- "-DPERFORMANCE_TESTS=ON"
1818
- "-DPROFILING_TESTS=OFF"
19-
- "-DSECURITY=ON"
2019
- "-DSHM_TRANSPORT_DEFAULT=ON"
2120
- "-DSTRICT_REALTIME=OFF"
2221
- "-DSYSTEM_TESTS=ON"

.github/workflows/config/ci.repos

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repositories:
2+
googletest-distribution:
3+
type: git
4+
url: https://github.com/google/googletest.git
5+
version: release-1.11.0

.github/workflows/config/default_ci_2.10.x.repos

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/config/default_ci_2.6.x.repos

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
1-
{
2-
"names":
3-
{
4-
"fastcdr":
5-
{
6-
"cmake-args":
7-
[
8-
"-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
9-
"-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
10-
]
11-
},
12-
"fastrtps":
13-
{
14-
"cmake-args":
15-
[
16-
"-DCOMPILE_EXAMPLES=OFF",
17-
"-DEPROSIMA_BUILD_TESTS=ON",
18-
"-DGTEST_INDIVIDUAL=ON",
19-
"-DRTPS_API_TESTS=ON",
20-
"-DFASTRTPS_API_TESTS=OFF",
21-
"-DFASTDDS_PIM_API_TESTS=ON",
22-
"-DPERFORMANCE_TESTS=ON",
23-
"-DSECURITY=ON",
24-
"-DFASTDDS_STATISTICS=ON",
25-
"-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
26-
"-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
27-
]
28-
}
29-
30-
}
31-
}
1+
names:
2+
fastcdr:
3+
cmake-args:
4+
- "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
5+
- "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
6+
fastrtps:
7+
cmake-args:
8+
- "-DCOMPILE_EXAMPLES=OFF"
9+
- "-DEPROSIMA_BUILD_TESTS=ON"
10+
- "-DGTEST_INDIVIDUAL=ON"
11+
- "-DRTPS_API_TESTS=ON"
12+
- "-DFASTRTPS_API_TESTS=OFF"
13+
- "-DFASTDDS_PIM_API_TESTS=ON"
14+
- "-DPERFORMANCE_TESTS=ON"
15+
- "-DNO_TLS=OFF"
16+
- "-DSECURITY=ON"
17+
- "-DFASTDDS_STATISTICS=ON"
18+
- "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
19+
- "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"

.github/workflows/mac-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
with:
4545
label: ${{ inputs.label || 'mac-ci' }}
4646
colcon-args: ${{ inputs.colcon-args }}
47-
cmake-args: ${{ inputs.cmake-args }}
47+
cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}'
4848
ctest-args: ${{ inputs.ctest-args }}
4949
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.10.x' }}

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

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -82,38 +82,19 @@ jobs:
8282
# TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group,
8383
# which entails logout/login or rebooting the machine. This is not feasible in a CI environment.
8484

85-
- name: Prepare colcon workspace
86-
id: colcon_ws_setup
87-
run: |
88-
# Nightly job
89-
if [[ "${{ inputs.label }}" == *"nightly"* ]]
90-
then
91-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_${{ inputs.fastdds-branch }}.repos"
92-
if [ ! -f ${DEPENDS_REPOS_PATH} ]
93-
then
94-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_2.10.x.repos"
95-
fi
96-
META_PATH="./src/fastrtps/.github/workflows/config/nightly.meta"
97-
98-
# Either PR or manual
99-
else
100-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_${{ inputs.fastdds-branch }}.repos"
101-
if [ ! -f ${DEPENDS_REPOS_PATH} ]
102-
then
103-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_2.10.x.repos"
104-
fi
105-
META_PATH="./src/fastrtps/.github/workflows/config/default_ci.meta"
106-
fi
107-
108-
echo "Selected repos files: ${DEPENDS_REPOS_PATH}"
109-
cat ${DEPENDS_REPOS_PATH}
110-
111-
echo "Selected metas files: ${META_PATH}"
112-
cp ${META_PATH} ci.meta
113-
cat ci.meta
85+
- name: Fetch Fast DDS dependencies
86+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
87+
with:
88+
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos
89+
destination_workspace: src
90+
skip_existing: 'true'
11491

115-
# Create source dir and download the sources
116-
vcs import src --input ${DEPENDS_REPOS_PATH} --skip-existing
92+
- name: Fetch Fast DDS CI dependencies
93+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
94+
with:
95+
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos
96+
destination_workspace: src
97+
skip_existing: 'true'
11798

11899
# TODO(eduponz): There is a warning in clang >= 16 regarding enum-constexpr-conversion:
119100
# - Issue: https://github.com/boostorg/mpl/issues/69.
@@ -123,7 +104,7 @@ jobs:
123104
continue-on-error: false
124105
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
125106
with:
126-
colcon_meta_file: ${{ github.workspace }}/ci.meta
107+
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta
127108
colcon_build_args: ${{ inputs.colcon-args }}
128109
cmake_args: ${{ inputs.cmake-args }}
129110
cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wno-enum-constexpr-conversion"

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

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -76,44 +76,25 @@ jobs:
7676
# TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group,
7777
# which entails logout/login or rebooting the machine. This is not feasible in a CI environment.
7878

79-
- name: Prepare colcon workspace
80-
id: colcon_ws_setup
81-
run: |
82-
# Nightly job
83-
if [[ "${{ inputs.label }}" == *"nightly"* ]]
84-
then
85-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_${{ inputs.fastdds-branch }}.repos"
86-
if [ ! -f ${DEPENDS_REPOS_PATH} ]
87-
then
88-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_master.repos"
89-
fi
90-
META_PATH="./src/fastrtps/.github/workflows/config/nightly.meta"
91-
92-
# Either PR or manual
93-
else
94-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_${{ inputs.fastdds-branch }}.repos"
95-
if [ ! -f ${DEPENDS_REPOS_PATH} ]
96-
then
97-
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_master.repos"
98-
fi
99-
META_PATH="./src/fastrtps/.github/workflows/config/default_ci.meta"
100-
fi
101-
102-
echo "Selected repos files: ${DEPENDS_REPOS_PATH}"
103-
cat ${DEPENDS_REPOS_PATH}
104-
105-
echo "Selected metas files: ${META_PATH}"
106-
cp ${META_PATH} ci.meta
107-
cat ci.meta
79+
- name: Fetch Fast DDS dependencies
80+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
81+
with:
82+
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos
83+
destination_workspace: src
84+
skip_existing: 'true'
10885

109-
# Create source dir and download the sources
110-
vcs import src --input ${DEPENDS_REPOS_PATH} --skip-existing
86+
- name: Fetch Fast DDS CI dependencies
87+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
88+
with:
89+
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos
90+
destination_workspace: src
91+
skip_existing: 'true'
11192

11293
- name: Colcon build
11394
continue-on-error: false
11495
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
11596
with:
116-
colcon_meta_file: ${{ github.workspace }}/ci.meta
97+
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta
11798
colcon_build_args: ${{ inputs.colcon-args }}
11899
cmake_args: ${{ inputs.cmake-args }}
119100
cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall"

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

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -115,51 +115,26 @@ jobs:
115115
# Show the result
116116
gc $hostfile
117117
118-
- name: Prepare colcon workspace
119-
run: |
120-
# Get some convenient tools
121-
Install-Module -Name ConvertBase64Strings -Force -AllowClobber
122-
Import-Module -name ConvertBase64Strings -Prefix CI
123-
Install-Module powershell-yaml -Force
124-
125-
# Nightly job
126-
if ("${{ inputs.label }}".Contains("nightly"))
127-
{
128-
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_${{ inputs.fastdds_branch }}.repos"
129-
if (!(Test-Path -Path $depends_repos_path))
130-
{
131-
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_2.10.x.repos"
132-
}
133-
$meta_path = ".\src\fastrtps\.github\workflows\config\nightly.meta"
134-
}
135-
# Either PR or manual
136-
else
137-
{
138-
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_${{ inputs.fastdds_branch }}.repos"
139-
if (!(Test-Path -Path $depends_repos_path))
140-
{
141-
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_2.10.x.repos"
142-
}
143-
$meta_path = ".\src\fastrtps\.github\workflows\config\default_ci.meta"
144-
}
145-
Write-Output "Selected repos files: $depends_repos_path"
146-
Write-Output "Selected metas files: $meta_path"
147-
148-
# Generate the meta file
149-
"::group::deployed colcon.meta file"
150-
$meta = Get-Content $meta_path | ConvertFrom-Yaml
151-
$meta | ConvertTo-Json -Depth 3 | Tee-Object -FilePath ci.meta -Encoding OEM
152-
"::endgroup::"
118+
- name: Fetch Fast DDS dependencies
119+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
120+
with:
121+
vcs_repos_file: ${{ github.workspace }}\src\fastrtps\fastrtps.repos
122+
destination_workspace: src
123+
skip_existing: 'true'
153124

154-
# create source dir and download the sources
155-
vcs import src --input $depends_repos_path --skip-existing
125+
- name: Fetch Fast DDS CI dependencies
126+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
127+
with:
128+
vcs_repos_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\ci.repos
129+
destination_workspace: src
130+
skip_existing: 'true'
156131

157132
- name: Build
158133
id: build
159134
continue-on-error: false
160135
uses: eProsima/eProsima-CI/windows/colcon_build@v0
161136
with:
162-
colcon_meta_file: ${{ github.workspace }}/ci.meta
137+
colcon_meta_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\ci.meta
163138
colcon_build_args: ${{ inputs.colcon-args }}
164139
# The following Fast DDS CMake options need to be specified here instead of in the ci.meta file
165140
# because they vary from platform to platform

.github/workflows/ubuntu-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
os-image: ${{ matrix.os-image }}
4343
label: ${{ inputs.label || 'ubuntu-ci' }}
4444
colcon-args: ${{ inputs.colcon-args }}
45-
cmake-args: ${{ inputs.cmake-args || "-DSECURITY=ON" }}
46-
ctest-args: ${{ inputs.ctest-args || "-LE xfail" }}
45+
cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}'
46+
ctest-args: ${{ inputs.ctest-args || '-LE xfail' }}
4747
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.10.x' }}

.github/workflows/windows-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
with:
4545
label: ${{ inputs.label || 'windows-ci' }}
4646
colcon-args: ${{ inputs.colcon-args }}
47-
cmake-args: ${{ inputs.cmake-args }}
47+
cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}'
4848
ctest-args: ${{ inputs.ctest-args }}
4949
fastdds_branch: ${{ inputs.fastdds_branch || github.ref || '2.10.x' }}

0 commit comments

Comments
 (0)