Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update py_utils setup #133

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/project_dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
- name: Download dependencies artifact
uses: eProsima/eProsima-CI/multiplatform/download_dependency@v0
with:
artifact_name: built_fastdds_${{ inputs.custom_version_build }}_${{ inputs.os }}_${{ inputs.cmake_build_type }}${{ inputs.dependencies_artifact_postfix }}
artifact_name: build_fastdds_${{ inputs.custom_version_build }}_${{ inputs.os }}_${{ inputs.cmake_build_type }}${{ inputs.dependencies_artifact_postfix }}
workflow_source: build_fastdds.yml
workflow_source_repository: eProsima/eProsima-CI
target_workspace: ${{ inputs.target_workspace }}
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/nightly.yml

This file was deleted.

59 changes: 44 additions & 15 deletions .github/workflows/reusable-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Reusable workflow to run the following jobs:
#
# - multiplatform-tests
# - [ ubuntu-22.04 | ubuntu-20.04 | windows-2019 | windows-2022 ]
# - [ ubuntu-22.04 | ubuntu-24.04 | windows-2019 | windows-2022 ]
# - [ Debug | Release ]
# - execute tests in different versions of ubuntu with different build types
#
Expand Down Expand Up @@ -56,6 +56,13 @@ on:
type: string
default: '_nightly'

ref:
description: >
The branch or tag name to checkout.
required: true
type: string
default: 'main'

env:
code_packages_names: 'cmake_utils cpp_utils py_utils'
cpp_packages_names: 'cmake_utils cpp_utils'
Expand All @@ -76,8 +83,8 @@ jobs:
- Release
- Debug
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- windows-2019
- windows-2022

Expand All @@ -87,9 +94,10 @@ jobs:
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
uses: eProsima/dev-utils/.github/actions/project_dependencies@main
with:
os: ${{ matrix.os }}
cmake_build_type: ${{ matrix.cmake_build_type }}
Expand All @@ -105,6 +113,7 @@ 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 }}


#####################################################################
Expand All @@ -118,9 +127,10 @@ jobs:
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
uses: eProsima/dev-utils/.github/actions/project_dependencies@main
with:
os: ubuntu-22.04
cmake_build_type: Release
Expand All @@ -129,29 +139,31 @@ jobs:
secret_token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/asan_build_test@v0
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: ${{ env.cpp_packages_names }}
cmake_args: -DBUILD_TESTS=ON -DASAN_BUILD=ON
ctest_args: --label-exclude "xfail|xasan"
workspace_dependencies: './install'
cmake_build_type: Debug
test_report_artifact: test_report_asan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}


#####################################################################
# TSAN

tsan:
# NOTE: there is a known issue in TSAN 20.04 with std::condition_variable::wait_for
# https://github.com/google/sanitizers/issues/1259
# Until this is fixed, we use 20.04 for TSAN work
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
uses: eProsima/dev-utils/.github/actions/project_dependencies@main
with:
os: ubuntu-22.04
cmake_build_type: Release
Expand All @@ -160,10 +172,19 @@ jobs:
secret_token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/tsan_build_test@v0
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.cpp_packages_names }}
cmake_args: -DBUILD_TESTS=ON -DTSAN_BUILD=ON
ctest_args: --label-exclude "xfail|xtsan"
workspace_dependencies: './install'
cmake_build_type: Debug
test_report_artifact: test_report_tsan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}


#####################################################################
Expand All @@ -177,9 +198,10 @@ jobs:
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
uses: eProsima/dev-utils/.github/actions/project_dependencies@main
with:
os: ubuntu-22.04
cmake_build_type: Release
Expand Down Expand Up @@ -207,9 +229,10 @@ jobs:
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
uses: eProsima/dev-utils/.github/actions/project_dependencies@main
with:
os: ubuntu-22.04
cmake_build_type: Release
Expand All @@ -222,6 +245,7 @@ jobs:
with:
packages_names: ${{ env.cpp_packages_names }}
workspace_dependencies: './install'
test_report_artifact: test_report_coverage${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}
codecov_token: ${{ secrets.CODECOV_TOKEN }}
codecov_fix_file_path: ./src/codecov.yml

Expand All @@ -237,9 +261,10 @@ jobs:
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
uses: eProsima/dev-utils/.github/actions/project_dependencies@main
with:
os: ubuntu-22.04
cmake_build_type: Release
Expand All @@ -248,11 +273,15 @@ jobs:
secret_token: ${{ secrets.GITHUB_TOKEN }}

- name: Compile and run tests
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test_flaky@v0
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
with:
packages_names: ${{ env.code_packages_names }}
cmake_args: -DBUILD_TESTS=ON
cmake_build_type: Release
workspace_dependencies: './install'

ctest_args: --label-regex "xfail"
colcon_meta_file: ./src/.github/workflows/configurations/${{ runner.os }}/colcon.meta
test_report_artifact: test_report_flaky${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}

#####################################################################
# UNCRUSTIFY
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ jobs:
with:
custom_version_build: ${{ github.event.inputs.custom_version_build || 'v2' }}
dependencies_artifact_postfix: ${{ github.event.inputs.dependencies_artifact_postfix || '_nightly' }}
ref: ${{ github.ref }}
secrets: inherit
7 changes: 5 additions & 2 deletions py_utils/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
maintainer_email='raul@eprosima.com',
description=description,
license='Apache License, Version 2.0',
tests_require=['pytest'],
test_suite='test',
extras_require={
'test': [
'pytest', # Add your testing dependencies here
],
},
entry_points={},
)