Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoferigo committed Jun 30, 2023
2 parents bb50f72 + 25ef985 commit 7997e51
Show file tree
Hide file tree
Showing 18 changed files with 774 additions and 157 deletions.
153 changes: 50 additions & 103 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
- cron: '0 2 * * *'

env:
YCM_TAG: v0.14.2
YARP_TAG: v3.7.2
ICUB_TAG: v2.0.2
YCM_TAG: v0.15.1
YARP_TAG: v3.8.0
ICUB_TAG: v2.1.1

jobs:
build-with-conda-dependencies:
Expand All @@ -24,18 +24,20 @@ jobs:
os: [ubuntu-20.04, macos-latest, windows-2019]

steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge,robotology
- uses: actions/checkout@v3

- name: Print used environment (no conda) [Conda]
shell: bash
run: |
env
- name: Get current week
id: week
run: echo "week=$(date +%Y-%U)" >> "${GITHUB_OUTPUT}"
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci_env.yml
cache-environment-key: environment-${{ steps.week.outputs.week }}


- name: Install files to enable compilation of mex files [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
Expand Down Expand Up @@ -73,7 +75,7 @@ jobs:
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
bash_vc_install=${VCToolsInstallDir//\\//}
bash_vc_install=${VCToolsInstallDir//\\//}
compiler_path=${bash_vc_install}bin/Hostx64/x64/cl.exe
echo "CC=${compiler_path}" >> $GITHUB_ENV
echo "CXX=${compiler_path}" >> $GITHUB_ENV
Expand All @@ -92,27 +94,19 @@ jobs:
# Visualizer tests excluded as a workaround for https://github.com/robotology/idyntree/issues/808
echo "IDYNTREE_TEST_TO_SKIP=Visualizer|matlab" >> $GITHUB_ENV
- name: Dependencies [Conda]
shell: bash -l {0}
run: |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
conda config --remove channels defaults
# Compilation related dependencies
mamba install cmake compilers make ninja pkg-config eigen libxml2 assimp ipopt irrlicht swig pybind11 python numpy yarp icub-main osqp-eigen
# Additional dependencies useful only on Linux
- name: Dependencies [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
# Additional dependencies only useful on Linux
# See https://github.com/robotology/robotology-superbuild/issues/477
mamba install expat-cos6-x86_64 freeglut libselinux-cos6-x86_64 libxau-cos6-x86_64 libxcb-cos6-x86_64 libxdamage-cos6-x86_64 libxext-cos6-x86_64 libxfixes-cos6-x86_64 libxxf86vm-cos6-x86_64 mesa-libgl-cos6-x86_64 mesa-libgl-devel-cos6-x86_64
micromamba install expat-cos6-x86_64 freeglut libselinux-cos6-x86_64 libxau-cos6-x86_64 libxcb-cos6-x86_64 libxdamage-cos6-x86_64 libxext-cos6-x86_64 libxfixes-cos6-x86_64 libxxf86vm-cos6-x86_64 mesa-libgl-cos6-x86_64 mesa-libgl-devel-cos6-x86_64
- name: Print used environment [Conda]
shell: bash -l {0}
run: |
mamba list
micromamba list
env
- name: Configure [Conda]
Expand Down Expand Up @@ -160,79 +154,58 @@ jobs:
cmake --install . --config ${{ matrix.build_type }}
build-with-system-dependencies:
name: '[${{ matrix.os }}@${{ matrix.build_type }}]'
build-with-apt-dependencies:
name: '[apt:${{ matrix.docker_image }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Release]
os: [ubuntu-20.04, macOS-latest]
os:
- ubuntu-latest
docker_image:
- "ubuntu:20.04"
- "ubuntu:22.04"
- "debian:sid"

container:
image: ${{ matrix.docker_image }}

steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3

- name: Dependencies [apt]
run: |
# See https://stackoverflow.com/questions/44331836/apt-get-install-tzdata-noninteractive,
# only required by Ubuntu 20.04
export DEBIAN_FRONTEND=noninteractive
apt-get -y update
apt-get -y install \
git build-essential cmake libace-dev coinor-libipopt-dev libeigen3-dev swig \
libxml2-dev liboctave-dev python3-dev python3-numpy valgrind libassimp-dev libirrlicht-dev curl unzip libglfw3-dev
- name: Install files to enable compilation of mex files [Linux]
if: contains(matrix.os, 'ubuntu')
- name: Install files to enable compilation of mex files [apt]
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020b_mexa64.zip
unzip msdk_R2020b_mexa64.zip
rm msdk_R2020b_mexa64.zip
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 [macOS]
if: contains(matrix.os, 'macos')
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 [Windows]
if: contains(matrix.os, 'windows')
shell: bash
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexw64.zip
unzip msdk_R2020a_mexw64.zip
rm msdk_R2020a_mexw64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexw64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexw64" >> $GITHUB_ENV
# Print environment variables to simplify development and debugging
- name: Environment Variables
shell: bash
run: env

# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
# ============
# DEPENDENCIES
# ============

- name: Dependencies [macOS]
if: matrix.os == 'macOS-latest'
run: |
brew install ace assimp boost eigen ipopt irrlicht swig
- name: Dependencies [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install \
git build-essential cmake libace-dev coinor-libipopt-dev libeigen3-dev swig \
libxml2-dev liboctave-dev python-dev python3-numpy valgrind libassimp-dev libirrlicht-dev
- name: Cache Source-based Dependencies
id: cache-source-deps
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/install/deps
key: source-deps-${{ matrix.docker_image }}-ycm-${{ env.YCM_TAG }}-yarp-${{ env.YARP_TAG }}-icub-${{ env.ICUB_TAG }}

- name: Source-based Dependencies [Ubuntu/macOS]
if: steps.cache-source-deps.outputs.cache-hit != 'true' && (contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest')
- name: Source-based Dependencies [apt]
if: steps.cache-source-deps.outputs.cache-hit != 'true' && contains(matrix.os, 'ubuntu')
shell: bash
run: |
# YCM
Expand All @@ -257,48 +230,26 @@ jobs:
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Dependencies (workaround for portaudio YCM problem) [macOS]
if: matrix.os == 'macOS-latest'
run: |
brew install octave
# ===================
# CMAKE-BASED PROJECT
# ===================

- name: Configure [Ubuntu/macOS]
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest'
- name: Configure [apt]
shell: bash
run: |
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=ON \
-DIDYNTREE_USES_ICUB_MAIN:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DIDYNTREE_USES_ASSIMP:BOOL=ON \
-DIDYNTREE_USES_MATLAB:BOOL=ON -DMatlab_ROOT_DIR=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION} -DIDYNTREE_DISABLE_MATLAB_TESTS:BOOL=ON \
-DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_OCTAVE:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
- name: Enable additional Ubuntu options (Valgrind, Python) [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
cd build
# Assimp is disabled on Ubuntu as a workaround for https://github.com/robotology/idyntree/issues/663
cmake -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON .
# For some reason, Ubuntu 18.04 image in GitHub Actions contain OpenBLAS 0.3.5, that is affected by https://github.com/xianyi/OpenBLAS/issues/2003
# As a workaround, we test against the regular blas instead of openblas
sudo apt-get install libblas-dev libatlas-base-dev
sudo apt-get remove libopenblas-base
-DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON -DIDYNTREE_USES_OCTAVE:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
- name: Build
shell: bash
run: |
cd build
# Attempt of fix for using YARP idl generators (that link ACE) in Windows
# See https://github.com/robotology/idyntree/issues/569
export PATH=$PATH:${GITHUB_WORKSPACE}/install/bin:${VCPKG_INSTALLATION_ROOT}/installed/x64-windows/bin:${VCPKG_INSTALLATION_ROOT}/installed/x64-windows/debug/bin
cmake --build . --config ${{ matrix.build_type }}
- name: Test
shell: bash
run: |
Expand All @@ -307,15 +258,13 @@ jobs:
ctest --output-on-failure -C ${{ matrix.build_type }} -E "Visualizer|matlab" .
- name: Install [Ubuntu/macOS]
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest'
- name: Install [apt]
shell: bash
run: |
cd build
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Compile Examples [Ubuntu/macOS]
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest'
- name: Compile Examples [apt]
shell: bash
run: |
cd examples
Expand All @@ -324,9 +273,7 @@ jobs:
cmake -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/install/deps;${GITHUB_WORKSPACE}/install" ..
cmake --build . --config ${{ matrix.build_type }}
- name: Check build if some dependencies are not enabled [Ubuntu]
if: contains(matrix.os, 'ubuntu')
- name: Check build if some dependencies are not enabled [apt]
shell: bash
run: |
cd build
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/matlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
# Execute a "nightly" build at 2 AM UTC
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'

jobs:
build-matlab-tests:
build-matlab-tests:
name: '[matlab:${{ matrix.matlab_version }}:${{ matrix.os }}]'
runs-on: ${{ matrix.os }}
defaults:
Expand Down Expand Up @@ -56,22 +56,22 @@ jobs:
run: |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
conda config --remove channels defaults
# Compilation related dependencies
# Compilation related dependencies
mamba install cmake compilers make ninja pkg-config
# Actual dependencies
mamba install eigen libxml2 assimp ipopt irrlicht osqp-eigen
mamba install eigen libxml2 assimp ipopt irrlicht osqp-eigen glfw
# Additional dependencies useful only on Linux
- name: Dependencies [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
if: contains(matrix.os, 'ubuntu')
run: |
# Additional dependencies only useful on Linux
# See https://github.com/robotology/robotology-superbuild/issues/477
mamba install expat-cos6-x86_64 freeglut libselinux-cos6-x86_64 libxau-cos6-x86_64 libxcb-cos6-x86_64 libxdamage-cos6-x86_64 libxext-cos6-x86_64 libxfixes-cos6-x86_64 libxxf86vm-cos6-x86_64 mesa-libgl-cos6-x86_64 mesa-libgl-devel-cos6-x86_64
# Additional dependencies useful only on Windows
- name: Dependencies [Conda/Windows]
if: contains(matrix.os, 'windows')
if: contains(matrix.os, 'windows')
run: |
# Additional dependencies only useful on Windows
# See https://github.com/robotology/robotology-superbuild/issues/477
Expand Down Expand Up @@ -120,8 +120,8 @@ jobs:
run: |
cd build
# Only run matlab tests as the rest of tests are already run by other jobs
ctest --output-on-failure -C ${{ matrix.build_type }} -R "matlab" -VV .
ctest --output-on-failure -C ${{ matrix.build_type }} -R "matlab" -VV .
- name: Install [Conda]
run: |
cd build
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
swig \
libxml2-dev \
libassimp-dev \
libirrlicht-dev
libirrlicht-dev \
libglfw3-dev
pip install build
- name: Build sdist
Expand Down Expand Up @@ -94,12 +95,12 @@ jobs:
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_BUILD: cp37-*manylinux*_x86_64 cp38-*manylinux*_x86_64 cp39-*manylinux*_x86_64 cp310-*manylinux*_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24
CIBW_ENVIRONMENT_LINUX: AUDITWHEEL_PLAT=manylinux_2_24_x86_64
CIBW_BUILD: cp37-*manylinux*_x86_64 cp38-*manylinux*_x86_64 cp39-*manylinux*_x86_64 cp310-*manylinux*_x86_64 cp311-*manylinux*_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_ENVIRONMENT_LINUX: AUDITWHEEL_PLAT=manylinux_2_28_x86_64
CIBW_BEFORE_BUILD_LINUX: |
apt-get update &&\
apt-get install -y libeigen3-dev libassimp-dev libxml2-dev coinor-libipopt-dev libirrlicht-dev
dnf update -y &&\
dnf install -y eigen3-devel libxml2-devel
CIBW_TEST_COMMAND: "python -c 'import idyntree.bindings'"

- uses: actions/upload-artifact@v3
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [8.999.0] - 2023-03-05
## [9.1.0] - 2023-05-25

### Added

- Added optional dependency on [meshcat-cpp](https://github.com/ami-iit/meshcat-cpp) (https://github.com/robotology/idyntree/pull/1074).
- Added `iDynTree::MeshcatVisualizer` C++ class (https://github.com/robotology/idyntree/pull/1074).

### Fixed

- Fixed the `iDynTree::Visualizer` class to work on macOS, after it was broken in 9.0.0 . To do so, now the compilation with `IDYNTREE_USES_IRRLICHT` set to `ON` on macOS requires irrlicht to be compiled with SDL support (https://github.com/robotology/idyntree/issues/1076, https://github.com/robotology/idyntree/pull/1077).

## [9.0.0] - 2023-05-11

### Fixed
- Fix export of `iDynTree::PrismaticJoint` in `iDynTree::getRandomModel` (https://github.com/robotology/idyntree/pull/1057).

### Changed

- Binary wheels available on PyPI now target `manylinux_2_28`, and the options `IDYNTREE_USES_ASSIMP`, `IDYNTREE_USES_IPOPT` and `IDYNTREE_USES_IRRLICHT` are disable in binary wheels on PyPI. If you need these options enabled, please use conda-forge binaries or build iDynTree from source (https://github.com/robotology/idyntree/pull/1068).
- Compilation with `IDYNTREE_USES_IRRLICHT` set to `ON` now requires `glfw` library. Furthermore, now `IDYNTREE_USES_IRRLICHT` on Windows requires irrlicht to be compiled with SDL support. This changes have been done to support resizable visualizer windows on Windows (https://github.com/robotology/idyntree/issues/1070, https://github.com/robotology/idyntree/pull/1071).
- Use iDynTree::InverseKinematicsRotationParametrizationRollPitchYaw as default parametrization in iDynTree::InverseKinematics (https://github.com/robotology/idyntree/pull/1058).

#### URDF XML parser change
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

cmake_minimum_required(VERSION 3.16)

project(iDynTree VERSION 8.999.0
project(iDynTree VERSION 9.1.0
LANGUAGES C CXX)

# Disable in source build, unless Eclipse is used
Expand Down
Loading

0 comments on commit 7997e51

Please sign in to comment.