conda/build¶
Configures a job to build a package using conda-build.
Description¶
This component configures a job to build a Conda package using Conda-build by creating a conda-forge feedstock and leveraging the conda-forge build configuration.
Usage¶
include:
- component: git.ligo.org/computing/gitlab/components/conda/build@<VERSION>
inputs:
recipe_dir: conda/
Inputs¶
| Input | Default value | Description |
|---|---|---|
conda_build_config | "" | The conda-forge build config to use (e.g. linux_64_) |
conda_build_options | "" | Extra options to pass to conda build |
job_name | conda_build | The name to give the build job |
needs | [] | List of jobs whose artifacts are needed for this job |
recipe_dir | Path of directory containing meta.yaml | |
stage | build | The pipeline stage to add jobs to |
Customisation¶
.condarc¶
The behaviour of conda and conda-build can be manipulated via a .condarc file in the root of the project repository.
For details on using the .condarc configuration file, see here.
Examples¶
Build a conda package¶
To build a conda package directly from the project using a recipe stored in the project, add the conda/build component as follows:
Build a conda package using conda-build
include:
- component: git.ligo.org/computing/gitlab/components/conda/build@<VERSION>
inputs:
recipe_dir: conda/
conda_build_options: "--error-overdepending"
See the recipe in the computing/gitlab/components/conda project for a working example.
Building multiple packages from a monorepo¶
The same component can be included multiple times in the same pipeline with different inputs to build multiple subpackages of a monorepo, e.g:
Build multiple packages for a monorepo
stages:
- package1
- package2
- package3
include:
- component: git.ligo.org/computing/gitlab/components/conda/build@<VERSION>
inputs:
stage: package1
recipe_dir: package1/conda
job_name: conda_build-package1
- component: git.ligo.org/computing/gitlab/components/conda/build@<VERSION>
inputs:
stage: package2
recipe_dir: package2/conda
job_name: conda_build-package2
needs: [conda_build-package1]
- component: git.ligo.org/computing/gitlab/components/conda/build@<VERSION>
inputs:
stage: package3
recipe_dir: package3/conda
job_name: conda_build-package3
needs:
- conda_build-package1
- conda_build-package2