From 40523fd390e300fbeed0b297ae9132637e05d8eb Mon Sep 17 00:00:00 2001 From: JLBuenoLopez-eProsima Date: Fri, 8 Sep 2023 09:39:12 +0200 Subject: [PATCH] Refs #19461: update Github workflows Signed-off-by: JLBuenoLopez-eProsima --- .github/workflows/config/coverage.repos | 2 +- .github/workflows/config/default_ci.repos | 2 +- .github/workflows/config/nightly.repos | 2 +- .github/workflows/sanitizer-tests.yaml | 99 ++++++++++++++++------- .github/workflows/statistics_coverage.yml | 48 ++++++++--- 5 files changed, 109 insertions(+), 44 deletions(-) diff --git a/.github/workflows/config/coverage.repos b/.github/workflows/config/coverage.repos index 9045a0989fd..f6580b0e8f8 100644 --- a/.github/workflows/config/coverage.repos +++ b/.github/workflows/config/coverage.repos @@ -2,7 +2,7 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: master + version: 1.1.x foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git diff --git a/.github/workflows/config/default_ci.repos b/.github/workflows/config/default_ci.repos index 5d3651ca82c..edebca8dd96 100644 --- a/.github/workflows/config/default_ci.repos +++ b/.github/workflows/config/default_ci.repos @@ -2,7 +2,7 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: master + version: 1.1.x foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git diff --git a/.github/workflows/config/nightly.repos b/.github/workflows/config/nightly.repos index 5d3651ca82c..edebca8dd96 100644 --- a/.github/workflows/config/nightly.repos +++ b/.github/workflows/config/nightly.repos @@ -2,7 +2,7 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: master + version: 1.1.x foonathan_memory_vendor: type: git url: https://github.com/eProsima/foonathan_memory_vendor.git diff --git a/.github/workflows/sanitizer-tests.yaml b/.github/workflows/sanitizer-tests.yaml index c8694cc5116..171070391d1 100644 --- a/.github/workflows/sanitizer-tests.yaml +++ b/.github/workflows/sanitizer-tests.yaml @@ -7,6 +7,10 @@ on: description: 'Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server)' required: true default: 'master' + fastdds_branch: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + required: true + default: 'master' pull_request: push: branches: @@ -24,29 +28,44 @@ jobs: runs-on: ubuntu-22.04 steps: - - name: Sync eProsima/Fast-DDS repository - uses: actions/checkout@v3 + - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: wget + + - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool + + - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 + with: + source_repository: eProsima/Fast-DDS + source_repository_branch: ${{ github.head_ref || github.event.inputs.fastdds_branch }} + file_name: fastrtps.repos + file_result: fastrtps.repos + + - name: Fetch Fast DDS & dependencies + uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0 with: - path: src/Fast-DDS + vcs_repos_file: fastrtps.repos + destination_workspace: src - name: Install apt packages - uses: ./src/Fast-DDS/.github/actions/install-apt-packages + uses: ./src/fastrtps/.github/actions/install-apt-packages - name: Install Python packages - uses: ./src/Fast-DDS/.github/actions/install-python-packages + uses: ./src/fastrtps/.github/actions/install-python-packages - - name: Fetch Fast DDS dependencies - uses: ./src/Fast-DDS/.github/actions/fetch-fastdds-repos + - name: Install GTest + uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 with: - target_directory: src - googletest: true + version: v1.12.1 - name: Build workspace run: | - cat src/Fast-DDS/.github/workflows/asan/asan_colcon.meta + cat src/fastrtps/.github/workflows/asan/asan_colcon.meta colcon build \ --event-handlers=console_direct+ \ - --metas src/Fast-DDS/.github/workflows/asan/asan_colcon.meta + --metas src/fastrtps/.github/workflows/asan/asan_colcon.meta - name: Run tests Fast DDS run: | @@ -70,8 +89,8 @@ jobs: - name: Report ASAN errors if: always() run: | - bash src/Fast-DDS/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/fastrtps/stdout_stderr.log _tmp_specific_error_file.log - python3 src/Fast-DDS/.github/workflows/utils/log_parser.py --log-file log/latest_test/fastrtps/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer asan + bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/fastrtps/stdout_stderr.log _tmp_specific_error_file.log + python3 src/fastrtps/.github/workflows/utils/log_parser.py --log-file log/latest_test/fastrtps/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer asan asan-discovery-server-test: @@ -82,33 +101,53 @@ jobs: runs-on: ubuntu-22.04 steps: - - name: Sync eProsima/Fast-DDS repository - uses: actions/checkout@v3 + - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: - path: src/Fast-DDS + packages: wget - - name: Install apt packages - uses: ./src/Fast-DDS/.github/actions/install-apt-packages + - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool - - name: Install Python packages - uses: ./src/Fast-DDS/.github/actions/install-python-packages + - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 + with: + source_repository: eProsima/Fast-DDS + source_repository_branch: ${{ github.head_ref || github.event.inputs.fastdds_branch }} + file_name: fastrtps.repos + file_result: fastrtps.repos - - name: Fetch Fast DDS dependencies - uses: ./src/Fast-DDS/.github/actions/fetch-fastdds-repos + - name: Fetch Fast DDS & dependencies + uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0 + with: + vcs_repos_file: fastrtps.repos + destination_workspace: src + + - name: Sync eProsima/Discovery-Server repository + uses: actions/checkout@v4 env: DEFAULT_DISCOVERY_SERVER_BRANCH: 'master' with: - target_directory: src - googletest: true - discovery_server: true - discovery_server_branch: ${{ github.event.inputs.discovery_server_branch || env.DEFAULT_DISCOVERY_SERVER_BRANCH }} + path: src/discovery_server + repository: eProsima/Discovery-Server + ref: ${{ github.event.inputs.discovery_server_branch || env.DEFAULT_DISCOVERY_SERVER_BRANCH }} + + - name: Install apt packages + uses: ./src/fastrtps/.github/actions/install-apt-packages + + - name: Install Python packages + uses: ./src/fastrtps/.github/actions/install-python-packages + + - name: Install GTest + uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 + with: + version: v1.12.1 - name: Build workspace run: | - cat src/Fast-DDS/.github/workflows/asan/asan_colcon.meta + cat src/fastrtps/.github/workflows/asan/asan_colcon.meta colcon build \ --event-handlers=console_direct+ \ - --metas src/Fast-DDS/.github/workflows/asan/asan_colcon.meta + --metas src/fastrtps/.github/workflows/asan/asan_colcon.meta - name: Run tests Fast DDS run: | @@ -132,5 +171,5 @@ jobs: - name: Report ASAN errors if: always() run: | - bash src/Fast-DDS/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/discovery-server/stdout_stderr.log _tmp_specific_error_file.log - python3 src/Fast-DDS/.github/workflows/utils/log_parser.py --log-file log/latest_test/discovery-server/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer=asan + bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/discovery-server/stdout_stderr.log _tmp_specific_error_file.log + python3 src/fastrtps/.github/workflows/utils/log_parser.py --log-file log/latest_test/discovery-server/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer=asan diff --git a/.github/workflows/statistics_coverage.yml b/.github/workflows/statistics_coverage.yml index a63802f2286..2a513f910fd 100644 --- a/.github/workflows/statistics_coverage.yml +++ b/.github/workflows/statistics_coverage.yml @@ -2,6 +2,11 @@ name: statistics_coverage on: workflow_dispatch: + inputs: + fastdds_branch: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + required: true + default: 'master' jobs: ubuntu-build-test: @@ -10,13 +15,34 @@ jobs: name: codecov steps: - - uses: actions/checkout@v2 + - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: - path: src/Fast-DDS + packages: wget - - uses: ./src/Fast-DDS/.github/actions/install-apt-packages - - uses: ./src/Fast-DDS/.github/actions/install-python-packages - - uses: ./src/Fast-DDS/.github/actions/fetch-fastdds-repos + - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool + + - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 + with: + source_repository: eProsima/Fast-DDS + source_repository_branch: ${{ github.event.inputs.fastdds_branch }} + file_name: fastrtps.repos + file_result: fastrtps.repos + + - name: Fetch Fast DDS & dependencies + uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0 + with: + vcs_repos_file: fastrtps.repos + destination_workspace: src + + - uses: ./src/fastrtps/.github/actions/install-apt-packages + - uses: ./src/fastrtps/.github/actions/install-python-packages + + - name: Install GTest + uses: eProsima/eProsima-CI/ubuntu/install_gtest@v0 + with: + version: v1.12.1 - name: Update colcon mixin run: | @@ -27,11 +53,11 @@ jobs: - name: Build workspace run: | - cat src/Fast-DDS/.github/workflows/statistics_module.meta + cat src/fastrtps/.github/workflows/statistics_module.meta colcon build \ --packages-up-to fastrtps --packages-skip fastrtps \ --event-handlers=console_direct+ \ - --metas src/Fast-DDS/.github/workflows/statistics_module.meta \ + --metas src/fastrtps/.github/workflows/statistics_module.meta \ --mixin coverage-gcc for target in RTPSStatisticsTests StatisticsDomainParticipantTests StatisticsQosTests DomainParticipantStatisticsListenerTests StatisticsDomainParticipantMockTests BlackboxTests_DDS_PIM do @@ -40,7 +66,7 @@ jobs: --cmake-target $target \ --cmake-target-skip-unavailable \ --event-handlers=console_direct+ \ - --metas src/Fast-DDS/.github/workflows/statistics_module.meta \ + --metas src/fastrtps/.github/workflows/statistics_module.meta \ --mixin coverage-gcc done @@ -53,10 +79,10 @@ jobs: - name: Generate coverage report run: | - cp src/Fast-DDS/codecov.yml . + cp src/fastrtps/codecov.yml . mkdir coverage-report gcovr \ - --root src/Fast-DDS/ \ + --root src/fastrtps/ \ --object-directory build/fastrtps \ --output coverage-report/coverage.xml \ --xml-pretty \ @@ -80,5 +106,5 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} file: coverage-report/coverage.xml - root_dir: src/Fast-DDS + root_dir: src/fastrtps fail_ci_if_error: true