From 7610ab1255a1e25ca9473d7a61b04158602bcc91 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 25 Jun 2024 16:25:14 +0200 Subject: [PATCH 01/11] Refs #21228: Refactor Ubuntu CI Signed-off-by: JesusPoderoso --- .github/workflows/config/build.meta | 5 + .github/workflows/config/test.meta | 15 ++ .github/workflows/config/test.repos | 5 + .github/workflows/reusable-ubuntu-ci.yml | 216 +++++++++++++++++++++++ .github/workflows/test.meta | 12 -- .github/workflows/ubuntu-ci.yml | 63 +++++++ 6 files changed, 304 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/config/build.meta create mode 100644 .github/workflows/config/test.meta create mode 100644 .github/workflows/config/test.repos create mode 100644 .github/workflows/reusable-ubuntu-ci.yml delete mode 100644 .github/workflows/test.meta create mode 100644 .github/workflows/ubuntu-ci.yml diff --git a/.github/workflows/config/build.meta b/.github/workflows/config/build.meta new file mode 100644 index 00000000..20de57d7 --- /dev/null +++ b/.github/workflows/config/build.meta @@ -0,0 +1,5 @@ +names: + fastdds: + cmake-args: + - "-DSECURITY=ON" + - "-DLOG_CONSUMER_DEFAULT=STDOUT" diff --git a/.github/workflows/config/test.meta b/.github/workflows/config/test.meta new file mode 100644 index 00000000..fc086118 --- /dev/null +++ b/.github/workflows/config/test.meta @@ -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" diff --git a/.github/workflows/config/test.repos b/.github/workflows/config/test.repos new file mode 100644 index 00000000..5052ee82 --- /dev/null +++ b/.github/workflows/config/test.repos @@ -0,0 +1,5 @@ +repositories: + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml new file mode 100644 index 00000000..1fbd1e19 --- /dev/null +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -0,0 +1,216 @@ +name: Fast DDS Python Ubuntu CI reusable workflow + +on: + workflow_call: + inputs: + os-version: + description: 'The OS image for the workflow' + required: false + default: 'ubuntu-22.04' + type: string + label: + description: 'ID associated to the workflow' + required: true + type: string + colcon-args: + description: 'Extra arguments for colcon cli' + required: false + type: string + cmake-args: + description: 'Extra arguments for cmake cli' + required: false + type: string + ctest-args: + description: 'Extra arguments for ctest cli' + required: false + type: string + fastdds-python-branch: + description: 'Branch or tag of Fast DDS Python repository' + required: true + type: string + fastdds-branch: + description: 'Branch or tag of Fast DDS repository' + required: true + type: string + run-build: + description: 'Build Fast DDS Python (CI skipped otherwise)' + required: false + type: boolean + default: true + run-tests: + description: 'Run test suite of Fast DDS python' + required: false + type: boolean + default: true + +defaults: + run: + shell: bash + +jobs: + fastdds_python_build: + runs-on: ${{ inputs.os-version }} + if: ${{ inputs.run-build == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Add ci-pending label if PR + if: ${{ github.event_name == 'pull_request' }} + uses: eProsima/eProsima-CI/external/add_labels@v0 + with: + labels: ci-pending + number: ${{ github.event.number }} + repo: eProsima/Fast-DDS-Python + + - name: Sync eProsima/Fast-DDS-Python repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src/fastdds_python + ref: ${{ inputs.fastdds-python-branch }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt dependencies + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev swig + update: false + upgrade: false + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0 + with: + packages: vcstool xmlschema + upgrade: false + + - name: Get Fast DDS branch + id: get_fastdds_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Fast-DDS + fallback_branch: ${{ inputs.fastdds-branch }} + + - name: Download Fast DDS repo + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Fast-DDS + path: src/fastdds + ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }} + + - name: Fetch Fast DDS Python dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos + destination_workspace: src + skip_existing: 'true' + + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: ${{ inputs.cmake-args }} + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Upload build artifacts + uses: eProsima/eProsima-CI/external/upload-artifact@v0 + with: + name: fastdds_python_build_${{ inputs.label }} + path: ${{ github.workspace }} + + fastdds_python_test: + needs: fastdds_python_build + runs-on: ${{ inputs.os-version }} + if: ${{ inputs.run-tests == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download python build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_python_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev swig + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - name: Fetch Fast DDS Python CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.repos + destination_workspace: src + skip_existing: 'true' + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: ${{ inputs.cmake-args }} + cmake_args_default: '' + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Colcon test + id: python_test + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta + colcon_test_args: ${{ inputs.colcon-args }} + colcon_test_args_default: --event-handlers=console_direct+ + ctest_args: ${{ inputs.ctest-args }} + packages_names: fastdds_python + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} + + - name: Fast DDS Python test summary + uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 + if: ${{ !cancelled() }} + with: + junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}" + print_summary: 'True' + show_failed: 'True' + show_disabled: 'False' + show_skipped: 'False' diff --git a/.github/workflows/test.meta b/.github/workflows/test.meta deleted file mode 100644 index 3626c9c1..00000000 --- a/.github/workflows/test.meta +++ /dev/null @@ -1,12 +0,0 @@ -{ - "names": - { - "fastrtps" : - { - "cmake-args": [ - "-DTHIRDPARTY=ON", - "-DSECURITY=ON", - ] - } - } -} diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml new file mode 100644 index 00000000..b0044a90 --- /dev/null +++ b/.github/workflows/ubuntu-ci.yml @@ -0,0 +1,63 @@ +name: Fast DDS Python Ubuntu CI + +on: + workflow_dispatch: + inputs: + os-version: + description: 'OS version to run the workflow' + required: false + default: 'ubuntu-20.04' + type: string + colcon-args: + description: 'Extra arguments for colcon cli' + required: false + type: string + cmake-args: + description: 'Extra arguments for cmake cli' + required: false + type: string + ctest-args: + description: 'Extra arguments for ctest cli' + required: false + type: string + fastdds-python-branch: + description: 'Branch or tag of Fast DDS Python repository' + required: true + type: string + fastdds-branch: + description: 'Branch or tag of Fast DDS repository' + type: string + required: true + run-tests: + description: 'Run test suite of Fast DDS python' + required: false + type: boolean + default: true + + pull_request: + types: + - review_requested + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + ubuntu-ci: + uses: ./.github/workflows/reusable-ubuntu-ci.yml + with: + # It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket: + # https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job. + os-version: ${{ inputs.os-version || 'ubuntu-20.04' }} + label: 'ubuntu-ci' + colcon-args: ${{ inputs.colcon-args }} + cmake-args: ${{ inputs.cmake-args }} + ctest-args: ${{ inputs.ctest-args }} + fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.0.x' }} + fastdds-branch: ${{ inputs.fastdds-branch || '2.6.x' }} + run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }} + run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }} From c0028f69f87a263c9e8041bab07e83d2eb89c83b Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 25 Jun 2024 16:25:27 +0200 Subject: [PATCH 02/11] Refs #21228: Refactor Windows CI Signed-off-by: JesusPoderoso --- .github/workflows/reusable-windows-ci.yml | 279 ++++++++++++++++++++++ .github/workflows/windows-ci.yml | 81 +++++++ 2 files changed, 360 insertions(+) create mode 100644 .github/workflows/reusable-windows-ci.yml create mode 100644 .github/workflows/windows-ci.yml diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml new file mode 100644 index 00000000..ca1089ee --- /dev/null +++ b/.github/workflows/reusable-windows-ci.yml @@ -0,0 +1,279 @@ +name: Fast DDS Python Windows CI reusable workflow + +on: + workflow_call: + inputs: + os-version: + description: 'The OS image for the workflow' + required: false + default: 'windows-2019' + type: string + vs-toolset: + description: 'The VS toolset to use for the build' + required: false + default: 'v142' + type: string + label: + description: 'ID associated to the workflow' + required: true + type: string + colcon-args: + description: 'Extra arguments for colcon cli' + required: false + type: string + cmake-args: + description: 'Extra arguments for cmake cli' + required: false + type: string + ctest-args: + description: 'Extra arguments for ctest cli' + required: false + type: string + fastdds-python-branch: + description: 'Branch or tag of Fast DDS Python repository' + required: true + type: string + fastdds-branch: + description: 'Branch or tag of Fast DDS repository' + required: true + type: string + run-build: + description: 'Build Fast DDS Python (CI skipped otherwise)' + required: false + type: boolean + default: true + run-tests: + description: 'Run test suite of Fast DDS python' + required: false + type: boolean + default: true +env: + colcon-build-default-cmake-args: '-DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DTHIRDPARTY_fastcdr=OFF -DTHIRDPARTY_UPDATE=ON -DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS="/MP /WX"' +defaults: + run: + shell: pwsh + +jobs: + fastdds_python_build: + runs-on: ${{ inputs.os-version }} + if: ${{ inputs.run-build == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + + steps: + - name: Add ci-pending label if PR + if: ${{ github.event_name == 'pull_request' }} + uses: eProsima/eProsima-CI/external/add_labels@v0 + with: + labels: ci-pending + number: ${{ github.event.number }} + repo: eProsima/Fast-DDS-Python + + - name: Sync eProsima/Fast-DDS-Python repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src/fastdds_python + ref: ${{ inputs.fastdds-python-branch }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install OpenSSL + uses: eProsima/eprosima-CI/windows/install_openssl@v0 + with: + version: '3.1.1' + + - name: Update OpenSSL environment variables + run: | + # Update the environment + if (Test-Path -Path $Env:ProgramW6432\OpenSSL) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win64) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win64" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + else + { + Write-Error -Message "Cannot find OpenSSL installation." + exit 1 + } + - name: Install colcon + uses: eProsima/eProsima-CI/windows/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/windows/install_python_packages@v0 + with: + packages: vcstool xmlschema pywin32 + + - name: Install swig + shell: pwsh + run: choco install swig --allow-downgrade --version=4.0.2.04082020 + + # Although this is a ubuntu action becuase it uses bash, it is compatible with windows + - name: Get Fast DDS branch + id: get_fastdds_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Fast-DDS + fallback_branch: ${{ inputs.fastdds-branch }} + + - name: Download Fast DDS repo + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Fast-DDS + path: src/fastdds + ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }} + + - name: Fetch Fast DDS Python dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos + destination_workspace: src + skip_existing: 'true' + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta + colcon_build_args: ${{ inputs.colcon-args }} + colcon_build_args_default: --event-handlers console_direct+ + cmake_args: ${{ inputs.cmake-args }} + cmake_args_default: '-T ${{ inputs.vs-toolset }} ${{ env.colcon-build-default-cmake-args }}' + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Upload build artifacts + uses: eProsima/eProsima-CI/external/upload-artifact@v0 + with: + name: fastdds_python_build_${{ inputs.label }} + path: ${{ github.workspace }} + + + fastdds_python_test: + needs: fastdds_python_build + runs-on: ${{ inputs.os-version }} + if: ${{ inputs.run-tests == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download python build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_python_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install OpenSSL + uses: eProsima/eprosima-CI/windows/install_openssl@v0 + with: + version: '3.1.1' + + - name: Update OpenSSL environment variables + run: | + # Update the environment + if (Test-Path -Path $Env:ProgramW6432\OpenSSL) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win64) + { + "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win64" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM + } + else + { + Write-Error -Message "Cannot find OpenSSL installation." + exit 1 + } + - name: Install colcon + uses: eProsima/eProsima-CI/windows/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/windows/install_python_packages@v0 + with: + packages: vcstool xmlschema pywin32 pytest + + - name: Install swig + shell: pwsh + run: choco install swig --allow-downgrade --version=4.0.2.04082020 + + + - name: Prepare build meta file + run: | + $build_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build.meta' + $test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\test.meta' + $build_test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build_test.meta' + # Read the content of the build meta file + $build_meta_content = Get-Content -Path $build_meta_file + # Read the content of the test meta file, starting from line 4 (skipping "name" line [1], cmake project name line [2] and "cmake-args" line [3]) + $test_meta_content = Get-Content -Path $test_meta_file | Select-Object -Skip 3 + # Combine the content of the build meta file and the test meta file + $combined_content = $build_meta_content + $test_meta_content + # Write the combined content to the build test meta file + $combined_content | Out-File -FilePath $build_test_meta_file -Encoding UTF8 + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build_test.meta + colcon_build_args: ${{ inputs.colcon-args }} + colcon_build_args_default: --event-handlers console_direct+ + cmake_args: ${{ inputs.cmake-args }} + cmake_args_default: '-T ${{ inputs.vs-toolset }} ${{ env.colcon-build-default-cmake-args }}' + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Colcon test + id: python_test + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta + colcon_test_args: ${{ inputs.colcon-args }} + colcon_test_args_default: --event-handlers=console_direct+ + ctest_args: ${{ inputs.ctest-args }} + packages_names: fastdds_python + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} + + - name: Test summary + uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 + if: ${{ !cancelled() }} + with: + junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}" + print_summary: 'True' + show_failed: 'True' + show_disabled: 'False' + show_skipped: 'False' diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml new file mode 100644 index 00000000..d123e034 --- /dev/null +++ b/.github/workflows/windows-ci.yml @@ -0,0 +1,81 @@ +name: Fast DDS Python Windows CI + +on: + workflow_dispatch: + inputs: + os-version: + description: 'OS version to run the workflow' + required: false + default: 'windows-2019' + type: string + vs-toolset: + description: 'The VS toolset to use for the build' + required: false + default: 'v142' + type: string + colcon-args: + description: 'Extra arguments for colcon cli' + required: false + type: string + cmake-args: + description: 'Extra arguments for cmake cli' + required: false + type: string + ctest-args: + description: 'Extra arguments for ctest cli' + required: false + type: string + fastdds-python-branch: + description: 'Branch or tag of Fast DDS Python repository' + required: true + type: string + fastdds-branch: + description: 'Branch or tag of Fast DDS repository' + type: string + required: true + run-tests: + description: 'Run test suite of Fast DDS python' + required: false + type: boolean + default: true + + pull_request: + types: + - review_requested + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + windows-ci: + strategy: + fail-fast: false + matrix: + os-version: + - image: 'windows-2019' + vs-toolset: 'v142' + - image: 'windows-2017' + vs-toolset: 'v141' + fastdds-python-branch: + - '1.0.x' + fastdds-branch: + - '2.6.x' + uses: ./.github/workflows/reusable-windows-ci.yml + with: + # It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket: + # https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job. + os-version: ${{ inputs.os-version || matrix.os-version.image }} + vs-toolset: ${{ inputs.vs-toolset || matrix.os-version.vs-toolset }} + label: '${{ matrix.os-version.image }}-${{ matrix.os-version.vs-toolset }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}' + colcon-args: ${{ inputs.colcon-args }} + cmake-args: ${{ inputs.cmake-args }} + ctest-args: ${{ inputs.ctest-args }} + fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }} + fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }} + run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }} + run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }} From 2f4a33aace3c2f582adcb7425a440dae996e1294 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 25 Jun 2024 16:25:35 +0200 Subject: [PATCH 03/11] Refs #21228: Remove previous workflow Signed-off-by: JesusPoderoso --- .github/workflows/build_and_test.yml | 134 --------------------------- 1 file changed, 134 deletions(-) delete mode 100644 .github/workflows/build_and_test.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml deleted file mode 100644 index 8449a347..00000000 --- a/.github/workflows/build_and_test.yml +++ /dev/null @@ -1,134 +0,0 @@ -name: test - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - schedule: - - cron: '0 0 * * *' - -jobs: - windows-build-test: - runs-on: windows-2019 - - env: - CXXFLAGS: /MP - OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64" - - steps: - - - name: install OpenSSL - shell: pwsh - run: | - choco install openssl -yr --no-progress - "System32;SysWoW64" -split ";" | Join-Path -Path $env:windir -ChildPath {$_} ` - | ls -Include libssl-*.dll | rm - - - name: Install python build dependencies - shell: pwsh - run: > - pip install -U colcon-common-extensions colcon-mixin vcstool; - - - name: Install python tests dependencies - shell: pwsh - run: | - cd (ni -Type Directory -Path "$Env:TMP\$(New-Guid)") - $cr = "`n" - 'cmake_minimum_required(VERSION 3.5)' + $cr + - 'project(dummy VERSION 1.0.0 LANGUAGES CXX)' + $cr + - 'find_package (Python3 COMPONENTS Interpreter Development REQUIRED)' + $cr + - 'message(STATUS "cmake detected python=>>>>>${Python3_EXECUTABLE}<<<<<<")' | - Out-File CMakeLists.txt - (cmake .) *>&1 | % { - if($_ -Match "cmake detected python=>>>>>(?.*)<<<<<<") - { - $python_exec = $Matches.exec - return - } - } - & $python_exec -m pip install -U pytest pywin32 - - - uses: actions/checkout@v2 - with: - path: src/fastdds_python - - - name: Fetch repositories - shell: pwsh - run: | - vcs import src --skip-existing --input src/fastdds_python/fastdds_python.repos - - - name: Build workspace - shell: pwsh - run: | - $installpath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" - $modulepath = "$installpath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" - Import-Module $modulepath - Enter-VsDevShell -SetDefaultWindowTitle -InstallPath $installpath ` - -DevCmdArguments '/arch=x64 /host_arch=x64'; - $cargs = @("--event-handlers=console_direct+", ` - "--metas", "./src/fastdds_python/.github/workflows/test.meta") - colcon build --executor parallel $cargs - - - name: Run tests - shell: pwsh - run: | - colcon test --packages-select fastdds_python --event-handlers=console_direct+ ` - --return-code-on-test-failure --ctest-args --timeout 60 - - - name: Upload Logs - uses: actions/upload-artifact@v1 - with: - name: colcon-logs-windows - path: log/ - if: always() - - ubuntu-build-test: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - with: - path: src/fastdds_python - - - name: Install apt dependencies - run: | - sudo apt update - sudo apt install -y \ - python3 \ - python3-pip \ - swig \ - libpython3-dev - - - name: Install python dependencies - run: | - sudo pip3 install -U \ - vcstool \ - colcon-common-extensions - - - name: Fetch repositories - run: | - vcs import --skip-existing src < src/fastdds_python/fastdds_python.repos - - - name: Build workspace - run: > - colcon build --event-handlers=console_direct+ --metas ./src/fastdds_python/.github/workflows/test.meta - - - name: Run tests - run: | - source install/setup.bash && \ - colcon test \ - --packages-select fastdds_python \ - --event-handlers=console_direct+ \ - --return-code-on-test-failure \ - --ctest-args \ - --output-on-failure \ - --timeout 60 - - - name: Upload Logs - uses: actions/upload-artifact@v1 - with: - name: colcon-logs-ubuntu - path: log/ - if: always() From 073ccebdaddb80fefb4d4c8863b9bc930209ef35 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 25 Jun 2024 16:26:13 +0200 Subject: [PATCH 04/11] Refs #21228: Add RELEASE_SUPPORT.md with Fast DDS references Signed-off-by: JesusPoderoso --- RELEASE_SUPPORT.md | 4 ++++ fastdds_python.repos | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 RELEASE_SUPPORT.md diff --git a/RELEASE_SUPPORT.md b/RELEASE_SUPPORT.md new file mode 100644 index 00000000..1492b129 --- /dev/null +++ b/RELEASE_SUPPORT.md @@ -0,0 +1,4 @@ +# Release support + + +Please, refer to the [main branch](https://github.com/eProsima/Fast-DDS-Python/blob/master/RELEASE_SUPPORT.md) for the latest version of this document. diff --git a/fastdds_python.repos b/fastdds_python.repos index 2f93cdd8..0a5f898c 100644 --- a/fastdds_python.repos +++ b/fastdds_python.repos @@ -6,7 +6,7 @@ repositories: fastcdr: type: git url: https://github.com/eProsima/Fast-CDR.git - version: v1.0.24 + version: 1.0.x fastdds: type: git url: https://github.com/eProsima/Fast-DDS.git @@ -18,9 +18,4 @@ repositories: fastddsgen: type: git url: https://github.com/eProsima/Fast-DDS-Gen.git - version: v2.1.2 - fastddsgen/thirdparty/idl-parser: - type: git - url: https://github.com/eProsima/IDL-Parser.git - version: v1.2.0 - + version: 2.1.x From 6663ea931b3d8bbd151d09145b8694d749e8a8ee Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 25 Jun 2024 16:42:13 +0200 Subject: [PATCH 05/11] Refs #21228: Avoid running tests in 1.0.x Signed-off-by: JesusPoderoso --- .github/workflows/reusable-ubuntu-ci.yml | 2 +- .github/workflows/reusable-windows-ci.yml | 2 +- .github/workflows/ubuntu-ci.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 1fbd1e19..e325a4ca 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -41,7 +41,7 @@ on: description: 'Run test suite of Fast DDS python' required: false type: boolean - default: true + default: false defaults: run: diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index ca1089ee..e7bdba27 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -46,7 +46,7 @@ on: description: 'Run test suite of Fast DDS python' required: false type: boolean - default: true + default: false env: colcon-build-default-cmake-args: '-DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DTHIRDPARTY_fastcdr=OFF -DTHIRDPARTY_UPDATE=ON -DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS="/MP /WX"' defaults: diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index b0044a90..35a0fa3d 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -60,4 +60,4 @@ jobs: fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.0.x' }} fastdds-branch: ${{ inputs.fastdds-branch || '2.6.x' }} run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }} - run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }} + run-tests: ${{ ((inputs.run-tests == true) && true) || false }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index d123e034..93cd7583 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -78,4 +78,4 @@ jobs: fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }} fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }} run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }} - run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }} + run-tests: ${{ ((inputs.run-tests == true) && true) || false }} From ae5e92adb3701b3ef6ba1d44af5a354f24c8db43 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Wed, 26 Jun 2024 11:12:27 +0200 Subject: [PATCH 06/11] Refs #21228: Fix windows CI removing win2017 Signed-off-by: JesusPoderoso --- .github/workflows/windows-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 93cd7583..ccab4267 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -57,10 +57,10 @@ jobs: fail-fast: false matrix: os-version: - - image: 'windows-2019' - vs-toolset: 'v142' - - image: 'windows-2017' - vs-toolset: 'v141' + - 'windows-2019' + vs-toolset: + - 'v141' + - 'v142' fastdds-python-branch: - '1.0.x' fastdds-branch: @@ -69,9 +69,9 @@ jobs: with: # It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket: # https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job. - os-version: ${{ inputs.os-version || matrix.os-version.image }} - vs-toolset: ${{ inputs.vs-toolset || matrix.os-version.vs-toolset }} - label: '${{ matrix.os-version.image }}-${{ matrix.os-version.vs-toolset }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}' + os-version: ${{ inputs.os-version || matrix.os-version }} + vs-toolset: ${{ inputs.vs-toolset || matrix.vs-toolset }} + label: '${{ matrix.os-version }}-${{ matrix.vs-toolset }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}' colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} From ee73c4e620fcfb350d10c4b37c50f8f148a89831 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Wed, 26 Jun 2024 12:49:40 +0200 Subject: [PATCH 07/11] Refs #21228: Deactivate Windows build temporary Signed-off-by: JesusPoderoso --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index ccab4267..5cab8314 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -77,5 +77,5 @@ jobs: ctest-args: ${{ inputs.ctest-args }} fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }} fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }} - run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }} + run-build: false run-tests: ${{ ((inputs.run-tests == true) && true) || false }} From bef66d959cd39f867bf6d710db8da1fefda69570 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Fri, 28 Jun 2024 11:21:27 +0200 Subject: [PATCH 08/11] Refs #21228: Apply rev suggestions in main PR Signed-off-by: JesusPoderoso --- .github/workflows/config/test.repos | 5 ---- .../config/{test.meta => ubuntu_test.meta} | 5 ---- .github/workflows/config/windows_test.meta | 9 ++++++ .github/workflows/reusable-ubuntu-ci.yml | 28 +++++++++++++------ .github/workflows/reusable-windows-ci.yml | 26 +++++++---------- .github/workflows/ubuntu-ci.yml | 10 +++++-- .github/workflows/windows-ci.yml | 15 ++++------ 7 files changed, 51 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/config/test.repos rename .github/workflows/config/{test.meta => ubuntu_test.meta} (62%) create mode 100644 .github/workflows/config/windows_test.meta diff --git a/.github/workflows/config/test.repos b/.github/workflows/config/test.repos deleted file mode 100644 index 5052ee82..00000000 --- a/.github/workflows/config/test.repos +++ /dev/null @@ -1,5 +0,0 @@ -repositories: - googletest-distribution: - type: git - url: https://github.com/google/googletest.git - version: release-1.11.0 diff --git a/.github/workflows/config/test.meta b/.github/workflows/config/ubuntu_test.meta similarity index 62% rename from .github/workflows/config/test.meta rename to .github/workflows/config/ubuntu_test.meta index fc086118..a96a78ea 100644 --- a/.github/workflows/config/test.meta +++ b/.github/workflows/config/ubuntu_test.meta @@ -8,8 +8,3 @@ names: "--timeout", "300", "--label-exclude", "xfail" ] - googletest-distribution: - cmake-args: - - "-Dgtest_force_shared_crt=ON" - - "-DBUILD_SHARED_LIBS=ON" - - "-DBUILD_GMOCK=ON" diff --git a/.github/workflows/config/windows_test.meta b/.github/workflows/config/windows_test.meta new file mode 100644 index 00000000..bb759e45 --- /dev/null +++ b/.github/workflows/config/windows_test.meta @@ -0,0 +1,9 @@ +names: + fastdds_python: + cmake-args: + - "-DBUILD_TESTING=ON" + ctest-args: [ + "--repeat", "until-pass:3", + "--timeout", "300", + "--label-exclude", "xfail" + ] diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index e325a4ca..4d7a665a 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -42,6 +42,11 @@ on: required: false type: boolean default: false + use-ccache: + description: 'Use CCache to speed up the build' + required: false + type: boolean + default: false defaults: run: @@ -84,7 +89,7 @@ jobs: - name: Install apt dependencies uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: - packages: libasio-dev libtinyxml2-dev libssl-dev swig + packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen update: false upgrade: false @@ -97,6 +102,12 @@ jobs: packages: vcstool xmlschema upgrade: false + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + - name: Get Fast DDS branch id: get_fastdds_branch uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 @@ -172,20 +183,19 @@ jobs: - name: Install Python dependencies uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 with: - packages: vcstool xmlschema + packages: xmlschema pytest - - name: Fetch Fast DDS Python CI dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} with: - vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.repos - destination_workspace: src - skip_existing: 'true' + api_token: ${{ secrets.GITHUB_TOKEN }} - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta colcon_build_args: ${{ inputs.colcon-args }} cmake_args: ${{ inputs.cmake-args }} cmake_args_default: '' @@ -196,7 +206,7 @@ jobs: id: python_test uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta colcon_test_args: ${{ inputs.colcon-args }} colcon_test_args_default: --event-handlers=console_direct+ ctest_args: ${{ inputs.ctest-args }} diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index e7bdba27..17dab5dc 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -125,10 +125,9 @@ jobs: shell: pwsh run: choco install swig --allow-downgrade --version=4.0.2.04082020 - # Although this is a ubuntu action becuase it uses bash, it is compatible with windows - name: Get Fast DDS branch id: get_fastdds_branch - uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + uses: eProsima/eProsima-CI/multiplatform/get_related_branch_from_repo@v0 with: remote_repository: eProsima/Fast-DDS fallback_branch: ${{ inputs.fastdds-branch }} @@ -229,20 +228,15 @@ jobs: shell: pwsh run: choco install swig --allow-downgrade --version=4.0.2.04082020 + - name: Install doxygen + uses: eProsima/eProsima-CI/external/install_doxygen@v0 - name: Prepare build meta file - run: | - $build_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build.meta' - $test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\test.meta' - $build_test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build_test.meta' - # Read the content of the build meta file - $build_meta_content = Get-Content -Path $build_meta_file - # Read the content of the test meta file, starting from line 4 (skipping "name" line [1], cmake project name line [2] and "cmake-args" line [3]) - $test_meta_content = Get-Content -Path $test_meta_file | Select-Object -Skip 3 - # Combine the content of the build meta file and the test meta file - $combined_content = $build_meta_content + $test_meta_content - # Write the combined content to the build test meta file - $combined_content | Out-File -FilePath $build_test_meta_file -Encoding UTF8 + uses: eProsima/eProsima-CI/windows/merge_yaml_metas@v0 + with: + metas: "@('${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta', '${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta')" + path: '${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build_test.meta' + - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 @@ -259,9 +253,9 @@ jobs: id: python_test uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta + colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta colcon_test_args: ${{ inputs.colcon-args }} - colcon_test_args_default: --event-handlers=console_direct+ + colcon_test_args_default: --event-handlers=console_direct+ ctest_args: ${{ inputs.ctest-args }} packages_names: fastdds_python workspace: ${{ github.workspace }} diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 35a0fa3d..0d21e1e5 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -33,6 +33,11 @@ on: required: false type: boolean default: true + use-ccache: + description: 'Use CCache to speed up the build' + required: false + type: boolean + default: false pull_request: types: @@ -48,16 +53,17 @@ concurrency: jobs: ubuntu-ci: + if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }} uses: ./.github/workflows/reusable-ubuntu-ci.yml with: # It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket: # https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job. os-version: ${{ inputs.os-version || 'ubuntu-20.04' }} - label: 'ubuntu-ci' + label: 'ubuntu-ci-1.0.x-2.6.x' colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.0.x' }} fastdds-branch: ${{ inputs.fastdds-branch || '2.6.x' }} - run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }} + run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci')) && true || false }} run-tests: ${{ ((inputs.run-tests == true) && true) || false }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 5cab8314..e73cbf4b 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -56,26 +56,21 @@ jobs: strategy: fail-fast: false matrix: - os-version: - - 'windows-2019' vs-toolset: - 'v141' - 'v142' - fastdds-python-branch: - - '1.0.x' - fastdds-branch: - - '2.6.x' + if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }} uses: ./.github/workflows/reusable-windows-ci.yml with: # It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket: # https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job. - os-version: ${{ inputs.os-version || matrix.os-version }} + os-version: ${{ inputs.os-version || 'windows-2019' }} vs-toolset: ${{ inputs.vs-toolset || matrix.vs-toolset }} - label: '${{ matrix.os-version }}-${{ matrix.vs-toolset }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}' + label: 'windows-${{ matrix.vs-toolset }}-ci-1.0.x-2.6.x' colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} - fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }} - fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }} + fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.0.x' }} + fastdds-branch: ${{ inputs.fastdds-branch ||'2.6.x' }} run-build: false run-tests: ${{ ((inputs.run-tests == true) && true) || false }} From d5367fbd6b9bf259c817917d94aad2874d729431 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Fri, 28 Jun 2024 17:39:39 +0200 Subject: [PATCH 09/11] Refs #21228: Avoid building dependencies again Signed-off-by: JesusPoderoso --- .github/workflows/reusable-ubuntu-ci.yml | 2 ++ .github/workflows/reusable-windows-ci.yml | 3 ++- .github/workflows/ubuntu-ci.yml | 6 +++--- .github/workflows/windows-ci.yml | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 4d7a665a..c42fa272 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -197,10 +197,12 @@ jobs: with: colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta colcon_build_args: ${{ inputs.colcon-args }} + colcon_build_args_default: '--packages-select fastdds_python' cmake_args: ${{ inputs.cmake-args }} cmake_args_default: '' cmake_build_type: ${{ matrix.cmake-build-type }} workspace: ${{ github.workspace }} + workspace_dependencies: ${{ github.workspace }}/install - name: Colcon test id: python_test diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 17dab5dc..a9515471 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -243,11 +243,12 @@ jobs: with: colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build_test.meta colcon_build_args: ${{ inputs.colcon-args }} - colcon_build_args_default: --event-handlers console_direct+ + colcon_build_args_default: '--event-handlers console_direct+ --packages-select fastdds_python' cmake_args: ${{ inputs.cmake-args }} cmake_args_default: '-T ${{ inputs.vs-toolset }} ${{ env.colcon-build-default-cmake-args }}' cmake_build_type: ${{ matrix.cmake-build-type }} workspace: ${{ github.workspace }} + workspace_dependencies: ${{ github.workspace }}/install - name: Colcon test id: python_test diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 0d21e1e5..0b37ef7b 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -53,7 +53,7 @@ concurrency: jobs: ubuntu-ci: - if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }} + if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') || false }} uses: ./.github/workflows/reusable-ubuntu-ci.yml with: # It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket: @@ -65,5 +65,5 @@ jobs: ctest-args: ${{ inputs.ctest-args }} fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.0.x' }} fastdds-branch: ${{ inputs.fastdds-branch || '2.6.x' }} - run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci')) && true || false }} - run-tests: ${{ ((inputs.run-tests == true) && true) || false }} + run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') || false }} + run-tests: ${{ (inputs.run-tests == true) || false }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index e73cbf4b..ece1ded4 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -59,7 +59,7 @@ jobs: vs-toolset: - 'v141' - 'v142' - if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }} + if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') || false }} uses: ./.github/workflows/reusable-windows-ci.yml with: # It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket: From 75af02561a552714ef6dfe22ed2e240e92ad69a4 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Mon, 1 Jul 2024 12:33:44 +0200 Subject: [PATCH 10/11] Refs #21228: Apply rev suggestions Signed-off-by: JesusPoderoso --- .github/workflows/ubuntu-ci.yml | 6 +++--- .github/workflows/windows-ci.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 0b37ef7b..316b73ae 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -53,7 +53,7 @@ concurrency: jobs: ubuntu-ci: - if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') || false }} + if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }} uses: ./.github/workflows/reusable-ubuntu-ci.yml with: # It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket: @@ -63,7 +63,7 @@ jobs: colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} - fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.0.x' }} + fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }} fastdds-branch: ${{ inputs.fastdds-branch || '2.6.x' }} - run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') || false }} + run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} run-tests: ${{ (inputs.run-tests == true) || false }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index ece1ded4..8e0c4940 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -59,7 +59,7 @@ jobs: vs-toolset: - 'v141' - 'v142' - if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') || false }} + if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }} uses: ./.github/workflows/reusable-windows-ci.yml with: # It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket: @@ -70,7 +70,7 @@ jobs: colcon-args: ${{ inputs.colcon-args }} cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args }} - fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.0.x' }} + fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }} fastdds-branch: ${{ inputs.fastdds-branch ||'2.6.x' }} run-build: false run-tests: ${{ ((inputs.run-tests == true) && true) || false }} From 50f5b0952a8ac0e4d6df13584d480115fae01250 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Thu, 11 Jul 2024 15:05:21 +0200 Subject: [PATCH 11/11] Refs #21228: Apply rev suggestions Signed-off-by: JesusPoderoso --- .github/workflows/reusable-ubuntu-ci.yml | 3 --- .github/workflows/ubuntu-ci.yml | 1 + README.md | 3 ++- RELEASE_SUPPORT.md | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index c42fa272..5e777b35 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -47,7 +47,6 @@ on: required: false type: boolean default: false - defaults: run: shell: bash @@ -129,7 +128,6 @@ jobs: destination_workspace: src skip_existing: 'true' - - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 @@ -199,7 +197,6 @@ jobs: colcon_build_args: ${{ inputs.colcon-args }} colcon_build_args_default: '--packages-select fastdds_python' cmake_args: ${{ inputs.cmake-args }} - cmake_args_default: '' cmake_build_type: ${{ matrix.cmake-build-type }} workspace: ${{ github.workspace }} workspace_dependencies: ${{ github.workspace }}/install diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 316b73ae..a84bec5b 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -67,3 +67,4 @@ jobs: fastdds-branch: ${{ inputs.fastdds-branch || '2.6.x' }} run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} run-tests: ${{ (inputs.run-tests == true) || false }} + use-ccache: ${{ inputs.use-ccache || false }} diff --git a/README.md b/README.md index e9ba7d61..1fe08f9f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ [![Issues](https://img.shields.io/github/issues/eProsima/Fast-DDS-python.svg)](https://github.com/eProsima/Fast-DDS-python/issues) [![Forks](https://img.shields.io/github/forks/eProsima/Fast-DDS-python.svg)](https://github.com/eProsima/Fast-DDS-python/network/members) [![Stars](https://img.shields.io/github/stars/eProsima/Fast-DDS-python.svg)](https://github.com/eProsima/Fast-DDS-python/stargazers) - +[![Fast DDS Python Ubuntu CI (nightly)](https://github.com/eProsima/Fast-DDS-Python/actions/workflows/nightly-ubuntu-ci.yml/badge.svg)](https://github.com/eProsima/Fast-DDS-Python/actions/workflows/nightly-ubuntu-ci.yml) +[![Fast DDS Python Windows CI (nightly)](https://github.com/eProsima/Fast-DDS-Python/actions/workflows/nightly-windows-ci.yml/badge.svg)](https://github.com/eProsima/Fast-DDS-Python/actions/workflows/nightly-windows-ci.yml) *eProsima Fast DDS Python* is a Python binding for the [*eProsima Fast DDS*](https://github.com/eProsima/Fast-DDS) C++ library. This is a work in progress, but ultimately the goal is having the complete *Fast DDS* API available in Python. diff --git a/RELEASE_SUPPORT.md b/RELEASE_SUPPORT.md index 1492b129..dce79481 100644 --- a/RELEASE_SUPPORT.md +++ b/RELEASE_SUPPORT.md @@ -1,4 +1,3 @@ # Release support - Please, refer to the [main branch](https://github.com/eProsima/Fast-DDS-Python/blob/master/RELEASE_SUPPORT.md) for the latest version of this document.