Skip to content

Commit 1903abf

Browse files
authored
Merge pull request #2025 from isuruf/self-hosted-gha
Add docs for GHA self-hosted settings
2 parents 3e7789d + 2ef67a5 commit 1903abf

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

src/maintainer/conda_forge_yml.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Top-level fields
3737
* :ref:`conda_solver`
3838
* :ref:`docker`
3939
* :ref:`github`
40+
* :ref:`github_actions`
4041
* :ref:`idle_timeout_minutes`
4142
* :ref:`linux`
4243
* :ref:`linux_aarch64`
@@ -362,6 +363,50 @@ defaults are as follows:
362363
# conda-forge-ci-setup-feedstock references
363364
tooling_branch_name: main
364365
366+
.. _github_actions:
367+
368+
github_actions
369+
--------------
370+
This dictates the behavior of the Github Actions CI service. It is a
371+
mapping for GHA-specific configuration options. For example:
372+
373+
.. code-block:: yaml
374+
375+
github_actions:
376+
# Is the job using Microsoft hosted free runners or 'self-hosted'.
377+
self_hosted: false
378+
# triggers for actions. Defaults to `['push', 'pull_request']` for
379+
# Microsoft hosted free runners and `['push']` for self-hosted
380+
triggers: []
381+
# Timeout for CI jobs
382+
timeout_minutes: 360
383+
# Cancel in progress builds. Defaults to false for Microsoft hosted
384+
# free runner and true for self-hosted
385+
cancel_in_progress: None
386+
# Maximum number of parallel jobs per build.
387+
max_parallel: None
388+
# Retain build artifacts for inspection
389+
store_build_artifacts: false
390+
# Retention period for built artifacts
391+
artifact_retention_days: 14
392+
393+
For self-hosted runners ``recipe/conda_build_config.yaml`` is used for
394+
specifying labels for the runners.
395+
396+
.. code-block:: yaml
397+
398+
github_actions_labels:
399+
# use Microsoft free runners
400+
- hosted # [osx or win]
401+
# Use self-hosted runner with custom label
402+
- - self-hosted # [linux and aarch64]
403+
- custom-label # [linux and aarch64]
404+
# Use self-hosted runner from cirun
405+
- cirun-openstack-cpu-large # [linux and ppc64le]
406+
# Use self-hosted gpu runner from cirun
407+
- cirun-openstack-gpu-large # [linux and x86_64]
408+
409+
365410
.. _idle_timeout_minutes:
366411

367412
idle_timeout_minutes
@@ -473,9 +518,15 @@ The following CI services are available:
473518
* ``circle``
474519
* ``travis``
475520
* ``appveyor``
521+
* ``github_actions``
476522
* ``None`` or ``False`` to disable a build platform.
477523
* ``default`` to choose an appropriate CI (only if available)
478524

525+
Note that ``github_actions`` is not available for the conda-forge github organization
526+
except for self-hosted runs to avoid a denial of service due to other critical
527+
infrastructure running on Github actions. Other github organizations may use
528+
``github_actions`` as a CI provider.
529+
479530
For example, switching linux_64 & osx_64 to build on Travis CI, with win_64 on Appveyor:
480531

481532
.. code-block:: yaml

0 commit comments

Comments
 (0)