How to configure self-hosted runners
conda-forge has access to external CI resources that can provide GPU-equipped and/or long-running builds (beyond the usual 6h limit). If your package needs a GPU to be built or tested, or its compilation times are so long that they are currently done manually off-CI, you can request access to these runners.
Request access
Open a PR in conda-forge/admin-requests by following the instructions in the repository README.
Note you need to specify the type of resource you want access to (e.g. GPU runners, or long-running CPU builds). Once merged, this will enable the requested self-hosted Github Actions runners for your feedstock.
Configure your feedstock
- In
conda-forge.yml, ensure that theprovidersetting for the required build platform is set togithub_actions - In
recipe/conda_build_config.yaml, configure thegithub_actions_labelsfield to specify theruns-onvalue for each platform, using selectors as needed. The exact values depend on which runner type you requested and are listed in conda-forge/admin-requests.
Some of the usual automation infrastructure is not available for self-hosted runners:
- Due to security measurements imposed by Github, automated re-rendering is not possible when they modify Github Actions workflows.
You will need to rerender it manually by running
conda-smithy rerenderin your machine and then commit and push the result. - Automerge will not function properly either.
- The conda-forge bots may not be able to trigger the self-hosted runners.
- Closing and reopening the PR may not work, but a maintainer with sufficient permissions can trigger it manually by pushing an empty commit.
Prior to conda-smithy 3.57.0, conda-forge.yml needed a github_actions.self_hosted: true field in conda-forge.yml.
This is now deprecated and has no effect, so please remove it.
Example
For example, to configure a-custom-self-hosted-provider for linux-64:
provider:
linux_64: github_actions
linux_aarch64: github_actions
github_actions_labels:
- a-custom-self-hosted-provider # [linux64]
# absent value for linux-aarch64 means it will use the default; same as:
# - default # [linux and aarch64]
Then rerender.
Real world examples
Use this search query to find some real world examples in conda-forge.