Skip to content

Commit

Permalink
Merge branch 'master' into addyarpros
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Oct 10, 2024
2 parents 51e420f + e081c9d commit ce19622
Show file tree
Hide file tree
Showing 32 changed files with 435 additions and 170 deletions.
4 changes: 1 addition & 3 deletions .ci/initial-cache.gh.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ if(NOT WIN32 OR DEFINED ENV{CONDA_PREFIX})
endif()

# Profiles options
if(NOT (APPLE AND ($ENV{RUNNER_ARCH} STREQUAL "ARM64")))
set(ROBOTOLOGY_ENABLE_ROBOT_TESTING ON CACHE BOOL "")
endif()
set(ROBOTOLOGY_ENABLE_ROBOT_TESTING ON CACHE BOOL "")
set(ROBOTOLOGY_ENABLE_ICUB_HEAD ON CACHE BOOL "")
set(ROBOTOLOGY_ENABLE_DYNAMICS ON CACHE BOOL "")
# ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS is only supported on Windows with conda
Expand Down
68 changes: 48 additions & 20 deletions .github/workflows/generate-conda-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
include:
- os: ubuntu-20.04
conda_platform: linux-64
- os: macos-11.0
conda_platform: osx-64
- os: macos-14
conda_platform: osx-arm64
- os: windows-2019
conda_platform: win-64

Expand All @@ -79,11 +79,11 @@ jobs:
- name: Install files to enable compilation of mex files [Conda/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
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')
Expand All @@ -98,7 +98,7 @@ jobs:
- name: Dependencies for conda recipes generation and upload
shell: bash -l {0}
run: |
conda install pyyaml jinja2 conda-build ninja anaconda-client conda-forge-pinning mamba boa multisheller
conda install pyyaml jinja2 conda-build ninja anaconda-client conda-forge-pinning mamba boa multisheller pixi
- name: Print used environment
shell: bash -l {0}
Expand Down Expand Up @@ -180,18 +180,8 @@ jobs:
# specifically because we can't use --skip-existing as these packages are part of the robotology channel
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml icub-contrib-common
rm -rf icub-contrib-common
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml icub-firmware-shared
rm -rf icub-firmware-shared
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml robots-configuration
rm -rf robots-configuration
# icub-main needs robotology channel as it also depends on esdcan, and local to avoid that robotology packages are used instead of local built one
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml -c local -c conda-forge -c robotology icub-main
rm -rf icub-main
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml wearables
rm -rf wearables
# Channels specified explicitly due to https://github.com/robotology/robotology-superbuild/issues/1140
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml -c local -c conda-forge human-dynamics-estimation
rm -rf human-dynamics-estimation
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml robot-log-visualizer
rm -rf robot-log-visualizer
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml idyntree-matlab-bindings
Expand All @@ -206,26 +196,31 @@ jobs:
rm -rf blocktest
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml .
- name: Build conda metapackages (if necessary)
- name: Build robotology-distro conda metapackage (if necessary)
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_metapackages_generation == 'true')
shell: bash -l {0}
run: |
cd build/conda/generated_recipes_metapackages
# Debug generated recipes
cat */meta.yaml
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml -c local -c conda-forge -c robotology robotology-distro
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml -c local -c conda-forge -c robotology robotology-distro-all
- name: Upload conda packages
shell: bash -l {0}
# Upload by default on schedule events, and on workflow dispatch only if input upload_conda_binaries is 'true'
if: github.event_name == 'schedule' || github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_conda_binaries == 'true')
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
PREFIX_DEV_TOKEN: ${{ secrets.PREFIX_DEV_TOKEN }}
run: |
cd ${CONDA_BLD_PATH}/${{ matrix.conda_platform}}/
ls *.tar.bz2
anaconda upload --skip-existing *.tar.bz2
pixi auth login https://prefix.dev --token $PREFIX_DEV_TOKEN
for condapackage in *.tar.bz2; do
pixi upload https://prefix.dev/api/v1/upload/robotology "$condapackage"
done
pixi auth logout https://prefix.dev
# Only on linux-64 we upload noarch packages (noarch packages need to be uploaded only once, as they can be reused across platforms)
- name: Upload conda packages (noarch)
Expand All @@ -234,10 +229,43 @@ jobs:
if: matrix.conda_platform == 'linux-64' && (github.event_name == 'schedule' || github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_conda_binaries == 'true'))
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
PREFIX_DEV_TOKEN: ${{ secrets.PREFIX_DEV_TOKEN }}
run: |
cd ${CONDA_BLD_PATH}/noarch/
ls *.tar.bz2
anaconda upload --skip-existing *.tar.bz2
pixi auth login https://prefix.dev --token $PREFIX_DEV_TOKEN
for condapackage in *.tar.bz2; do
pixi upload https://prefix.dev/api/v1/upload/robotology "$condapackage"
done
pixi auth logout https://prefix.dev
- name: Build robotology-distro-all conda metapackage (if necessary)
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_metapackages_generation == 'true')
shell: bash -l {0}
run: |
cd build/conda/generated_recipes_metapackages
# Debug generated recipes
cat */meta.yaml
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml -c local -c conda-forge -c robotology robotology-distro-all
- name: Upload robotology-distro-all metapackage
shell: bash -l {0}
# Upload by default on schedule events, and on workflow dispatch only if input upload_conda_binaries is 'true'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_metapackages_generation == 'true' && github.event.inputs.upload_conda_binaries == 'true')
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
PREFIX_DEV_TOKEN: ${{ secrets.PREFIX_DEV_TOKEN }}
run: |
cd ${CONDA_BLD_PATH}/${{ matrix.conda_platform}}/
ls robotology-distro-all-*.tar.bz2
anaconda upload --skip-existing robotology-distro-all-*.tar.bz2
pixi auth login https://prefix.dev --token $PREFIX_DEV_TOKEN
for condapackage in robotology-distro-all-*.tar.bz2; do
pixi upload https://prefix.dev/api/v1/upload/robotology "$condapackage"
done
pixi auth logout https://prefix.dev

