Skip to content

Commit

Permalink
Refs #20091: Add macos actions to multiplaform
Browse files Browse the repository at this point in the history
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Feb 18, 2024
1 parent eb18688 commit bd71eaa
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 22 deletions.
9 changes: 6 additions & 3 deletions macos/install_python_packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions multiplatform/colcon_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions multiplatform/colcon_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
8 changes: 6 additions & 2 deletions multiplatform/install_colcon/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
8 changes: 4 additions & 4 deletions multiplatform/install_gtest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
12 changes: 10 additions & 2 deletions multiplatform/install_python_packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 4 additions & 4 deletions multiplatform/junit_summary/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions ubuntu/colcon_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.*, '_')) }}
Expand Down
2 changes: 1 addition & 1 deletion ubuntu/install_colcon/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd71eaa

Please sign in to comment.