Skip to content

Commit

Permalink
Refs #20542: Manual cherry-pick of PR #4549
Browse files Browse the repository at this point in the history
Signed-off-by: EduPonz <[email protected]>
  • Loading branch information
EduPonz committed Mar 13, 2024
1 parent 51417b3 commit 9480c9e
Show file tree
Hide file tree
Showing 15 changed files with 82 additions and 236 deletions.
51 changes: 19 additions & 32 deletions .github/workflows/config/asan_colcon.meta
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
{
"names":
{
"fastrtps":
{
"cmake-args":
[
"-DCMAKE_BUILD_TYPE=Debug",
"-DEPROSIMA_BUILD_TESTS=ON",
"-DGTEST_INDIVIDUAL=ON",
"-DRTPS_API_TESTS=ON",
"-DFASTRTPS_API_TESTS=ON",
"-DFASTDDS_PIM_API_TESTS=ON",
"-DPERFORMANCE_TESTS=ON",
"-DNO_TLS=OFF",
"-DSECURITY=ON",
"-DFASTDDS_STATISTICS=ON",
"-DSANITIZER=Address",
"-DCMAKE_CXX_FLAGS='-Werror'"
]
},

"discovery-server":
{
"cmake-args":
[
"-DCMAKE_BUILD_TYPE=Debug",
"-DSANITIZER=Address",
]
}
}
}
names:
fastrtps:
cmake-args:
- "-DCMAKE_BUILD_TYPE=Debug",
- "-DEPROSIMA_BUILD_TESTS=ON",
- "-DGTEST_INDIVIDUAL=ON",
- "-DRTPS_API_TESTS=ON",
- "-DFASTRTPS_API_TESTS=ON",
- "-DFASTDDS_PIM_API_TESTS=ON",
- "-DPERFORMANCE_TESTS=ON",
- "-DNO_TLS=OFF",
- "-DSECURITY=ON",
- "-DFASTDDS_STATISTICS=ON",
- "-DSANITIZER=Address",
- "-DCMAKE_CXX_FLAGS='-Werror'"
discovery-server:
cmake-args:
- "-DCMAKE_BUILD_TYPE=Debug",
- "-DSANITIZER=Address",
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ names:
- "-DNO_TLS=OFF"
- "-DPERFORMANCE_TESTS=ON"
- "-DPROFILING_TESTS=OFF"
- "-DSECURITY=ON"
- "-DSHM_TRANSPORT_DEFAULT=ON"
- "-DSTRICT_REALTIME=OFF"
- "-DSYSTEM_TESTS=ON"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/config/ci.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repositories:
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
17 changes: 0 additions & 17 deletions .github/workflows/config/coverage.repos

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/config/default_ci_2.10.x.repos

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/config/default_ci_2.12.x.repos

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/config/default_ci_2.6.x.repos

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/config/default_ci_master.repos

This file was deleted.

51 changes: 19 additions & 32 deletions .github/workflows/config/tsan_colcon.meta
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
{
"names":
{
"fastcdr":
{
"cmake-args":
[
"-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
"-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
]
},
"fastrtps":
{
"cmake-args":
[
"-DCOMPILE_EXAMPLES=OFF",
"-DEPROSIMA_BUILD_TESTS=ON",
"-DGTEST_INDIVIDUAL=ON",
"-DRTPS_API_TESTS=ON",
"-DFASTRTPS_API_TESTS=OFF",
"-DFASTDDS_PIM_API_TESTS=ON",
"-DPERFORMANCE_TESTS=ON",
"-DNO_TLS=OFF",
"-DSECURITY=ON",
"-DFASTDDS_STATISTICS=ON",
"-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
"-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
]
}

}
}
names:
fastcdr:
cmake-args:
- "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
- "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
fastrtps:
cmake-args:
- "-DCOMPILE_EXAMPLES=OFF",
- "-DEPROSIMA_BUILD_TESTS=ON",
- "-DGTEST_INDIVIDUAL=ON",
- "-DRTPS_API_TESTS=ON",
- "-DFASTRTPS_API_TESTS=OFF",
- "-DFASTDDS_PIM_API_TESTS=ON",
- "-DPERFORMANCE_TESTS=ON",
- "-DNO_TLS=OFF",
- "-DSECURITY=ON",
- "-DFASTDDS_STATISTICS=ON",
- "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'",
- "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'"
2 changes: 1 addition & 1 deletion .github/workflows/mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
with:
label: ${{ inputs.label || 'mac-ci' }}
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}'
ctest-args: ${{ inputs.ctest-args }}
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.12.x' }}
43 changes: 12 additions & 31 deletions .github/workflows/reusable-mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,38 +82,19 @@ jobs:
# TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group,
# which entails logout/login or rebooting the machine. This is not feasible in a CI environment.

