Skip to content

Commit

Permalink
generate-conda-packages: Use conda-forge-pinning conda_build_config.y…
Browse files Browse the repository at this point in the history
…aml (#710)
  • Loading branch information
traversaro authored May 6, 2021
1 parent 474bd7d commit fb89c96
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/generate-conda-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Dependencies for conda recipes generation and upload
shell: bash -l {0}
run: |
mamba install pyyaml jinja2 conda-build ninja anaconda-client
mamba install pyyaml jinja2 conda-build ninja anaconda-client conda-forge-pinning
python -m pip install git+https://github.com/wolfv/multisheller.git@0cc03c68d0c68d2f9cf7b07ddb68afa531419a6d
- name: Generate recipes [Linux&macOS]
Expand Down Expand Up @@ -104,7 +104,9 @@ jobs:
shell: bash -l {0}
run: |
cd build/conda/generated_recipes
conda build -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml .
# 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
conda build -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml .
- name: Upload conda packages
shell: bash -l {0}
Expand Down
4 changes: 4 additions & 0 deletions conda/conda_build_config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# bipedal-locomotion-framework requires 10.13 for std::bad_cast_any
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
- 10.13 # [osx and x86_64]

# Pin opencv 4.5.1 to as a workaround for https://github.com/robotology/robotology-superbuild/issues/711
opencv:
- 4.5.1
12 changes: 10 additions & 2 deletions doc/conda-recipe-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To generate the conda recipes for a given configuration of the `robotology-super

After that, install the additional dependencies required for the recipe generation:
~~~
conda install pyyaml jinja2 conda-build ninja anaconda-client
conda install pyyaml jinja2 conda-build ninja anaconda-client conda-forge-pinning
python -m pip install git+https://github.com/wolfv/multisheller.git@0cc03c68d0c68d2f9cf7b07ddb68afa531419a6d
~~~

Expand All @@ -25,7 +25,15 @@ for building projects of the `robotology-superbuild`, and instead will generate
-- Generating done
-- Build files have been written to: C:/src/robotology-superbuild/build-conda
~~~
you can then build the generated recipes by moving in the `<build_dir>/conda/generated_recipes` directory and running either [`conda build .`](https://github.com/conda/conda-build) or [`boa .`](https://github.com/mamba-org/boa).
you can then build the generated recipes. To build the generate recipes, you can move in the `<build_dir>/conda/generated_recipes` directory and run the appropriate build command using [`conda build`](https://github.com/conda/conda-build) :
~~~
cd <build_dir>/conda/generated_recipes
conda build -m ${CONDA_PREFIX}/conda_build_config.yaml -m <src_dir>/conda/conda_build_config.yml .
~~~
The `-m` option specifies the additional [build configuration files that are used for conda-build](https://docs.conda.io/projects/conda-build/en/latest/resources/variants.html#creating-conda-build-variant-config-files). In particular, we use two `conda_build_config` files.
The first one is the standard one of conda-forge, installed via the [`conda-forge-pinning`](https://github.com/conda-forge/conda-forge-pinning-feedstock) package,
and that is used to ensure compatibility with conda-forge binaries. The second is a local file, that is used to specify setting specific to the `robotology` channel.


Note that the generated recipes will depend on the specific configuration of the robotology-superbuild used, so enabling additional profiles will generate recipes
for the packages contained in those profiles. For this reason, the generated recipes in general are not cross-platform. For example the recipes generated on `Linux` could contain Linux-specific CMake options passed to the projects, so may not be usable on Windows.
Expand Down

0 comments on commit fb89c96

Please sign in to comment.