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

Fix generate-conda-packages job #1576

Merged
merged 3 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ci/initial-cache.gh.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Dependencies options
set(ROBOTOLOGY_USES_GAZEBO ON CACHE BOOL "")
set(ROBOTOLOGY_USES_MUJOCO ON CACHE BOOL "")
# ROBOTOLOGY_USES_MUJOCO is not really used as of January 2024
set(ROBOTOLOGY_USES_MUJOCO OFF CACHE BOOL "")
set(ROBOTOLOGY_USES_PCL_AND_VTK ON CACHE BOOL "")

# Octave is not supported on Windows or on Conda
Expand Down
3 changes: 2 additions & 1 deletion cmake/BuildICUB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ ycm_ep_helper(ICUB TYPE GIT
${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)
Expand All @@ -118,7 +119,7 @@ if(ROBOTOLOGY_USES_ESDCAN)
endif()

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

if(ROBOTOLOGY_USES_PYTHON)
Expand Down
7 changes: 7 additions & 0 deletions conda/cmake/RobotologySuperbuildGenerateCondaRecipes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ macro(generate_metametadata_file)
endforeach()
endif()

if(NOT "${${_cmake_pkg}_CONDA_BUILD_DEPENDENCIES_EXPLICIT}" STREQUAL "")
string(APPEND metametadata_file_contents " build_dependencies_explicit:\n")
foreach(_build_dep IN LISTS ${_cmake_pkg}_CONDA_BUILD_DEPENDENCIES_EXPLICIT)
string(APPEND metametadata_file_contents " - ${_build_dep}\n")
endforeach()
endif()

if(NOT "${${_cmake_pkg}_CONDA_ENTRY_POINTS}" STREQUAL "")
string(APPEND metametadata_file_contents " entry_points:\n")
foreach(_entry_point IN LISTS ${_cmake_pkg}_CONDA_ENTRY_POINTS)
Expand Down
2 changes: 2 additions & 0 deletions conda/cmake_recipe_template/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ requirements:
- cmake
- pkg-config
- ninja
{% for build_dep in build_dependencies_explicit %} - {{ build_dep }}
{% endfor %}
{# Handle specific packages required for gl on Linux, see https://conda-forge.org/docs/maintainer/knowledge_base.html?#libgl #}
{# libxcb, libxfixes, libxau and expat are not documented anywhere, but without those blocktest does not build correctly #}
{% if require_opengl_linux %}{% raw %} - {{ cdt('mesa-libgl-devel') }}
Expand Down
6 changes: 6 additions & 0 deletions conda/conda_build_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ qt:

qt_main:
- 5.15

# Workaround for:
# * https://github.com/robotology/robotology-superbuild/pull/1574#issuecomment-1898498891
# * https://github.com/robotology/robotology-superbuild/issues/1572#issuecomment-1911740644
swig:
- 4.1.0
1 change: 1 addition & 0 deletions doc/developers-faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ This action will automatically perform the following steps:
| `<pkg>_CONDA_PKG_NAME` | The name that will be used for the conda package name. The convention is to use lowercase names separated by dashes. | The name of the github repo of the package. |
| `<pkg>_CONDA_DEPENDENCIES` | The list of conda-forge dependencies required by this package. Note that dependencies managed by the robotology-superbuild should not be listed, as those are handled automatically. | The default value is empty. |
| `<pkg>_CONDA_RUN_DEPENDENCIES_EXPLICIT` | The list of conda-forge run dependencies required by this package. Note that most C++ dependencies are not required as they have run_exports to automatically handle this, but this may be required for Python dependencies. | The default value is empty. |
| `<pkg>_CONDA_BUILD_DEPENDENCIES_EXPLICIT` | The list of conda-forge build dependencies required by this package. Note that it is not necessary to explicitly add C/C++ compilers, `cmake`, `ninja`, `pkg-config` and `make`, as they are added automatically. |
| `<pkg>_CONDA_VERSION` | The version that will be used for the conda package, by default it is not set as the value from the tag will be extracted. | The default value is to use the value of the tag, removing any occurence of the `v` letter. |
| `<pkg>_CONDA_ENTRY_POINTS` | This option permits to specify explicitly the entry_points used by a pure_python package (see https://github.com/robotology/robotology-superbuild/issues/1105). | Empty. |

Expand Down
Loading