diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index ea06a75dcca..fc7ebc5fe29 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -27,11 +27,21 @@ on: description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' required: true type: string + fastcdr-branch: + description: 'Branch or tag of Fast CDR repository (https://github.com/eProsima/Fast-CDR)' + required: false + type: string + default: 'master' security: description: 'Enable security features' required: false type: boolean default: true + run-build: + description: 'Build Fast DDS (CI skipped otherwise)' + required: false + type: boolean + default: true run-tests: description: 'Run test suite of Fast DDS, Fast DDS python, and Fast DDS Discovery Server' required: false @@ -53,6 +63,7 @@ defaults: jobs: fastdds_build: runs-on: ${{ inputs.os-image }} + if: ${{ inputs.run-build == true }} strategy: fail-fast: false matrix: @@ -105,6 +116,20 @@ jobs: with: api_token: ${{ secrets.GITHUB_TOKEN }} + - name: Get Fast CDR branch + id: get_fastcdr_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Fast-CDR + fallback_branch: ${{ inputs.fastcdr-branch }} + + - name: Download Fast CDR + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Fast-CDR + path: ${{ github.workspace }}/src/fastcdr + ref: ${{ steps.get_fastcdr_branch.outputs.deduced_branch }} + - name: Fetch Fast DDS dependencies uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: @@ -296,10 +321,11 @@ jobs: uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta - colcon_build_args: ${{ inputs.colcon-args }} + colcon_build_args: ${{ inputs.colcon-args }} --packages-select fastdds_python cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' cmake_args_default: '' cmake_build_type: ${{ matrix.cmake-build-type }} + workspace_dependencies: ${{ github.workspace }}/install workspace: ${{ github.workspace }} - name: Upload python build artifacts diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index a382b581661..93ce0dac181 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -142,22 +142,10 @@ jobs: skip_existing: 'true' - name: Prepare build meta file - run: | - $build_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_build.meta' - $test_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_test.meta' - $build_test_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_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/fastrtps/.github/workflows/config/fastdds_build.meta', '${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta')" + path: '${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build_test.meta' - name: Build id: build diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 67b2b3c9eff..040d14da85d 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -54,10 +54,7 @@ concurrency: jobs: ubuntu-ci: - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} + 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: @@ -69,5 +66,6 @@ jobs: ctest-args: ${{ inputs.ctest-args || '-LE xfail' }} fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.14.x' }} security: ${{ ((inputs.security == true) && true) || github.event_name == 'pull_request' }} + run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }} use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }}