diff --git a/README.md b/README.md index ccf33b5d..ab479e7f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/VERSION b/VERSION index cd9878b8..8b64394e 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ VERSION_MAJOR 0 -VERSION_MINOR 8 -VERSION_PATCH 1 +VERSION_MINOR 9 +VERSION_PATCH 0 diff --git a/external/setup-python/action.yml b/external/setup-python/action.yml index 6c46cdca..0897a9ef 100644 --- a/external/setup-python/action.yml +++ b/external/setup-python/action.yml @@ -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 }} diff --git a/macos/install_brew_packages/action.yml b/macos/install_brew_packages/action.yml new file mode 100644 index 00000000..0ab677bc --- /dev/null +++ b/macos/install_brew_packages/action.yml @@ -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 diff --git a/macos/install_colcon/action.yml b/macos/install_colcon/action.yml new file mode 100644 index 00000000..d85db658 --- /dev/null +++ b/macos/install_colcon/action.yml @@ -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@main + 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://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + colcon mixin update default diff --git a/macos/install_python_packages/action.yml b/macos/install_python_packages/action.yml new file mode 100644 index 00000000..7ff71e24 --- /dev/null +++ b/macos/install_python_packages/action.yml @@ -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 diff --git a/multiplatform/colcon_build/action.yml b/multiplatform/colcon_build/action.yml index 0013a142..c38d8a5d 100644 --- a/multiplatform/colcon_build/action.yml +++ b/multiplatform/colcon_build/action.yml @@ -47,9 +47,9 @@ runs: using: composite steps: - - name: Run in ubuntu + - name: Run in ubuntu or macOS uses: eProsima/eProsima-CI/ubuntu/colcon_build@main - if: runner.os == 'Linux' + if: runner.os == 'Linux' || runner.os == 'macOS' with: colcon_meta_file: ${{ inputs.colcon_meta_file }} colcon_build_args: ${{ inputs.colcon_build_args }} diff --git a/multiplatform/colcon_test/action.yml b/multiplatform/colcon_test/action.yml index b9eab9aa..568c2887 100644 --- a/multiplatform/colcon_test/action.yml +++ b/multiplatform/colcon_test/action.yml @@ -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' @@ -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 + - name: Run in ubuntu or macOS + id: test_ubuntu_mac uses: eProsima/eProsima-CI/ubuntu/colcon_test@main - if: runner.os == 'Linux' + if: runner.os == 'Linux' || runner.os == 'macOS' with: colcon_test_args: ${{ inputs.colcon_test_args }} colcon_test_args_default: ${{ inputs.colcon_test_args_default }} diff --git a/multiplatform/install_colcon/action.yml b/multiplatform/install_colcon/action.yml index 91a95318..0b9d2ebf 100644 --- a/multiplatform/install_colcon/action.yml +++ b/multiplatform/install_colcon/action.yml @@ -9,6 +9,10 @@ runs: uses: eProsima/eProsima-CI/ubuntu/install_colcon@main if: runner.os == 'Linux' + - name: Run in macOS + uses: eProsima/eProsima-CI/macos/install_colcon@main + if: runner.os == 'macOS' + - name: Run in windows uses: eProsima/eProsima-CI/windows/install_colcon@main if: runner.os == 'Windows' diff --git a/multiplatform/install_gtest/action.yml b/multiplatform/install_gtest/action.yml index 4df01785..a04ce86f 100644 --- a/multiplatform/install_gtest/action.yml +++ b/multiplatform/install_gtest/action.yml @@ -17,9 +17,9 @@ runs: using: composite steps: - - name: Run in ubuntu + - name: Run in ubuntu or macOS uses: eProsima/eProsima-CI/ubuntu/install_gtest@main - if: runner.os == 'Linux' + if: runner.os == 'Linux' || runner.os == 'macOS' with: cmake_build_type: ${{ inputs.cmake_build_type }} version: ${{ inputs.version }} diff --git a/multiplatform/install_python_packages/action.yml b/multiplatform/install_python_packages/action.yml index a42ad4a0..7a0896e8 100644 --- a/multiplatform/install_python_packages/action.yml +++ b/multiplatform/install_python_packages/action.yml @@ -30,6 +30,14 @@ runs: upgrade: ${{ inputs.upgrade }} requirements_file_name: ${{ inputs.requirements_file_name }} + - name: Run in macOS + uses: eProsima/eProsima-CI/macos/install_python_packages@main + 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 if: runner.os == 'Windows' diff --git a/multiplatform/junit_summary/action.yaml b/multiplatform/junit_summary/action.yaml index fe70a770..da15977c 100644 --- a/multiplatform/junit_summary/action.yaml +++ b/multiplatform/junit_summary/action.yaml @@ -30,8 +30,8 @@ runs: using: composite steps: - - name: Run in ubuntu - if: runner.os == 'Linux' + - name: Run in ubuntu or macOS + if: runner.os == 'Linux' || runner.os == 'macOS' uses: eProsima/eProsima-CI/ubuntu/junit_summary@main with: junit_reports_dir: ${{ inputs.junit_reports_dir }} diff --git a/ubuntu/install_python_packages/action.yml b/ubuntu/install_python_packages/action.yml index 25a466d5..2c7b6ce9 100644 --- a/ubuntu/install_python_packages/action.yml +++ b/ubuntu/install_python_packages/action.yml @@ -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 diff --git a/versions.md b/versions.md index 5b22c9f5..a66b5f35 100644 --- a/versions.md +++ b/versions.md @@ -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) @@ -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**: