diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index c565974e..ace109a7 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -59,7 +59,6 @@ defaults: jobs: fastdds_python_build: runs-on: ${{ inputs.os-version }} - if: ${{ inputs.run-build == true }} strategy: fail-fast: false matrix: @@ -75,22 +74,26 @@ jobs: repo: eProsima/Fast-DDS-Python - name: Sync eProsima/Fast-DDS-Python repository + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/checkout@v0 with: path: src/fastdds_python ref: ${{ inputs.fastdds-python-branch }} - name: Install Fix Python version + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/setup-python@v0 with: python-version: '3.11' - name: Get minimum supported version of CMake + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/get-cmake@v0 with: cmakeVersion: '3.24.4' - name: Install apt dependencies + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: libasio-dev libtinyxml2-dev libssl-dev swig @@ -98,22 +101,25 @@ jobs: upgrade: false - name: Install colcon + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - name: Install Python dependencies + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0 with: packages: vcstool xmlschema upgrade: false - name: Setup CCache + if: ${{ inputs.run-build == true && inputs.use-ccache == true }} uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - if: ${{ inputs.use-ccache == true }} with: api_token: ${{ secrets.GITHUB_TOKEN }} - name: Get Fast CDR branch id: get_fastcdr_branch + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 with: remote_repository: eProsima/Fast-CDR @@ -121,6 +127,7 @@ jobs: skip_base: true - name: Download Fast CDR + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/checkout@v0 with: repository: eProsima/Fast-CDR @@ -129,12 +136,14 @@ jobs: - name: Get Fast DDS branch id: get_fastdds_branch + if: ${{ inputs.run-build == true }} 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 + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/checkout@v0 with: repository: eProsima/Fast-DDS @@ -142,6 +151,7 @@ jobs: ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }} - name: Fetch Fast DDS Python dependencies + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos @@ -149,6 +159,7 @@ jobs: skip_existing: 'true' - name: Colcon build + if: ${{ inputs.run-build == true }} continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: @@ -159,6 +170,7 @@ jobs: workspace: ${{ github.workspace }} - name: Upload build artifacts + if: ${{ inputs.run-build == true && inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/upload-artifact@v0 with: name: fastdds_python_build_${{ inputs.label }} @@ -167,7 +179,6 @@ jobs: fastdds_python_test: needs: fastdds_python_build runs-on: ${{ inputs.os-version }} - if: ${{ inputs.run-tests == true }} strategy: fail-fast: false matrix: @@ -175,42 +186,49 @@ jobs: - 'RelWithDebInfo' steps: - name: Download python build artifacts + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/download-artifact@v0 with: name: fastdds_python_build_${{ inputs.label }} path: ${{ github.workspace }} - name: Install Fix Python version + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/setup-python@v0 with: python-version: '3.11' - name: Get minimum supported version of CMake + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/get-cmake@v0 with: cmakeVersion: '3.24.4' - name: Install apt packages + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 with: packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen - name: Install colcon + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - name: Install Python dependencies + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 with: packages: xmlschema pytest - name: Setup CCache + if: ${{ inputs.run-tests == true && inputs.use-ccache == true }} uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - if: ${{ inputs.use-ccache == true }} with: api_token: ${{ secrets.GITHUB_TOKEN }} - name: Colcon build continue-on-error: false + if: ${{ inputs.run-tests == true }} 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/ubuntu_test.meta @@ -223,6 +241,7 @@ jobs: - name: Colcon test id: python_test + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta @@ -236,7 +255,7 @@ jobs: - name: Fast DDS Python test summary uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 - if: ${{ !cancelled() }} + if: ${{ inputs.run-tests == true && !cancelled() }} with: junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}" print_summary: 'True' diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 3684aa3a..1e2e0dcb 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -71,7 +71,6 @@ defaults: jobs: fastdds_python_build: runs-on: ${{ inputs.os-version }} - if: ${{ inputs.run-build == true }} strategy: fail-fast: false matrix: @@ -88,27 +87,32 @@ jobs: repo: eProsima/Fast-DDS-Python - name: Sync eProsima/Fast-DDS-Python repository + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/checkout@v0 with: path: src/fastdds_python ref: ${{ inputs.fastdds-python-branch }} - name: Install Fix Python version + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/setup-python@v0 with: python-version: '3.11' - name: Get minimum supported version of CMake + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/get-cmake@v0 with: cmakeVersion: ${{ inputs.cmake-version }} - name: Install OpenSSL + if: ${{ inputs.run-build == true }} uses: eProsima/eprosima-CI/windows/install_openssl@v0 with: version: '3.1.1' - name: Update OpenSSL environment variables + if: ${{ inputs.run-build == true }} run: | # Update the environment if (Test-Path -Path $Env:ProgramW6432\OpenSSL) @@ -130,19 +134,23 @@ jobs: } - name: Install colcon + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/windows/install_colcon@v0 - name: Install Python dependencies + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/windows/install_python_packages@v0 with: packages: vcstool xmlschema pywin32 - name: Install swig + if: ${{ inputs.run-build == true }} shell: pwsh run: choco install swig --allow-downgrade --version=${{ inputs.swig-version }} - name: Get Fast CDR branch id: get_fastcdr_branch + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 with: remote_repository: eProsima/Fast-CDR @@ -150,6 +158,7 @@ jobs: skip_base: true - name: Download Fast CDR + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/checkout@v0 with: repository: eProsima/Fast-CDR @@ -158,12 +167,14 @@ jobs: - name: Get Fast DDS branch id: get_fastdds_branch + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/multiplatform/get_related_branch_from_repo@v0 with: remote_repository: eProsima/Fast-DDS fallback_branch: ${{ inputs.fastdds-branch }} - name: Download Fast DDS repo + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/external/checkout@v0 with: repository: eProsima/Fast-DDS @@ -171,6 +182,7 @@ jobs: ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }} - name: Fetch Fast DDS Python dependencies + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos @@ -179,6 +191,7 @@ jobs: - name: Colcon build continue-on-error: false + if: ${{ inputs.run-build == true }} uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta @@ -190,6 +203,7 @@ jobs: workspace: ${{ github.workspace }} - name: Upload build artifacts + if: ${{ inputs.run-build == true && inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/upload-artifact@v0 with: name: fastdds_python_build_${{ inputs.label }} @@ -199,7 +213,6 @@ jobs: fastdds_python_test: needs: fastdds_python_build runs-on: ${{ inputs.os-version }} - if: ${{ inputs.run-tests == true }} strategy: fail-fast: false matrix: @@ -207,27 +220,32 @@ jobs: - 'RelWithDebInfo' steps: - name: Download python build artifacts + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/download-artifact@v0 with: name: fastdds_python_build_${{ inputs.label }} path: ${{ github.workspace }} - name: Install Fix Python version + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/setup-python@v0 with: python-version: '3.11' - name: Get minimum supported version of CMake + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/get-cmake@v0 with: cmakeVersion: ${{ inputs.cmake-version }} - name: Install OpenSSL + if: ${{ inputs.run-tests == true }} uses: eProsima/eprosima-CI/windows/install_openssl@v0 with: version: '3.1.1' - name: Update OpenSSL environment variables + if: ${{ inputs.run-tests == true }} run: | # Update the environment if (Test-Path -Path $Env:ProgramW6432\OpenSSL) @@ -249,22 +267,27 @@ jobs: } - name: Install colcon + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/windows/install_colcon@v0 - name: Install Python dependencies + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/windows/install_python_packages@v0 with: packages: vcstool xmlschema pywin32 pytest - name: Install swig + if: ${{ inputs.run-tests == true }} shell: pwsh run: choco install swig --allow-downgrade --version=${{ inputs.swig-version }} - name: Install doxygen + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/external/install_doxygen@v0 - name: Colcon build continue-on-error: false + if: ${{ inputs.run-tests == true }} 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/windows_test.meta @@ -278,6 +301,7 @@ jobs: - name: Colcon test id: python_test + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta @@ -291,7 +315,7 @@ jobs: - name: Test summary uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 - if: ${{ !cancelled() }} + if: ${{ inputs.run-tests == true && !cancelled() }} with: junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}" print_summary: 'True' diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index dd75b422..5410b8b1 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -66,5 +66,5 @@ jobs: fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }} fastdds-branch: ${{ inputs.fastdds-branch || 'master' }} run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }} + run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test')) && !contains(github.event.pull_request.labels.*.name, 'skip-ci')) }} use-ccache: ${{ inputs.use-ccache || false }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 6c79d5d4..e7125d4c 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -68,7 +68,7 @@ jobs: fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }} fastdds-branch: ${{ inputs.fastdds-branch || 'master' }} run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }} + run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test')) && !contains(github.event.pull_request.labels.*.name, 'skip-ci')) }} windows-ci-stable-abi: if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }} @@ -88,5 +88,5 @@ jobs: fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }} fastdds-branch: ${{ inputs.fastdds-branch || 'master' }} run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} - run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }} + run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test')) && !contains(github.event.pull_request.labels.*.name, 'skip-ci')) }} swig-version: '4.3.1'