Skip to content

Commit

Permalink
Refs #19461: update Github workflows
Browse files Browse the repository at this point in the history
Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
  • Loading branch information
JLBuenoLopez committed Sep 8, 2023
1 parent bc25800 commit 40523fd
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/config/coverage.repos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config/default_ci.repos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config/nightly.repos
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
99 changes: 69 additions & 30 deletions .github/workflows/sanitizer-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand All @@ -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:
Expand All @@ -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: |
Expand All @@ -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
48 changes: 37 additions & 11 deletions .github/workflows/statistics_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand All @@ -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

0 comments on commit 40523fd

Please sign in to comment.