From 1d4c4b86dcc0559e13536ef4e886ab5c50aae0a3 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 18 Sep 2024 16:54:04 +0200 Subject: [PATCH 1/3] Document the new prefix.dev robotology channel mirror --- doc/conda-forge.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/conda-forge.md b/doc/conda-forge.md index 691a587fe..e8b2b48a9 100644 --- a/doc/conda-forge.md +++ b/doc/conda-forge.md @@ -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: @@ -63,24 +63,24 @@ 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 +conda install -c conda-forge -c https://repo.prefix.dev/robotology ~~~ 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: @@ -88,6 +88,14 @@ If you want to develop some C++ code on the top of these libraries, it is recomm 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 July 2022 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. From 94869434badf92f071d7a12f0fd1d0633649e4c6 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 18 Sep 2024 17:10:24 +0200 Subject: [PATCH 2/3] Upload conda packages for robotology channel on both anaconda.org and prefix.dev --- .../workflows/generate-conda-packages.yaml | 19 ++++++++++++++++++- doc/conda-forge.md | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-conda-packages.yaml b/.github/workflows/generate-conda-packages.yaml index 8ecd4c9a0..fe89b786b 100644 --- a/.github/workflows/generate-conda-packages.yaml +++ b/.github/workflows/generate-conda-packages.yaml @@ -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) @@ -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') @@ -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, diff --git a/doc/conda-forge.md b/doc/conda-forge.md index e8b2b48a9..1cb749a4f 100644 --- a/doc/conda-forge.md +++ b/doc/conda-forge.md @@ -94,7 +94,7 @@ 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 July 2022 are not available, so if you only care for the latest packages, you can also install packages by simply passing `-c robotology` to conda. +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 From b4f51b3949f384351c5f34f2fe32fca1fe388193 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 18 Sep 2024 17:16:09 +0200 Subject: [PATCH 3/3] Bump CONDA_BUILD_NUMBER to 132 --- conda/cmake/CondaGenerationOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/cmake/CondaGenerationOptions.cmake b/conda/cmake/CondaGenerationOptions.cmake index 92e4abf1f..76f7ba16e 100644 --- a/conda/cmake/CondaGenerationOptions.cmake +++ b/conda/cmake/CondaGenerationOptions.cmake @@ -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