From bd71eaad95f3bf124e62ecb3b81ef4254ee739a8 Mon Sep 17 00:00:00 2001 From: EduPonz Date: Fri, 16 Feb 2024 10:20:09 +0100 Subject: [PATCH] Refs #20091: Add macos actions to multiplaform Signed-off-by: EduPonz --- macos/install_python_packages/action.yml | 9 ++++++--- multiplatform/colcon_build/action.yml | 4 ++-- multiplatform/colcon_test/action.yml | 4 ++-- multiplatform/install_colcon/action.yml | 8 ++++++-- multiplatform/install_gtest/action.yml | 8 ++++---- multiplatform/install_python_packages/action.yml | 12 ++++++++++-- multiplatform/junit_summary/action.yaml | 8 ++++---- ubuntu/colcon_test/action.yml | 4 ++-- ubuntu/install_colcon/action.yml | 2 +- 9 files changed, 37 insertions(+), 22 deletions(-) diff --git a/macos/install_python_packages/action.yml b/macos/install_python_packages/action.yml index 2c7b6ce9..7ff71e24 100644 --- a/macos/install_python_packages/action.yml +++ b/macos/install_python_packages/action.yml @@ -28,20 +28,23 @@ runs: echo "::group::Install Python packages" # Set upgrade flag - if [ "${{ inputs.upgrade }}" = "true" ]; then + if [[ "${{ inputs.upgrade }}" == "true" ]] + then export UPGRADE_FLAG="--upgrade" else export UPGRADE_FLAG="" fi # Install python packages if any - if [[ ! -z "${{ inputs.packages }}" ]] ; then + if [[ ! -z "${{ inputs.packages }}" ]] + then pip3 install ${UPGRADE_FLAG} -U \ ${{ inputs.packages }} fi # Install requirements file if any - if [[ ! -z "${{ inputs.requirements_file_name }}" ]] ; then + if [[ ! -z "${{ inputs.requirements_file_name }}" ]] + then pip3 install ${UPGRADE_FLAG} -U \ -r ${{ inputs.requirements_file_name }} fi diff --git a/multiplatform/colcon_build/action.yml b/multiplatform/colcon_build/action.yml index 991a625f..c74e2ec7 100644 --- a/multiplatform/colcon_build/action.yml +++ b/multiplatform/colcon_build/action.yml @@ -48,7 +48,7 @@ runs: steps: - name: Run in ubuntu or macOS - uses: eProsima/eProsima-CI/ubuntu/colcon_build@v0 + uses: eProsima/eProsima-CI/ubuntu/colcon_build@feature/fastdds_mac_ci_support if: runner.os == 'Linux' || runner.os == 'macOS' with: colcon_meta_file: ${{ inputs.colcon_meta_file }} @@ -61,7 +61,7 @@ runs: cmake_build_type: ${{ inputs.cmake_build_type }} - name: Run in windows - uses: eProsima/eProsima-CI/windows/colcon_build@v0 + uses: eProsima/eProsima-CI/windows/colcon_build@feature/fastdds_mac_ci_support if: runner.os == 'Windows' with: colcon_meta_file: ${{ inputs.colcon_meta_file }} diff --git a/multiplatform/colcon_test/action.yml b/multiplatform/colcon_test/action.yml index 181df026..cd12e548 100644 --- a/multiplatform/colcon_test/action.yml +++ b/multiplatform/colcon_test/action.yml @@ -54,7 +54,7 @@ runs: - name: Run in ubuntu or macOS id: test_ubuntu_mac - uses: eProsima/eProsima-CI/ubuntu/colcon_test@main + uses: eProsima/eProsima-CI/ubuntu/colcon_test@feature/fastdds_mac_ci_support if: runner.os == 'Linux' || runner.os == 'macOS' with: colcon_test_args: ${{ inputs.colcon_test_args }} @@ -68,7 +68,7 @@ runs: - name: Run in windows id: test_windows - uses: eProsima/eProsima-CI/windows/colcon_test@main + uses: eProsima/eProsima-CI/windows/colcon_test@feature/fastdds_mac_ci_support if: runner.os == 'Windows' with: colcon_test_args: ${{ inputs.colcon_test_args }} diff --git a/multiplatform/install_colcon/action.yml b/multiplatform/install_colcon/action.yml index 91a95318..40feb96e 100644 --- a/multiplatform/install_colcon/action.yml +++ b/multiplatform/install_colcon/action.yml @@ -6,9 +6,13 @@ runs: steps: - name: Run in ubuntu - uses: eProsima/eProsima-CI/ubuntu/install_colcon@main + uses: eProsima/eProsima-CI/ubuntu/install_colcon@feature/fastdds_mac_ci_support if: runner.os == 'Linux' + - name: Run in macOS + uses: eProsima/eProsima-CI/macos/install_colcon@feature/fastdds_mac_ci_support + if: runner.os == 'macOS' + - name: Run in windows - uses: eProsima/eProsima-CI/windows/install_colcon@main + uses: eProsima/eProsima-CI/windows/install_colcon@feature/fastdds_mac_ci_support if: runner.os == 'Windows' diff --git a/multiplatform/install_gtest/action.yml b/multiplatform/install_gtest/action.yml index 4df01785..416a0e2c 100644 --- a/multiplatform/install_gtest/action.yml +++ b/multiplatform/install_gtest/action.yml @@ -17,15 +17,15 @@ runs: using: composite steps: - - name: Run in ubuntu - uses: eProsima/eProsima-CI/ubuntu/install_gtest@main - if: runner.os == 'Linux' + - name: Run in ubuntu or macOS + uses: eProsima/eProsima-CI/ubuntu/install_gtest@feature/fastdds_mac_ci_support + if: runner.os == 'Linux' || runner.os == 'macOS' with: cmake_build_type: ${{ inputs.cmake_build_type }} version: ${{ inputs.version }} - name: Run in windows - uses: eProsima/eProsima-CI/windows/install_gtest@main + uses: eProsima/eProsima-CI/windows/install_gtest@feature/fastdds_mac_ci_support if: runner.os == 'Windows' with: cmake_build_type: ${{ inputs.cmake_build_type }} diff --git a/multiplatform/install_python_packages/action.yml b/multiplatform/install_python_packages/action.yml index a42ad4a0..2d0ff306 100644 --- a/multiplatform/install_python_packages/action.yml +++ b/multiplatform/install_python_packages/action.yml @@ -23,15 +23,23 @@ runs: steps: - name: Run in ubuntu - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@main + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@feature/fastdds_mac_ci_support if: runner.os == 'Linux' with: packages: ${{ inputs.packages }} upgrade: ${{ inputs.upgrade }} requirements_file_name: ${{ inputs.requirements_file_name }} + - name: Run in macOS + uses: eProsima/eProsima-CI/macos/install_python_packages@feature/fastdds_mac_ci_support + if: runner.os == 'macOS' + with: + packages: ${{ inputs.packages }} + upgrade: ${{ inputs.upgrade }} + requirements_file_name: ${{ inputs.requirements_file_name }} + - name: Run in windows - uses: eProsima/eProsima-CI/windows/install_python_packages@main + uses: eProsima/eProsima-CI/windows/install_python_packages@feature/fastdds_mac_ci_support if: runner.os == 'Windows' with: packages: ${{ inputs.packages }} diff --git a/multiplatform/junit_summary/action.yaml b/multiplatform/junit_summary/action.yaml index fe70a770..72be0c58 100644 --- a/multiplatform/junit_summary/action.yaml +++ b/multiplatform/junit_summary/action.yaml @@ -30,9 +30,9 @@ runs: using: composite steps: - - name: Run in ubuntu - if: runner.os == 'Linux' - uses: eProsima/eProsima-CI/ubuntu/junit_summary@main + - name: Run in ubuntu or macOS + if: runner.os == 'Linux' || runner.os == 'macOS' + uses: eProsima/eProsima-CI/ubuntu/junit_summary@feature/fastdds_mac_ci_support with: junit_reports_dir: ${{ inputs.junit_reports_dir }} print_summary: ${{ inputs.print_summary }} @@ -42,7 +42,7 @@ runs: - name: Run in windows if: runner.os == 'Windows' - uses: eProsima/eProsima-CI/windows/junit_summary@main + uses: eProsima/eProsima-CI/windows/junit_summary@feature/fastdds_mac_ci_support with: junit_reports_dir: ${{ inputs.junit_reports_dir }} print_summary: ${{ inputs.print_summary }} diff --git a/ubuntu/colcon_test/action.yml b/ubuntu/colcon_test/action.yml index a16b35df..26629673 100644 --- a/ubuntu/colcon_test/action.yml +++ b/ubuntu/colcon_test/action.yml @@ -54,7 +54,7 @@ runs: steps: - name: Install lxml - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@main + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@feature/fastdds_mac_ci_support with: packages: lxml @@ -118,7 +118,7 @@ runs: shell: bash - name: Upload test report in JUnit format - uses: eProsima/eProsima-CI/external/upload-artifact@main + uses: eProsima/eProsima-CI/external/upload-artifact@feature/fastdds_mac_ci_support if: ${{ ! cancelled() }} with: name: ${{ inputs.test_report_artifact || format('test_report_{0}_{1}', github.job, join(matrix.*, '_')) }} diff --git a/ubuntu/install_colcon/action.yml b/ubuntu/install_colcon/action.yml index be008d0a..afcfbe74 100644 --- a/ubuntu/install_colcon/action.yml +++ b/ubuntu/install_colcon/action.yml @@ -6,7 +6,7 @@ runs: steps: - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@main + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@feature/fastdds_mac_ci_support with: packages: 'setuptools==58.3.0 colcon-common-extensions colcon-mixin' upgrade: true