# If the generate-conda-packages completed correctly and binaries are uploaded,
# bump automatically the CONDA_BUILD_NUMBER in conda/cmake/CondaGenerationOptions.cmake
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/generate-non-periodical-conda-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
include:
- os: ubuntu-20.04
conda_platform: linux-64
- os: macos-11.0
conda_platform: osx-64
- os: macos-14
conda_platform: osx-arm64
- os: windows-2019
conda_platform: win-64

Expand All @@ -36,7 +36,7 @@ jobs:
- name: Dependencies for conda recipes generation and upload
shell: bash -l {0}
run: |
conda install pyyaml jinja2 conda-build ninja anaconda-client conda-forge-pinning mamba boa multisheller
conda install pyyaml jinja2 conda-build ninja anaconda-client conda-forge-pinning mamba boa multisheller pixi
- name: Print used environment
shell: bash -l {0}
Expand Down Expand Up @@ -64,7 +64,13 @@ jobs:
if: (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_conda_binaries == 'true')
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
PREFIX_DEV_TOKEN: ${{ secrets.PREFIX_DEV_TOKEN }}
run: |
cd ${CONDA_PREFIX}/conda-bld/${{ matrix.conda_platform}}/
ls *.tar.bz2
anaconda upload --skip-existing *.tar.bz2
pixi auth login https://prefix.dev --token $PREFIX_DEV_TOKEN
for condapackage in *.tar.bz2; do
pixi upload https://prefix.dev/api/v1/upload/robotology "$condapackage"
done
pixi auth logout https://prefix.dev
2 changes: 1 addition & 1 deletion .github/workflows/pixi-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: prefix-dev/[email protected]

- name: Build
shell: bash -l {0}
shell: bash
run: |
# Avoid YCM complaining that the git user is not set
# Eventually we could consider removing that check in YCM
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ endmacro()
include(RobotologySuperbuildOptions)

# Python-related logic
if(ROBOTOLOGY_USES_PYTHON)
if(ROBOTOLOGY_USES_PYTHON AND NOT ROBOTOLOGY_GENERATE_CONDA_RECIPES)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
if(Python3_VERSION VERSION_GREATER_EQUAL 3.12)
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import os;import sysconfig;relative_site_packages = sysconfig.get_path('purelib').replace(sysconfig.get_path('data'), '').lstrip(os.path.sep);print(relative_site_packages)"
Expand Down
30 changes: 25 additions & 5 deletions cmake/BuildHumanDynamicsEstimation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,29 @@ include(FindOrBuildPackage)
find_or_build_package(YARP QUIET)
find_or_build_package(ICUB QUIET)
find_or_build_package(iDynTree QUIET)
find_or_build_package(wearables QUIET)
find_or_build_package(osqp QUIET)
find_or_build_package(OsqpEigen QUIET)
find_or_build_package(robometry QUIET)

