From 4773a5b26e795e3218d5fb24b354576395795d25 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 31 Oct 2023 09:30:24 -0500 Subject: [PATCH 1/2] Add docs for GHA self-hosted settings --- src/maintainer/conda_forge_yml.rst | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/maintainer/conda_forge_yml.rst b/src/maintainer/conda_forge_yml.rst index fec7ae5e49..65221df8d2 100644 --- a/src/maintainer/conda_forge_yml.rst +++ b/src/maintainer/conda_forge_yml.rst @@ -37,6 +37,7 @@ Top-level fields * :ref:`conda_solver` * :ref:`docker` * :ref:`github` +* :ref:`github_actions` * :ref:`idle_timeout_minutes` * :ref:`linux` * :ref:`linux_aarch64` @@ -353,6 +354,50 @@ defaults are as follows: # conda-forge-ci-setup-feedstock references tooling_branch_name: main +.. _github_actions: + +github_actions +-------------- +This dictates the behavior of the Github Actions CI service. It is a +mapping for GHA-specific configuration options. For example: + +.. code-block:: yaml + + github_actions: + # Is the job using Microsoft hosted free runners or 'self-hosted'. + self_hosted: false + # triggers for actions. Defaults to `['push', 'pull_request']` for + # Microsoft hosted free runners and `['push']` for self-hosted + triggers: [] + # Timeout for CI jobs + timeout_minutes: 360 + # Cancel in progress builds. Defaults to false for Microsoft hosted + # free runner and true for self-hosted + cancel_in_progress: None + # Maximum number of parallel jobs per build. + max_parallel: None + # Retain build artifacts for inspection + store_build_artifacts: false + # Retention period for built artifacts + artifact_retention_days: 14 + +For self-hosted runners ``recipe/conda_build_config.yaml`` is used for +specifying labels for the runners. + +.. code-block:: yaml + + github_actions_labels: + # use Microsoft free runners + - hosted # [osx or win] + # Use self-hosted runner with custom label + - - self-hosted # [linux and aarch64] + - custom-label # [linux and aarch64] + # Use self-hosted runner from cirun + - cirun-openstack-cpu-large # [linux and ppc64le] + # Use self-hosted gpu runner from cirun + - cirun-openstack-gpu-large # [linux and x86_64] + + .. _idle_timeout_minutes: idle_timeout_minutes From 2ef67a5eaaa9bba172558d1670e99604e742079d Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 31 Oct 2023 11:02:12 -0500 Subject: [PATCH 2/2] clarify gha usage on conda-forge --- src/maintainer/conda_forge_yml.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/maintainer/conda_forge_yml.rst b/src/maintainer/conda_forge_yml.rst index 65221df8d2..2669dddd13 100644 --- a/src/maintainer/conda_forge_yml.rst +++ b/src/maintainer/conda_forge_yml.rst @@ -509,9 +509,15 @@ The following CI services are available: * ``circle`` * ``travis`` * ``appveyor`` +* ``github_actions`` * ``None`` or ``False`` to disable a build platform. * ``default`` to choose an appropriate CI (only if available) +Note that ``github_actions`` is not available for the conda-forge github organization +except for self-hosted runs to avoid a denial of service due to other critical +infrastructure running on Github actions. Other github organizations may use +``github_actions`` as a CI provider. + For example, switching linux_64 & osx_64 to build on Travis CI, with win_64 on Appveyor: .. code-block:: yaml