diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly-ubuntu-ci.yml similarity index 74% rename from .github/workflows/nightly.yml rename to .github/workflows/nightly-ubuntu-ci.yml index 07c14bd9..d856e321 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly-ubuntu-ci.yml @@ -1,7 +1,9 @@ # Nightly test workflow for DDS Record & Replay -name: nightly +name: nightly-ubuntu-ci on: + workflow_dispatch: + schedule: - cron: '0 5 * * *' @@ -9,7 +11,7 @@ jobs: reusable_tests_v2: name: reusable_tests_v2 - uses: ./.github/workflows/reusable-workflow.yml + uses: ./.github/workflows/reusable-ubuntu-ci.yml with: custom_version_build: 'v2' dependencies_artifact_postfix: '_nightly' @@ -18,7 +20,7 @@ jobs: reusable_tests_v3: name: reusable_tests_v3 - uses: ./.github/workflows/reusable-workflow.yml + uses: ./.github/workflows/reusable-ubuntu-ci.yml with: custom_version_build: 'v3' dependencies_artifact_postfix: '_nightly' diff --git a/.github/workflows/nightly-windows-ci.yml b/.github/workflows/nightly-windows-ci.yml new file mode 100644 index 00000000..db32b23d --- /dev/null +++ b/.github/workflows/nightly-windows-ci.yml @@ -0,0 +1,28 @@ +# Nightly test workflow for DDS Record & Replay +name: nightly-windows-ci + +on: + workflow_dispatch: + + schedule: + - cron: '0 5 * * *' + +jobs: + + reusable_tests_v2: + name: reusable_tests_v2 + uses: ./.github/workflows/reusable-windows-ci.yml + with: + custom_version_build: 'v2' + dependencies_artifact_postfix: '_nightly' + ref: '0.x' + secrets: inherit + + reusable_tests_v3: + name: reusable_tests_v3 + uses: ./.github/workflows/reusable-windows-ci.yml + with: + custom_version_build: 'v3' + dependencies_artifact_postfix: '_nightly' + ref: 'main' + secrets: inherit diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml new file mode 100644 index 00000000..1357156a --- /dev/null +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -0,0 +1,295 @@ +# Reusable workflow to run the following jobs: +# +# - multiplatform-tests +# - [ ubuntu-22.04 | ubuntu-24.04 ] +# - [ Debug | Release ] +# - execute tests in different versions of ubuntu with different build types +# +# - asan +# - ubuntu-22.04 +# - execute tests with ASAN flag +# +# - tsan +# - ubuntu-22.04 +# - execute tests with TSAN flag +# +# - clang +# - ubuntu-22.04 +# - execute clang-tidy check +# +# - coverage +# - ubuntu-22.04 +# - execute test with coverage flag and upload results +# +# - flaky +# - ubuntu-22.04 +# - execute flaky tests +# +# - docs +# - ubuntu-22.04 +# - execute docs compile and tests +# +# - uncrustify +# - ubuntu-22.04 +# - test uncrustify +# +# - python-linter +# - ubuntu-22.04 +# - test python linter +# + +name: ubuntu-ci + +on: + + workflow_dispatch: + workflow_call: + inputs: + + custom_version_build: + description: > + Version of Fast DDS build from eProsima-CI. + required: true + type: string + + dependencies_artifact_postfix: + description: > + Postfix name to add to artifact name to download dependencies. + This is use to download a specific artifact version from eProsima-CI. + required: true + default: '_nightly' + type: string + + ref: + description: > + The branch or tag name to checkout. + required: true + type: string + default: 'main' + +env: + # TODO: controller is not tested as it has no tests + code_packages_names: 'ddsrecorder_participants ddsrecorder_yaml ddsrecorder_tool ddsreplayer_tool' + docs_packages_names: 'ddsrecorder_docs' + +jobs: + +##################################################################### +# TEST + + multiplatform-tests: + runs-on: ${{ matrix.os }}-ci + strategy: + fail-fast: false + matrix: + os: + - ubuntu-22.04 + - ubuntu-24.04 + uses: ./.github/workflows/reusable-workflow.yml + with: + os: ${{ matrix.os }} + custom_version_build: ${{ inputs.custom_version_build || 'v3' }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix || '_nightly' }} + ref: ${{ inputs.ref }} + secrets: inherit + + + +##################################################################### +# ASAN + + asan: + runs-on: ubuntu-22.04 + steps: + + - name: Sync repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src + ref: ${{ inputs.ref }} + + - name: Download dependencies and install requirements + uses: ./src/.github/actions/project_dependencies + with: + os: ubuntu-22.04 + cmake_build_type: Debug + custom_version_build: ${{ inputs.custom_version_build }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} + secret_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Compile and run tests + uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0 + with: + packages_names: ${{ env.code_packages_names }} + workspace_dependencies: './install' + cmake_build_type: Debug + cmake_args: -DBUILD_TESTS=ON -DASAN_BUILD=ON + ctest_args: --label-exclude "xfail|xasan" + test_report_artifact: test_report_asan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }} + + +##################################################################### +# TSAN + + tsan: + runs-on: ubuntu-22.04 + steps: + + - name: Sync repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src + ref: ${{ inputs.ref }} + + - name: Download dependencies and install requirements + uses: ./src/.github/actions/project_dependencies + with: + os: ubuntu-22.04 + cmake_build_type: Debug + custom_version_build: ${{ inputs.custom_version_build }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} + secret_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Compile and run tests + uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0 + env: + # GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols + # These issues were fixed in GCC 12 so we upgrade to that version. + CC: gcc-12 + CXX: g++-12 + with: + packages_names: ${{ env.code_packages_names }} + workspace_dependencies: './install' + cmake_build_type: Debug + cmake_args: -DBUILD_TESTS=ON -DTSAN_BUILD=ON + ctest_args: --label-exclude "xfail|xtsan" + test_report_artifact: test_report_tsan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }} + + +##################################################################### +# CLANG + + clang: + runs-on: ubuntu-22.04 + steps: + + - name: Sync repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src + ref: ${{ inputs.ref }} + + - name: Download dependencies and install requirements + uses: ./src/.github/actions/project_dependencies + with: + os: ubuntu-22.04 + cmake_build_type: Debug + custom_version_build: ${{ inputs.custom_version_build }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} + secret_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Compile and run tests + uses: eProsima/eProsima-CI/multiplatform/clang_build_test@v0 + with: + packages_names: ${{ env.code_packages_names }} + workspace_dependencies: './install' + + +##################################################################### +# COVERAGE + + coverage: + runs-on: ubuntu-22.04 + environment: + name: codecov + steps: + + - name: Sync repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src + ref: ${{ inputs.ref }} + + - name: Download dependencies and install requirements + uses: ./src/.github/actions/project_dependencies + with: + os: ubuntu-22.04 + cmake_build_type: Release + custom_version_build: ${{ inputs.custom_version_build }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} + secret_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Compile and run tests + uses: eProsima/eProsima-CI/ubuntu/coverage_build_test_upload@v0 + with: + packages_names: ${{ env.code_packages_names }} + workspace_dependencies: './install' + codecov_token: ${{ secrets.CODECOV_TOKEN }} + codecov_fix_file_path: ./src/codecov.yml + test_report_artifact: test_report_coverage${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }} + + +##################################################################### +# FLAKY + + flaky: + runs-on: ubuntu-22.04 + steps: + + - name: Sync repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src + ref: ${{ inputs.ref }} + + - name: Download dependencies and install requirements + uses: ./src/.github/actions/project_dependencies + with: + os: ubuntu-22.04 + cmake_build_type: Release + custom_version_build: ${{ inputs.custom_version_build }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} + secret_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Compile and run tests + uses: eProsima/eProsima-CI/multiplatform/colcon_build_test_flaky@v0 + with: + packages_names: ${{ env.code_packages_names }} + workspace_dependencies: './install' + + +##################################################################### +# DOCUMENTATION TEST + + docs: + runs-on: ubuntu-22.04 + steps: + - name: Build and test documentation + uses: eProsima/eProsima-CI/ubuntu/sphinx_docs@main + with: + checkout_path: "${{ github.workspace }}/src/ddsrecordreplay" + path_to_requirements: "${{ github.workspace }}/src/ddsrecordreplay/docs/requirements.txt" + docs_subpackage_name: ${{ env.docs_packages_names }} + secret_token: ${{ secrets.GITHUB_TOKEN }} + + +##################################################################### +# UNCRUSTIFY + + uncrustify: + runs-on: ubuntu-22.04 + steps: + + - name: Uncrustify + uses: eProsima/eProsima-CI/ubuntu/uncrustify@v0 + + +##################################################################### +# PYTHON LINTER + + python-linter: + runs-on: ubuntu-22.04 + steps: + + - name: Python Linter + uses: eProsima/eProsima-CI/ubuntu/python_linter@v0 diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml new file mode 100644 index 00000000..e23e1997 --- /dev/null +++ b/.github/workflows/reusable-windows-ci.yml @@ -0,0 +1,94 @@ +# Reusable workflow to run the following jobs: +# +# - multiplatform-tests +# - [ windows-2019 | windows-2022 ] +# - [ Debug | Release ] +# - execute tests in different versions of ubuntu with different build types +# +# - asan +# - ubuntu-22.04 +# - execute tests with ASAN flag +# +# - tsan +# - ubuntu-22.04 +# - execute tests with TSAN flag +# +# - clang +# - ubuntu-22.04 +# - execute clang-tidy check +# +# - coverage +# - ubuntu-22.04 +# - execute test with coverage flag and upload results +# +# - flaky +# - ubuntu-22.04 +# - execute flaky tests +# +# - docs +# - ubuntu-22.04 +# - execute docs compile and tests +# +# - uncrustify +# - ubuntu-22.04 +# - test uncrustify +# +# - python-linter +# - ubuntu-22.04 +# - test python linter +# + +name: windows-ci + +on: + + workflow_dispatch: + workflow_call: + inputs: + + custom_version_build: + description: > + Version of Fast DDS build from eProsima-CI. + required: true + type: string + + dependencies_artifact_postfix: + description: > + Postfix name to add to artifact name to download dependencies. + This is use to download a specific artifact version from eProsima-CI. + required: true + default: '_nightly' + type: string + + ref: + description: > + The branch or tag name to checkout. + required: true + type: string + default: 'main' + +env: + # TODO: controller is not tested as it has no tests + code_packages_names: 'ddsrecorder_participants ddsrecorder_yaml ddsrecorder_tool ddsreplayer_tool' + docs_packages_names: 'ddsrecorder_docs' + +jobs: + +##################################################################### +# TEST + + multiplatform-tests: + runs-on: ${{ matrix.os }}-ci + strategy: + fail-fast: false + matrix: + os: + - windows-2019 + - windows-2022 + uses: ./.github/workflows/reusable-workflow.yml + with: + os: ${{ matrix.os }} + custom_version_build: ${{ inputs.custom_version_build || 'v3' }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix || '_nightly' }} + ref: ${{ inputs.ref }} + secrets: inherit diff --git a/.github/workflows/reusable-workflow.yml b/.github/workflows/reusable-workflow.yml index 9cf154ff..48db8c22 100644 --- a/.github/workflows/reusable-workflow.yml +++ b/.github/workflows/reusable-workflow.yml @@ -66,6 +66,12 @@ on: type: string default: 'main' + os: + description: 'Specify runs-on machine to download specific artifact' + required: true + type: string + + env: # TODO: controller is not tested as it has no tests code_packages_names: 'ddsrecorder_participants ddsrecorder_yaml ddsrecorder_tool ddsreplayer_tool' @@ -77,19 +83,14 @@ jobs: # TEST multiplatform-tests: - runs-on: ${{ matrix.os }} + name: ${{ inputs.os }}-ci-${{ matrix.cmake_build_type }} + runs-on: ${{ inputs.os }} strategy: fail-fast: false matrix: cmake_build_type: - Release - Debug - os: - - ubuntu-22.04 - - ubuntu-24.04 - - windows-2019 - - windows-2022 - steps: - name: Sync repository @@ -101,7 +102,7 @@ jobs: - name: Download dependencies and install requirements uses: ./src/.github/actions/project_dependencies with: - os: ${{ matrix.os }} + os: ${{ inputs.os }} cmake_build_type: ${{ matrix.cmake_build_type }} custom_version_build: ${{ inputs.custom_version_build }} dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} @@ -115,204 +116,4 @@ jobs: workspace_dependencies: './install' ctest_args: --label-exclude "xfail" colcon_meta_file: ./src/.github/workflows/configurations/${{ runner.os }}/colcon.meta - test_report_artifact: test_report${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}_${{ matrix.os }}_${{ matrix.cmake_build_type }} - - -##################################################################### -# ASAN - - asan: - runs-on: ubuntu-22.04 - steps: - - - name: Sync repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src - ref: ${{ inputs.ref }} - - - name: Download dependencies and install requirements - uses: ./src/.github/actions/project_dependencies - with: - os: ubuntu-22.04 - cmake_build_type: Debug - custom_version_build: ${{ inputs.custom_version_build }} - dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} - secret_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Compile and run tests - uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0 - with: - packages_names: ${{ env.code_packages_names }} - workspace_dependencies: './install' - cmake_build_type: Debug - cmake_args: -DBUILD_TESTS=ON -DASAN_BUILD=ON - ctest_args: --label-exclude "xfail|xasan" - test_report_artifact: test_report_asan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }} - - -##################################################################### -# TSAN - - tsan: - runs-on: ubuntu-22.04 - steps: - - - name: Sync repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src - ref: ${{ inputs.ref }} - - - name: Download dependencies and install requirements - uses: ./src/.github/actions/project_dependencies - with: - os: ubuntu-22.04 - cmake_build_type: Debug - custom_version_build: ${{ inputs.custom_version_build }} - dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} - secret_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Compile and run tests - uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0 - env: - # GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols - # These issues were fixed in GCC 12 so we upgrade to that version. - CC: gcc-12 - CXX: g++-12 - with: - packages_names: ${{ env.code_packages_names }} - workspace_dependencies: './install' - cmake_build_type: Debug - cmake_args: -DBUILD_TESTS=ON -DTSAN_BUILD=ON - ctest_args: --label-exclude "xfail|xtsan" - test_report_artifact: test_report_tsan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }} - - -##################################################################### -# CLANG - - clang: - runs-on: ubuntu-22.04 - steps: - - - name: Sync repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src - ref: ${{ inputs.ref }} - - - name: Download dependencies and install requirements - uses: ./src/.github/actions/project_dependencies - with: - os: ubuntu-22.04 - cmake_build_type: Debug - custom_version_build: ${{ inputs.custom_version_build }} - dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} - secret_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Compile and run tests - uses: eProsima/eProsima-CI/multiplatform/clang_build_test@v0 - with: - packages_names: ${{ env.code_packages_names }} - workspace_dependencies: './install' - - -##################################################################### -# COVERAGE - - coverage: - runs-on: ubuntu-22.04 - environment: - name: codecov - steps: - - - name: Sync repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src - ref: ${{ inputs.ref }} - - - name: Download dependencies and install requirements - uses: ./src/.github/actions/project_dependencies - with: - os: ubuntu-22.04 - cmake_build_type: Release - custom_version_build: ${{ inputs.custom_version_build }} - dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} - secret_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Compile and run tests - uses: eProsima/eProsima-CI/ubuntu/coverage_build_test_upload@v0 - with: - packages_names: ${{ env.code_packages_names }} - workspace_dependencies: './install' - codecov_token: ${{ secrets.CODECOV_TOKEN }} - codecov_fix_file_path: ./src/codecov.yml - test_report_artifact: test_report_coverage${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }} - - -##################################################################### -# FLAKY - - flaky: - runs-on: ubuntu-22.04 - steps: - - - name: Sync repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src - ref: ${{ inputs.ref }} - - - name: Download dependencies and install requirements - uses: ./src/.github/actions/project_dependencies - with: - os: ubuntu-22.04 - cmake_build_type: Release - custom_version_build: ${{ inputs.custom_version_build }} - dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }} - secret_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Compile and run tests - uses: eProsima/eProsima-CI/multiplatform/colcon_build_test_flaky@v0 - with: - packages_names: ${{ env.code_packages_names }} - workspace_dependencies: './install' - - -##################################################################### -# DOCUMENTATION TEST - - docs: - runs-on: ubuntu-22.04 - steps: - - name: Build and test documentation - uses: eProsima/eProsima-CI/ubuntu/sphinx_docs@main - with: - checkout_path: "${{ github.workspace }}/src/ddsrecordreplay" - path_to_requirements: "${{ github.workspace }}/src/ddsrecordreplay/docs/requirements.txt" - docs_subpackage_name: ${{ env.docs_packages_names }} - secret_token: ${{ secrets.GITHUB_TOKEN }} - - -##################################################################### -# UNCRUSTIFY - - uncrustify: - runs-on: ubuntu-22.04 - steps: - - - name: Uncrustify - uses: eProsima/eProsima-CI/ubuntu/uncrustify@v0 - - -##################################################################### -# PYTHON LINTER - - python-linter: - runs-on: ubuntu-22.04 - steps: - - - name: Python Linter - uses: eProsima/eProsima-CI/ubuntu/python_linter@v0 + test_report_artifact: test_report${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}_${{ inputs.os }}_${{ matrix.cmake_build_type }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97fc36e5..9477441d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,9 +29,18 @@ on: jobs: - reusable_tests: - name: reusable_tests - uses: ./.github/workflows/reusable-workflow.yml + reusable_tests_ubuntu: + name: ubuntu-ci + uses: ./.github/workflows/reusable-ubuntu-ci.yml + with: + custom_version_build: ${{ inputs.custom_version_build || 'v3' }} + dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix || '_nightly' }} + ref: ${{ github.ref }} + secrets: inherit + + reusable_tests_windows: + name: windows-ci + uses: ./.github/workflows/reusable-windows-ci.yml with: custom_version_build: ${{ inputs.custom_version_build || 'v3' }} dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix || '_nightly' }} diff --git a/README.md b/README.md index 79590c59..262f949d 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,36 @@ -# eProsima DDS Record & Replay - - - -[![License](https://img.shields.io/github/license/eProsima/DDS-Recorder.svg)](https://opensource.org/licenses/Apache-2.0) -[![Issues](https://img.shields.io/github/issues/eProsima/DDS-Recorder.svg)](https://github.com/eProsima/DDS-Recorder/issues) -[![Forks](https://img.shields.io/github/forks/eProsima/DDS-Recorder.svg)](https://github.com/eProsima/DDS-Recorder/network/members) -[![Stars](https://img.shields.io/github/stars/eProsima/DDS-Recorder.svg)](https://github.com/eProsima/DDS-Recorder/stargazers) -[![test](https://github.com/eProsima/DDS-Recorder/actions/workflows/test.yml/badge.svg)](https://github.com/eProsima/DDS-Recorder/actions/workflows/test.yml) +[![DDS Record and Replay](resources/images/github_banner_ddsrecordreplay.png)](https://eprosima.com/middleware/tools/eprosima-dds-record-replay) + +
+ + + +

+ +
+ License + Releases + Issues + Forks + Stars +
+ Documentation badge + Windows CI + Ubuntu CI +
+ +

*eProsima DDS Record & Replay* is an end-user software application that efficiently saves DDS data published in a DDS environment into a MCAP format database. Thus, the exact playback of the recorded network events is possible as the data is linked to the timestamp at which the original data was published. diff --git a/resources/images/github_banner_ddsrecordreplay.png b/resources/images/github_banner_ddsrecordreplay.png new file mode 100644 index 00000000..948b01c7 Binary files /dev/null and b/resources/images/github_banner_ddsrecordreplay.png differ