Skip to content

Commit

Permalink
Suggest to use conda and miniforge instead of mamba and mambaforge (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored May 27, 2024
1 parent 102e714 commit b182e9d
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 113 deletions.
54 changes: 24 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ on:
types: [published]
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:
conda-build:
conda-build:
name: '[conda:Tags:${{ matrix.project_tags }}@${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -39,25 +39,19 @@ jobs:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
if: matrix.os != 'macos-14'
with:
miniforge-variant: Mambaforge
miniforge-variant: Miniforge3
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')
if: contains(matrix.os, 'ubuntu')
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 [Conda/macOS Intel]
if: matrix.os == 'macos-12'
run: |
Expand All @@ -77,7 +71,7 @@ jobs:
echo "GHA_Matlab_MEX_EXTENSION=mexmaca64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/Windows]
if: contains(matrix.os, '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
Expand All @@ -91,37 +85,37 @@ jobs:
shell: bash -l {0}
run: |
# Dependencies
mamba install ace
conda install ace
- name: Dependencies [Conda]
shell: bash -l {0}
run: |
# Dependencies
mamba install asio assimp boost eigen freetype gazebo gz-sim8 glew glfw glm graphviz 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==6.*" 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 pyqtwebengine qtpy pyyaml
conda install asio assimp boost eigen freetype gazebo gz-sim8 glew glfw glm graphviz 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==6.*" onnxruntime-cpp
# Python
conda install python numpy swig==4.1.0 pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython gst-plugins-good gst-plugins-bad pyqtwebengine qtpy pyyaml
# Additional dependencies useful only on Linux
- name: Dependencies [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
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 bash-completion freeglut libdc1394 libi2c libselinux-cos7-x86_64 xorg-libxau libxcb xorg-libxdamage xorg-libxext xorg-libxfixes xorg-libxxf86vm xorg-libxrandr mesa-libgl-cos7-x86_64 mesa-libgl-devel-cos7-x86_64 libxshmfence-cos7-x86_64 libxshmfence-devel-cos7-x86_64
conda install bash-completion freeglut libdc1394 libi2c libselinux-cos7-x86_64 xorg-libxau libxcb xorg-libxdamage xorg-libxext xorg-libxfixes xorg-libxxf86vm xorg-libxrandr mesa-libgl-cos7-x86_64 mesa-libgl-devel-cos7-x86_64 libxshmfence-cos7-x86_64 libxshmfence-devel-cos7-x86_64
# Additional dependencies useful only on Windows
- name: Dependencies [Conda/Windows]
if: contains(matrix.os, 'windows')
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
# Additional dependencies only useful on Windows
mamba install -c conda-forge -c robotology esdcan freeglut
conda install -c conda-forge -c robotology esdcan freeglut
- name: Print used environment [Conda]
shell: bash -l {0}
run: |
mamba list
conda list
env
- name: Set CMake generator [Conda/Linux and macOs]
Expand Down Expand Up @@ -166,7 +160,7 @@ jobs:
shell: bash -l {0}
run: |
rm -rf /c/Strawberry
- name: Build [Conda]
shell: bash -l {0}
run: |
Expand Down Expand Up @@ -292,9 +286,9 @@ jobs:
project_tags_cmake_options: "-DROBOTOLOGY_PROJECT_TAGS=Custom -DROBOTOLOGY_PROJECT_TAGS_CUSTOM_FILE=${GITHUB_WORKSPACE}/releases/latest.releases.yaml"
steps:
- uses: actions/checkout@master

- name: Install files to enable compilation of mex files [Linux]
if: contains(matrix.os, 'ubuntu')
if: contains(matrix.os, 'ubuntu')
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020b_mexa64.zip
unzip msdk_R2020b_mexa64.zip
Expand All @@ -308,14 +302,14 @@ jobs:
run: |
ls /d/
cp -r ${GITHUB_WORKSPACE} /c/
- name: Define ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
- name: Define ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
if: contains(matrix.os, 'windows')
shell: bash
run: |
echo "ROBOTOLOGY_SUPERBUILD_SOURCE_DIR=/c/robotology-superbuild" >> $GITHUB_ENV
- name: Define ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
- name: Define ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
Expand Down Expand Up @@ -365,7 +359,7 @@ jobs:
if: contains(matrix.os, 'windows')
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
# To avoid spending a huge time compiling vcpkg dependencies, we download an archive that comes precompiled with all the ports that we need
# To avoid spending a huge time compiling vcpkg dependencies, we download an archive that comes precompiled with all the ports that we need
choco install -y wget unzip
# To avoid problems with non-relocatable packages, we unzip the archive exactly in the same directory
# that has been used to create the pre-compiled archive
Expand Down Expand Up @@ -423,7 +417,7 @@ jobs:
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd build
cd build
# Make sure that vcpkg's ace .dll are on the PATH
source /c/robotology/scripts/setup-deps.sh
cmake --build . --config Release
Expand All @@ -434,7 +428,7 @@ jobs:
if: contains(matrix.os, 'windows')
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd build
# Make sure that vcpkg's ace .dll are on the PATH
source /c/robotology/scripts/setup-deps.sh
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/generate-conda-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-variant: Miniforge3
miniforge-version: latest

- name: Install files to enable compilation of mex files [Conda/Linux]
Expand Down Expand Up @@ -99,12 +99,12 @@ jobs:
- name: Dependencies for conda recipes generation and upload
shell: bash -l {0}
run: |
mamba 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
- name: Print used environment
shell: bash -l {0}
run: |
mamba list
conda list
env
- name: Generate recipes [Linux&macOS]
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
cat */build.sh
# We use the conda_build_config from conda-forge-pinning, and our local one
# See https://docs.conda.io/projects/conda-build/en/latest/resources/variants.html#creating-conda-build-variant-config-files
# We manually specify the build order as conda build is too slow, and conda mambabuild does not support correctly multiple recipes
# We manually specify the build order as an old workaround for mambabuild, in theory this can be avoided, but it needs to be tested
# see https://github.com/mamba-org/boa/issues/117
# We also manually delete the recipe directory to avoid that it is built again,
# specifically because we can't use --skip-existing as these packages are part of the robotology channel
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
rm -rf wb-toolbox
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml blocktest
rm -rf blocktest
conda build -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml .
conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml .
- name: Build conda metapackages (if necessary)
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_metapackages_generation == 'true')
Expand Down
4 changes: 2 additions & 2 deletions doc/cmake-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ sudo bash ./scripts/install_apt_python_dependencies.sh
#### Conda
To install python and the other required dependencies when using `conda-forge` provided dependencies, use:
~~~
mamba install -c conda-forge python numpy swig==4.1.0 pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython
conda install -c conda-forge python numpy swig==4.1.0 pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython
~~~
### Check the installation
Expand All @@ -380,7 +380,7 @@ The `ROBOTOLOGY_USES_ESDCAN` option is used to enable support for interacting wi
### System Dependencies
To compile the software enabled by the `ROBOTOLOGY_USES_ESDCAN` option (such as the `icub-main`'s [`ecan`](http://www.icub.org/software_documentation/classyarp_1_1dev_1_1EsdCan.html) YARP driver) you need to install the esd CAN C library.
To install this library in conda, just run `mamba install -c conda-forge -c robotology esdcan` inside your conda environment. If you installed `icub-main` from conda binary packages, the `ecan` YARP driver enabled by the `ROBOTOLOGY_USES_ESDCAN` option is already included.
To install this library in conda, just run `conda install -c conda-forge -c robotology esdcan` inside your conda environment. If you installed `icub-main` from conda binary packages, the `ecan` YARP driver enabled by the `ROBOTOLOGY_USES_ESDCAN` option is already included.
To actually run the software that uses the esd CAN devices, you also need to install the esd CAN Driver for your specific esd CAN device.
The installers for the esd CAN Driver should have been provided by esd, so ask for them to who provided you with the esd CAN device you want to use.
Expand Down
Loading

0 comments on commit b182e9d

Please sign in to comment.