Skip to content

Commit

Permalink
Refactor Fast DDS Ubuntu CI to include several tests (#4860)
Browse files Browse the repository at this point in the history
* Refs #20822: Split current job into different jobs

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Add shapes demo build job

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Add discovery server build test job

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Add python build test job

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Add documentation build test job

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Remove previous documentation workflow

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Avoid building with tests if not running tests

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Try to fix documentation job

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Move conditions to reusable workflows

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Apply internal review suggestions

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Refactor meta files into build and test, and combine them in test steps

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Remove matrix from ubuntu CI

Signed-off-by: JesusPoderoso <[email protected]>

* Revert "Refs #20822: Move conditions to reusable workflows"

This reverts commit d4eea0d.

* Refs #20822: Apply rev suggestions

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Add missing discovery server requirements in the job

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Apply rev suggestions (2)

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Fixing windows workflow by merging metas

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Add step with alternative builds

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Use colcon test meta in all jobs, and fix xfail filter

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Remove redundant CMake args, and fix alternative builds

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Apply rev suggestions (3)

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Explicitly compare boolean inputs

Signed-off-by: eduponz <[email protected]>

* Refs #20822: Install tools on test steps to avoid losing symlink permissions

Signed-off-by: eduponz <[email protected]>

* Refs #20822: Update discovery_server meta file name

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Adjust ternary operators

Signed-off-by: JesusPoderoso <[email protected]>

* Refs #20822: Use CCache based on an input parameter

Signed-off-by: JesusPoderoso <[email protected]>

---------

Signed-off-by: JesusPoderoso <[email protected]>
Signed-off-by: eduponz <[email protected]>
Co-authored-by: eduponz <[email protected]>
(cherry picked from commit 22338f3)

# Conflicts:
#	.github/workflows/config/documentation.meta
#	.github/workflows/config/fastdds_build.meta
#	.github/workflows/documentation-tests.yaml
#	.github/workflows/nightly-ubuntu-ci.yml
#	.github/workflows/reusable-mac-ci.yml
#	.github/workflows/reusable-sanitizers-ci.yml
#	.github/workflows/reusable-ubuntu-ci.yml
#	.github/workflows/reusable-windows-ci.yml
#	.github/workflows/ubuntu-ci.yml
  • Loading branch information
JesusPoderoso authored and mergify[bot] committed Jun 17, 2024
1 parent 5e9a831 commit b6d1cca
Show file tree
Hide file tree
Showing 15 changed files with 930 additions and 53 deletions.
File renamed without changes.
11 changes: 11 additions & 0 deletions .github/workflows/config/discovery_server.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
names:
fastdds:
cmake-args:
- "-DCOMPILE_TOOLS=ON"
- "-DINSTALL_TOOLS=ON"
discovery-server:
ctest-args: [
"--repeat", "until-pass:3",
"--timeout", "300",
"--label-exclude", "xfail"
]
6 changes: 6 additions & 0 deletions .github/workflows/config/documentation.meta
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
names:
<<<<<<< HEAD
fastrtps:
cmake-args:
- "-DBUILD_SHARED_LIBS=ON"
- "-DSECURITY=ON"
- "-DTHIRDPARTY_Asio=FORCE"
- "-DTHIRDPARTY_TinyXML2=FORCE"
- "-DTHIRDPARTY_UPDATE=OFF"
=======
>>>>>>> 22338f3fc (Refactor Fast DDS Ubuntu CI to include several tests (#4860))
fastdds-docs:
cmake-args:
- "-DBUILD_DOCUMENTATION=ON"
- "-DCOMPILE_TESTS=ON"
ctest-args: [
"--timeout", "500"
]
googletest-distribution:
cmake-args:
- "-Dgtest_force_shared_crt=ON"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@ names:
fastrtps:
cmake-args:
- "-DBUILD_DOCUMENTATION=OFF"
- "-DBUILD_SHARED_LIBS=ON"
- "-DCOMPILE_EXAMPLES=ON"
- "-DEPROSIMA_BUILD_TESTS=ON"
- "-DFASTDDS_ENFORCE_LOG_INFO=ON"
<<<<<<< HEAD:.github/workflows/config/ci.meta
- "-DFASTDDS_PIM_API_TESTS=ON"
- "-DFASTDDS_STATISTICS=ON"
- "-DFASTRTPS_API_TESTS=OFF"
- "-DGTEST_INDIVIDUAL=ON"
=======
>>>>>>> 22338f3fc (Refactor Fast DDS Ubuntu CI to include several tests (#4860)):.github/workflows/config/fastdds_build.meta
- "-DINSTALL_EXAMPLES=ON"
- "-DINSTALL_TOOLS=ON"
- "-DINTERNAL_DEBUG=ON"
- "-DNO_TLS=OFF"
- "-DPERFORMANCE_TESTS=ON"
- "-DPROFILING_TESTS=OFF"
- "-DSHM_TRANSPORT_DEFAULT=ON"
- "-DSTRICT_REALTIME=OFF"
- "-DSYSTEM_TESTS=ON"
- "-DMEMORYCHECK_COMMAND_OPTIONS=-q --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 --log-fd=2 --error-exitcode=1"
<<<<<<< HEAD:.github/workflows/config/ci.meta
- "-DMEMORYCHECK_SUPPRESSIONS_FILE=../../src/fastrtps/valgrind.supp"
googletest-distribution:
cmake-args:
- "-Dgtest_force_shared_crt=ON"
- "-DBUILD_SHARED_LIBS=ON"
- "-DBUILD_GMOCK=ON"
=======
- "-DMEMORYCHECK_SUPPRESSIONS_FILE=../../src/fastdds/valgrind.supp"
>>>>>>> 22338f3fc (Refactor Fast DDS Ubuntu CI to include several tests (#4860)):.github/workflows/config/fastdds_build.meta
19 changes: 19 additions & 0 deletions .github/workflows/config/fastdds_test.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
names:
fastdds:
cmake-args:
- "-DEPROSIMA_BUILD_TESTS=ON"
- "-DFASTDDS_PIM_API_TESTS=ON"
- "-DPERFORMANCE_TESTS=ON"
- "-DPROFILING_TESTS=OFF"
- "-DCOMPILE_TOOLS=ON"
- "-DSYSTEM_TESTS=ON"
ctest-args: [
"--repeat", "until-pass:3",
"--timeout", "300",
"--label-exclude", "xfail"
]
googletest-distribution:
cmake-args:
- "-Dgtest_force_shared_crt=ON"
- "-DBUILD_SHARED_LIBS=ON"
- "-DBUILD_GMOCK=ON"
File renamed without changes.
15 changes: 15 additions & 0 deletions .github/workflows/config/python_test.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
names:
fastdds_python:
cmake-args:
- "-DBUILD_TESTING=ON"
- "-DBUILD_DOCUMENTATION=ON"
ctest-args: [
"--repeat", "until-pass:3",
"--timeout", "300",
"--label-exclude", "xfail"
]
googletest-distribution:
cmake-args:
- "-Dgtest_force_shared_crt=ON"
- "-DBUILD_SHARED_LIBS=ON"
- "-DBUILD_GMOCK=ON"
File renamed without changes.
102 changes: 102 additions & 0 deletions .github/workflows/nightly-ubuntu-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Fast DDS Ubuntu CI (nightly)

on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'

jobs:
nightly-ubuntu-ci-master:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/reusable-ubuntu-ci.yml@master
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-master'
ctest-args: "-LE xfail"
fastdds-branch: 'master'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_14_x:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-2.14.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.14.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_13_x:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-2.13.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.13.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_10_x:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-2.10.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.10.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true

nightly-ubuntu-ci-2_6_x:
strategy:
fail-fast: false
matrix:
os-image:
- 'ubuntu-22.04'
security:
- true
- false
uses: eProsima/Fast-DDS/.github/workflows/[email protected]
with:
os-image: ${{ matrix.os-image }}
label: '${{ matrix.os-image }}-nightly-sec-${{ matrix.security }}-ubuntu-ci-2.6.x'
ctest-args: "-LE xfail"
fastdds-branch: '2.6.x'
security: ${{ matrix.security }}
run-tests: true
use-ccache: true
14 changes: 13 additions & 1 deletion .github/workflows/reusable-mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
# so we'll use that one for now, as clang 15 is the supported compiler for Fast DDS in macOS.
# (see https://github.com/eProsima/Fast-DDS/blob/master/PLATFORM_SUPPORT.md#compilers)
runs-on: macos-13
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -113,7 +112,11 @@ jobs:
- name: Fetch Fast DDS CI dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
<<<<<<< HEAD
vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos
=======
vcs_repos_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.repos
>>>>>>> 22338f3fc (Refactor Fast DDS Ubuntu CI to include several tests (#4860))
destination_workspace: src
skip_existing: 'true'

Expand All @@ -125,7 +128,11 @@ jobs:
continue-on-error: false
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
<<<<<<< HEAD
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta
=======
colcon_meta_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.meta
>>>>>>> 22338f3fc (Refactor Fast DDS Ubuntu CI to include several tests (#4860))
colcon_build_args: ${{ inputs.colcon-args }}
cmake_args: ${{ inputs.cmake-args }}
cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wno-enum-constexpr-conversion"
Expand All @@ -137,11 +144,16 @@ jobs:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }}
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.meta
colcon_test_args: ${{ inputs.colcon-args }}
colcon_test_args_default: --event-handlers=console_direct+
ctest_args: ${{ inputs.ctest-args }}
<<<<<<< HEAD
ctest_args_default: --repeat until-pass:3 --timeout 300 --label-exclude "xfail"
packages_names: fastrtps
=======
packages_names: fastdds
>>>>>>> 22338f3fc (Refactor Fast DDS Ubuntu CI to include several tests (#4860))
workspace: ${{ github.workspace }}
test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }}

Expand Down
Loading

0 comments on commit b6d1cca

Please sign in to comment.