- name: Prepare colcon workspace
id: colcon_ws_setup
run: |
# Nightly job
if [[ "${{ inputs.label }}" == *"nightly"* ]]
then
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_${{ inputs.fastdds-branch }}.repos"
if [ ! -f ${DEPENDS_REPOS_PATH} ]
then
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_2.12.x.repos"
fi
META_PATH="./src/fastrtps/.github/workflows/config/nightly.meta"
# Either PR or manual
else
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_${{ inputs.fastdds-branch }}.repos"
if [ ! -f ${DEPENDS_REPOS_PATH} ]
then
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_2.12.x.repos"
fi
META_PATH="./src/fastrtps/.github/workflows/config/default_ci.meta"
fi
echo "Selected repos files: ${DEPENDS_REPOS_PATH}"
cat ${DEPENDS_REPOS_PATH}
echo "Selected metas files: ${META_PATH}"
cp ${META_PATH} ci.meta
cat ci.meta
- name: Fetch Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos
destination_workspace: src
skip_existing: 'true'

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

# TODO(eduponz): There is a warning in clang >= 16 regarding enum-constexpr-conversion:
# - Issue: https://github.com/boostorg/mpl/issues/69.
Expand Down
43 changes: 12 additions & 31 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,38 +76,19 @@ jobs:
# TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group,
# which entails logout/login or rebooting the machine. This is not feasible in a CI environment.

- name: Prepare colcon workspace
id: colcon_ws_setup
run: |
# Nightly job
if [[ "${{ inputs.label }}" == *"nightly"* ]]
then
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_${{ inputs.fastdds-branch }}.repos"
if [ ! -f ${DEPENDS_REPOS_PATH} ]
then
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_master.repos"
fi
META_PATH="./src/fastrtps/.github/workflows/config/nightly.meta"
# Either PR or manual
else
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_${{ inputs.fastdds-branch }}.repos"
if [ ! -f ${DEPENDS_REPOS_PATH} ]
then
DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_master.repos"
fi
META_PATH="./src/fastrtps/.github/workflows/config/default_ci.meta"
fi
echo "Selected repos files: ${DEPENDS_REPOS_PATH}"
cat ${DEPENDS_REPOS_PATH}
echo "Selected metas files: ${META_PATH}"
cp ${META_PATH} ci.meta
cat ci.meta
- name: Fetch Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos
destination_workspace: src
skip_existing: 'true'

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

- name: Colcon build
continue-on-error: false
Expand Down
49 changes: 12 additions & 37 deletions .github/workflows/reusable-windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,44 +115,19 @@ jobs:
# Show the result
gc $hostfile
- name: Prepare colcon workspace
run: |
# Get some convenient tools
Install-Module -Name ConvertBase64Strings -Force -AllowClobber
Import-Module -name ConvertBase64Strings -Prefix CI
Install-Module powershell-yaml -Force
# Nightly job
if ("${{ inputs.label }}".Contains("nightly"))
{
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_${{ inputs.fastdds_branch }}.repos"
if (!(Test-Path -Path $depends_repos_path))
{
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_2.12.x.repos"
}
$meta_path = ".\src\fastrtps\.github\workflows\config\nightly.meta"
}
# Either PR or manual
else
{
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_${{ inputs.fastdds_branch }}.repos"
if (!(Test-Path -Path $depends_repos_path))
{
$depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_2.12.x.repos"
}
$meta_path = ".\src\fastrtps\.github\workflows\config\default_ci.meta"
}
Write-Output "Selected repos files: $depends_repos_path"
Write-Output "Selected metas files: $meta_path"
# Generate the meta file
"::group::deployed colcon.meta file"
$meta = Get-Content $meta_path | ConvertFrom-Yaml
$meta | ConvertTo-Json -Depth 3 | Tee-Object -FilePath ci.meta -Encoding OEM
"::endgroup::"
- name: Fetch Fast DDS dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}\src\fastrtps\fastrtps.repos
destination_workspace: src
skip_existing: 'true'

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

- name: Build
id: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
os-image: ${{ matrix.os-image }}
label: ${{ inputs.label || 'ubuntu-ci' }}
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args || '-DSECURITY=ON' }}
cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}'
ctest-args: ${{ inputs.ctest-args || '-LE xfail' }}
fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.12.x' }}
2 changes: 1 addition & 1 deletion .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
with:
label: ${{ inputs.label || 'windows-ci' }}
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}'
ctest-args: ${{ inputs.ctest-args }}
fastdds_branch: ${{ inputs.fastdds_branch || github.ref || '2.12.x' }}

0 comments on commit 9480c9e

Please sign in to comment.