Skip to content

Commit

Permalink
Add CI support for macos-14 Apple Silicon (#1589)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Feb 1, 2024
1 parent abc5976 commit 3dac05c
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .ci/initial-cache.gh.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ if(NOT WIN32 OR DEFINED ENV{CONDA_PREFIX})
endif()

# Profiles options
set(ROBOTOLOGY_ENABLE_ROBOT_TESTING ON CACHE BOOL "")
if(NOT (APPLE AND ($ENV{RUNNER_ARCH} STREQUAL "ARM64")))
set(ROBOTOLOGY_ENABLE_ROBOT_TESTING ON CACHE BOOL "")
set(ROBOTOLOGY_ENABLE_ICUB_HEAD ON CACHE BOOL "")
endif()

set(ROBOTOLOGY_ENABLE_DYNAMICS ON CACHE BOOL "")
# ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS is only supported on Windows with conda
if(NOT (WIN32 AND NOT DEFINED ENV{CONDA_PREFIX}))
set(ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS ON CACHE BOOL "")
endif()
set(ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS ON CACHE BOOL "")
set(ROBOTOLOGY_ENABLE_ICUB_HEAD ON CACHE BOOL "")
set(ROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS ON CACHE BOOL "")
set(ROBOTOLOGY_ENABLE_TELEOPERATION ON CACHE BOOL "")
set(ROBOTOLOGY_ENABLE_GRASPING OFF CACHE BOOL "")
Expand Down
34 changes: 28 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
build_type: [Release]
os: [ubuntu-latest, macos-latest, windows-2019, windows-2022]
os: [ubuntu-latest, macos-12, macos-14, windows-2019, windows-2022]
project_tags:
- Default
- Unstable
Expand All @@ -38,11 +38,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
if: matrix.os != 'macos-14'
with:
miniforge-variant: Mambaforge
miniforge-version: latest

- uses: conda-incubator/setup-miniconda@v3
if: matrix.os == 'macos-14'
with:
installer-url: https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-MacOSX-arm64.sh

- name: Install files to enable compilation of mex files [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
run: |
Expand All @@ -52,15 +58,24 @@ jobs:
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020b_mexa64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexa64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/macOS]
if: contains(matrix.os, 'macos')
- name: Install files to enable compilation of mex files [Conda/macOS Intel]
if: matrix.os == 'macos-12'
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexmaci64.zip
unzip msdk_R2020a_mexmaci64.zip
rm msdk_R2020a_mexmaci64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexmaci64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexmaci64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/macOS Apple Silicon]
if: matrix.os == 'macos-14'
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2023b_mexmaca64.zip
unzip msdk_R2023b_mexmaca64.zip
rm msdk_R2023b_mexmaca64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2023b_mexmaca64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexmaca64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/Windows]
if: contains(matrix.os, 'windows')
shell: bash
Expand All @@ -71,11 +86,18 @@ jobs:
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexw64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexw64" >> $GITHUB_ENV
- name: Install ace (on all platforms excluding macOS M1) [Conda]
if: matrix.os != 'macos-14'
shell: bash -l {0}
run: |
# Dependencies
mamba install ace
- name: Dependencies [Conda]
shell: bash -l {0}
run: |
# Dependencies
mamba install ace asio assimp boost eigen freetype gazebo glew glfw glm graphviz==8.* gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json pcl vtk opencv portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr cmake compilers make ninja pkg-config tomlplusplus libzlib ffmpeg onnxruntime-cpp
mamba install asio assimp boost eigen freetype gazebo glew glfw glm graphviz==8.* gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json pcl vtk opencv portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr cmake compilers make ninja pkg-config tomlplusplus libzlib ffmpeg onnxruntime-cpp
# Python
mamba install python numpy swig==4.1.0 pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython gst-plugins-good gst-plugins-bad
Expand Down
2 changes: 1 addition & 1 deletion cmake/ProjectsTagsStable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set_tag(qhull_TAG 2020.2)
set_tag(CppAD_TAG 20240000.2)
set_tag(proxsuite_TAG v0.6.3)
set_tag(casadi_TAG 3.6.3)
set_tag(casadi-matlab-bindings_TAG v3.6.3.0)
set_tag(casadi-matlab-bindings_TAG v3.6.3.1)

# Robotology projects
set_tag(YCM_TAG master)
Expand Down
4 changes: 1 addition & 3 deletions cmake/ProjectsTagsUnstable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ set_tag(qhull_TAG 2020.2)
set_tag(CppAD_TAG 20240000.2)
set_tag(proxsuite_TAG v0.6.3)
set_tag(casadi_TAG 3.6.3)
set_tag(casadi-matlab-bindings_TAG v3.6.3.0)
set_tag(casadi-matlab-bindings_TAG v3.6.3.1)

# Robotology projects
set_tag(YARP_TAG yarp-3.9)
set_tag(ICUB_TAG devel)
set_tag(RobotTestingFramework_TAG devel)
set_tag(blockTest_TAG devel)
set_tag(WBToolbox_TAG devel)
set_tag(BlockFactory_TAG devel)
set_tag(icub-tests_TAG devel)
set_tag(iDynTree_TAG master)
set_tag(icub-firmware_TAG devel)
Expand Down
7 changes: 4 additions & 3 deletions doc/cmake-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ Not all options are supported on all platforms. The following table provides a r
| Option | Ubuntu/Debian, dependencies: apt | Windows, dependencies: vcpkg | conda on Linux, dependencies: conda-forge | conda on macOS, dependencies: conda-forge | conda on Windows, dependencies: conda-forge |
|:-------------------------------------------------------------------:|:--------------------------------:|:----------------------------:|:-----------------------------------------:|:------------------------------------------:|:-------------------------------------------:|
| `ROBOTOLOGY_ENABLE_CORE` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_ROBOT_TESTING` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_ROBOT_TESTING`<sup id="a2">[2!](#f2)</sup> | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_DYNAMICS` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS` | ✔️ || ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_ICUB_HEAD` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_ICUB_HEAD`<sup id="a2">[2!](#f2)</sup> | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_ENABLE_TELEOPERATION` | ✔️ || ✔️ || ✔️ |
| `ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Expand All @@ -100,7 +100,8 @@ Not all options are supported on all platforms. The following table provides a r
| `ROBOTOLOGY_USES_ESDCAN` || ✔️ ||| ✔️ |

<b id="f1">1!</b>:`ROBOTOLOGY_USES_MUJOCO` does not support building with apt dependencies on Debian or Ubuntu distributions older than 2022. Furthermore, it does not support build on Wndows with Visual Studio 2019, it requires Visual Studio 2022.
<b id="f1">1!</b>:`ROBOTOLOGY_USES_MUJOCO` does not support building with apt dependencies on Debian or Ubuntu distributions older than 2022. Furthermore, it does not support build on Windows with Visual Studio 2019, it requires Visual Studio 2022.
<b id="f2">2!</b>:`ROBOTOLOGY_ENABLE_ROBOT_TESTING` and `ROBOTOLOGY_ENABLE_ICUB_HEAD` do not support building with conda-forge dependencies on Apple Silicon.



Expand Down
2 changes: 1 addition & 1 deletion releases/latest.releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ repositories:
casadi-matlab-bindings:
type: git
url: https://github.com/ami-iit/casadi-matlab-bindings.git
version: v3.6.3.0
version: v3.6.3.1
idyntree-yarp-tools:
type: git
url: https://github.com/robotology/idyntree-yarp-tools.git
Expand Down

0 comments on commit 3dac05c

Please sign in to comment.