# For what regards Python installation, the options changes depending
# on whether we are installing HDE in the superbuild, or generating a
# conda package
# See https://github.com/robotology/robotology-superbuild/issues/641
set(HDE_OPTIONAL_CMAKE_ARGS "")
if(ROBOTOLOGY_USES_PYTHON)
if (NOT ROBOTOLOGY_GENERATE_CONDA_RECIPES)
# If we are not generating a conda recipe, the bindings need to go in the ROBOTOLOGY_SUPERBUILD_PYTHON_INSTALL_DIR
list(APPEND HDE_OPTIONAL_CMAKE_ARGS "-DHDE_PYTHON_INSTALL_DIR=${ROBOTOLOGY_SUPERBUILD_PYTHON_INSTALL_DIR}")
else()
# If we are building a conda package, the active environment is the correct place were to install the python bindings
list(APPEND HDE_OPTIONAL_CMAKE_ARGS "-DHDE_DETECT_ACTIVE_PYTHON_SITEPACKAGES:BOOL=ON")
endif()
endif()


if(WIN32)
list(APPEND HDE_OPTIONAL_CMAKE_ARGS -DXSENS_MVN_USE_SDK:BOOL=${ROBOTOLOGY_USES_XSENS_MVN_SDK} -DENABLE_XsensSuit:BOOL=${ROBOTOLOGY_USES_XSENS_MVN_SDK} )
endif()

if(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS)
find_or_build_package(yarp-ros QUIET)
Expand All @@ -22,13 +42,13 @@ ycm_ep_helper(HumanDynamicsEstimation TYPE GIT
TAG master
COMPONENT human_dynamics
FOLDER src
CMAKE_ARGS -DHUMANSTATEPROVIDER_ENABLE_VISUALIZER:BOOL=ON
CMAKE_ARGS -DHUMANSTATEPROVIDER_ENABLE_VISUALIZER:BOOL=ON -DHDE_COMPILE_PYTHON_BINDINGS:BOOL=${ROBOTOLOGY_USES_PYTHON} ${HDE_OPTIONAL_CMAKE_ARGS}
DEPENDS iDynTree
YARP
wearables
osqp
OsqpEigen
ICUB
${HumanDynamicsEstimation_OPTIONAL_DEPS})
robometry)

set(HumanDynamicsEstimation_CONDA_DEPENDENCIES eigen)
set(HumanDynamicsEstimation_CONDA_PKG_NAME human-dynamics-estimation)
set(HumanDynamicsEstimation_CONDA_PKG_CONDA_FORGE_OVERRIDE ON)
32 changes: 2 additions & 30 deletions cmake/BuildICUB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,33 +104,5 @@ ycm_ep_helper(ICUB TYPE GIT
-DCREATE_LUA:BOOL=${ROBOTOLOGY_USES_LUA}
${ICUB_PYTHON_INSTALL_CMAKE_ARGS})

set(ICUB_CONDA_DEPENDENCIES ace libopencv gsl ipopt libode qt-main sdl)
set(ICUB_CONDA_BUILD_DEPENDENCIES_EXPLICIT)

if(NOT (APPLE OR WIN32))
list(APPEND ICUB_CONDA_DEPENDENCIES libdc1394)
endif()

if(NOT APPLE)
list(APPEND ICUB_CONDA_DEPENDENCIES freeglut)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND ICUB_CONDA_DEPENDENCIES libglu)
endif()

if(ROBOTOLOGY_USES_ESDCAN)
list(APPEND ICUB_CONDA_DEPENDENCIES esdcan)
endif()

if(ICUB_COMPILE_BINDINGS)
list(APPEND ICUB_CONDA_BUILD_DEPENDENCIES_EXPLICIT swig)
endif()

if(ROBOTOLOGY_USES_PYTHON)
list(APPEND ICUB_CONDA_DEPENDENCIES python)
endif()

