Skip to content

Commit

Permalink
Merge pull request #1716 from robotology/documentprefixdevrobotology
Browse files Browse the repository at this point in the history
 Document the new prefix.dev robotology channel mirror  and upload new robotology conda packages to both anaconda.org and prefix.dev
  • Loading branch information
traversaro authored Sep 19, 2024
2 parents e17f45b + b4f51b3 commit 2821bd0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/generate-conda-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,16 @@ jobs:
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 @@ -233,10 +239,16 @@ 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')
Expand All @@ -253,11 +265,16 @@ jobs:
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,
Expand Down
2 changes: 1 addition & 1 deletion conda/cmake/CondaGenerationOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# to ensure that binaries belonging to different rebuilds
# can be distinguished even if the version number is the same
if(NOT CONDA_BUILD_NUMBER)
set(CONDA_BUILD_NUMBER 131)
set(CONDA_BUILD_NUMBER 132)
endif()

# This option is enabled only when the metapackages robotology-distro and robotology-distro-all are
Expand Down
18 changes: 13 additions & 5 deletions doc/conda-forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For an overview of advantages and disadvantages of conda and conda-forge, check

This section describes how to install the binary packages built from the `robotology-superbuild` on conda on Windows, macOS and Linux.

Depending on the speficic package, the binary packages are hosted either in [`conda-forge`](https://anaconda.org/conda-forge) or [`robotology`](https://anaconda.org/robotology). Only packages that are built as part of the profiles and options that are supported on Conda (see [documentation on CMake options](cmake-options.md)) are available as conda binary packages.
Depending on the speficic package, the binary packages are hosted either in [`conda-forge`](https://prefix.dev/channels/conda-forge) or [`robotology`](https://prefix.dev/channels/robotology) channels. Only packages that are built as part of the profiles and options that are supported on Conda (see [documentation on CMake options](cmake-options.md)) are available as conda binary packages.

The following conda platforms are supported by all packages of the robotology-superbuild:

Expand Down Expand Up @@ -63,31 +63,39 @@ conda activate robotologyenv

Once you are in an activated environment, you can install robotology packages by just running the command:
~~~
conda install -c conda-forge -c robotology <packagename>
conda install -c conda-forge -c https://repo.prefix.dev/robotology <packagename>
~~~

The list of available packages is available at https://anaconda.org/robotology/repo .

For example, if you want to install yarp and icub-main, you simple need to install:
~~~
conda install -c conda-forge -c robotology yarp icub-main
conda install -c conda-forge -c https://repo.prefix.dev/robotology yarp icub-main
~~~

In addition, if you want to simulate the iCub in Gazebo Classic, you should also install `icub-models` and `gazebo-yarp-plugins`:
~~~
conda install -c conda-forge -c robotology gazebo-yarp-plugins icub-models
conda install -c conda-forge gazebo-yarp-plugins icub-models
~~~

While if you want to simulate it with Modern Gazebo (gz-sim), you should install `icub-models` and `gz-sim-yarp-plugins`:
~~~
conda install -c conda-forge -c robotology gz-sim-yarp-plugins icub-models
conda install -c conda-forge gz-sim-yarp-plugins icub-models
~~~

If you want to develop some C++ code on the top of these libraries, it is recommended to also install the necessary compiler and development tools directly in the same environment:
~~~
conda install -c conda-forge compilers cmake pkg-config make ninja
~~~

### Advanced: robotology channel mirrors

To ensure redundancy, the `robotology` channel is available on two servers:
* [`prefix.dev`](https://prefix.dev/channels/robotology)
* [`anaconda.org`](https://anaconda.org/robotology/)

The full history of packages is available on the prefix.dev mirror, so if you aim for reproducibility, try to use the prefix.dev mirror by specifying the channel via `-c https://repo.prefix.dev/robotology`. On the anaconda.org, some packages built before 1st of January 2023 are not available, so if you only care for the latest packages, you can also install packages by simply passing `-c robotology` to conda.

## Source installation

This section describes how to compile and install the robotology-superbuild with conda-forge provided dependencies on Windows, macOS and Linux.
Expand Down

0 comments on commit 2821bd0

Please sign in to comment.