if(ROBOTOLOGY_USES_LUA)
list(APPEND ICUB_CONDA_DEPENDENCIES lua)
endif()

set(ICUB_CONDA_PKG_NAME icub-main)
set(ICUB_CONDA_PKG_CONDA_FORGE_OVERRIDE ON)
2 changes: 1 addition & 1 deletion cmake/Buildblocktest-yarp-plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ ycm_ep_helper(blocktest-yarp-plugins TYPE GIT
${blocktest-yarp-plugins_OPTIONAL_DEPS}
CMAKE_ARGS -DENABLE_MSVC_WARNINGS:BOOL=OFF)

set(blocktest-yarp-plugins_CONDA_DEPENDENCIES boost-cpp)
set(blocktest-yarp-plugins_CONDA_DEPENDENCIES libboost-devel)
2 changes: 1 addition & 1 deletion cmake/Buildblocktestcore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ ycm_ep_helper(blocktestcore TYPE GIT
CMAKE_ARGS -DENABLE_MSVC_WARNINGS:BOOL=OFF
DEPENDS YCM)

set(blocktestcore_CONDA_DEPENDENCIES qt-main boost-cpp)
set(blocktestcore_CONDA_DEPENDENCIES qt-main libboost-devel)
10 changes: 3 additions & 7 deletions cmake/Buildcasadi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ endif()

ycm_ep_helper(casadi TYPE GIT
STYLE GITHUB
REPOSITORY ami-iit/casadi.git
TAG 3.6.5.backport3724
REPOSITORY casadi/casadi.git
TAG 3.6.7
COMPONENT external
FOLDER src
CMAKE_ARGS -DWITH_IPOPT:BOOL=ON
Expand All @@ -55,8 +55,4 @@ ycm_ep_helper(casadi TYPE GIT

set(casadi_CONDA_PKG_NAME casadi)
set(casadi_CONDA_PKG_CONDA_FORGE_OVERRIDE ON)
# This is a small hack. To avoid incompatibilities between the version tagged in the ami-iit fork
# and the version available in conda-forge when generating conda metapackages
# such as robotology-distro and robotology-distro-all, we override the conda package version of casadi
# here. This needs to be removed as soon as we stop use our fork in the superbuild
set(casadi_CONDA_VERSION 3.6.5)

2 changes: 1 addition & 1 deletion cmake/BuildiDynTree.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(iDynTree_DEPENDS "")
list(APPEND iDynTree_DEPENDS OsqpEigen)

# For what regards Python installation, the options changes depending
# on whether we are installing YARP from source, or generating a
# on whether we are installing iDynTree from source, or generating a
# conda package on Windows as in that case the installation location
# will need to be outside of CMAKE_INSTALL_PREFIX
# See https://github.com/robotology/robotology-superbuild/issues/641
Expand Down
3 changes: 3 additions & 0 deletions cmake/Buildicub_firmware_shared.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ ycm_ep_helper(icub_firmware_shared TYPE GIT
COMPONENT iCub
FOLDER src
DEPENDS YCM)

set(icub_firmware_shared_CONDA_PKG_NAME icub-firmware-shared)
set(icub_firmware_shared_CONDA_PKG_CONDA_FORGE_OVERRIDE ON)
38 changes: 0 additions & 38 deletions cmake/Buildwearables.cmake

This file was deleted.

8 changes: 4 additions & 4 deletions cmake/ProjectsTagsStable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ set_tag(osqp_REPOSITORY robotology-dependencies/osqp.git)
set_tag(osqp_TAG v0.6.3.1)
set_tag(manif_TAG 0.0.5)
set_tag(qhull_TAG 2020.2)
set_tag(CppAD_TAG 20240000.2)
set_tag(proxsuite_TAG v0.6.4)
set_tag(casadi_TAG 3.6.5.backport3724)
set_tag(casadi-matlab-bindings_TAG v3.6.5.0)
set_tag(CppAD_TAG 20240000.7)
set_tag(proxsuite_TAG v0.6.7)
set_tag(casadi_TAG 3.6.7)
set_tag(casadi-matlab-bindings_TAG v3.6.7.0)

# Robotology projects
set_tag(YCM_TAG master)
Expand Down
Loading

0 comments on commit ce19622

Please sign in to comment.