conda-forge / conda-smithy

The tool for managing conda-forge feedstocks.
https://conda-forge.org/
BSD 3-Clause "New" or "Revised" License
146 stars 169 forks source link

rerender inverts a github_actions option in conda-forge.yml #1958

Closed finnagin closed 2 weeks ago

finnagin commented 2 weeks ago

Solution to issue cannot be found in the documentation.

Issue

Running conda smithy rerender in a feedstock with the self_hosted: true option under github_actions seems to get read a false. Once it generates the workflow yaml file it sets the runs-on option as runs_on: ['windows-latest']. instead of the expected self-hosted.

I ran conda smithy with the following conda-forge.yml:

build_platform: {osx_arm64: osx_64, win_arm64: win_arm64}
conda_forge_output_validation: true
provider: {linux_aarch64: default, linux_ppc64le: default}
github:
  branch_name: main
  tooling_branch_name: main
github_actions:
  self_hosted: true
  triggers:
    - pull_request
    - push
provider:
  win_arm64: github_actions
conda_build:
  pkg_format: '2'
test: native_and_emulated

Which resulted in the following .github/workflows/conda-build.yml:

name: Build conda package
on:
  pull_request:

  push:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

jobs:
  build:
    name: ${{ matrix.CONFIG }}
    runs-on: ${{ matrix.runs_on }}
    timeout-minutes: 360
    strategy:
      fail-fast: false
      matrix:
        include:
          - CONFIG: win_arm64_
            UPLOAD_PACKAGES: True
            os: windows
            runs_on: ['windows-latest']
    steps:

    - name: Checkout code
      uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

    - name: Build on Linux
      if: matrix.os == 'ubuntu'
      env:
        CONFIG: ${{ matrix.CONFIG }}
        UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }}
        DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }}
        CI: github_actions
        CONDA_FORGE_DOCKER_RUN_ARGS: "${{ matrix.CONDA_FORGE_DOCKER_RUN_ARGS }}"
        BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }}
        FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }}
        STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }}
      shell: bash
      run: |
        echo "::group::Configure binfmt_misc"
        docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes
        export flow_run_id="github_$GITHUB_RUN_ID"
        export remote_url="https://github.com/$GITHUB_REPOSITORY"
        export sha="$GITHUB_SHA"
        export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)"
        export GIT_BRANCH="$(basename $GITHUB_REF)"
        if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
          export IS_PR_BUILD="True"
        else
          export IS_PR_BUILD="False"
        fi
        echo "::endgroup::"
        ./.scripts/run_docker_build.sh

    - name: Build on macOS
      if: matrix.os == 'macos'
      env:
        CONFIG: ${{ matrix.CONFIG }}
        UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }}
        CI: github_actions
        BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }}
        FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }}
        STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }}
      shell: bash
      run: |
        export flow_run_id="github_$GITHUB_RUN_ID"
        export remote_url="https://github.com/$GITHUB_REPOSITORY"
        export sha="$GITHUB_SHA"
        export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)"
        export GIT_BRANCH="$(basename $GITHUB_REF)"
        if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
          export IS_PR_BUILD="True"
        else
          export IS_PR_BUILD="False"
        fi
        ./.scripts/run_osx_build.sh

    - name: Install Miniconda for windows
      uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
      with:
        miniforge-version: latest
        miniforge-variant: Mambaforge
      if: matrix.os == 'windows'

    - name: Build on windows
      shell: cmd
      run: |
        set "flow_run_id=github_%GITHUB_RUN_ID%"
        set "remote_url=https://github.com/%GITHUB_REPOSITORY%"
        set "sha=%GITHUB_SHA%"
        call ".scripts\run_win_build.bat"
      env:
        PYTHONUNBUFFERED: 1
        CONFIG: ${{ matrix.CONFIG }}
        CI: github_actions
        UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }}
        BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }}
        FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }}
        STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }}
      if: matrix.os == 'windows'

Which does not include self-hosted in the runs-on option in the matrix.

Installed packages

# Name                    Version                   Build  Channel
anyio                     4.3.0              pyhd8ed1ab_0    conda-forge
archspec                  0.2.3              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.strenum         1.3.1              pyhd8ed1ab_0    conda-forge
backports.tarfile         1.0.0              pyhd8ed1ab_1    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
blinker                   1.8.2              pyhd8ed1ab_0    conda-forge
boltons                   24.0.0             pyhd8ed1ab_0    conda-forge
boolean.py                4.0                pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py310h00ffb61_1    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2024.6.2             h56e8100_0    conda-forge
certifi                   2024.6.2           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py310h8d17308_0    conda-forge
chardet                   5.2.0           py310h5588dad_1    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
cirun                     0.30               pyhd8ed1ab_0    conda-forge
click                     8.1.7           win_pyh7428d3b_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     24.5.0          py310h5588dad_0    conda-forge
conda-build               24.5.0          py310h5588dad_1    conda-forge
conda-content-trust       0.1.3              pyhd8ed1ab_0    conda-forge
conda-forge-pinning       2024.05.28.17.08.08      hd8ed1ab_0    conda-forge
conda-index               0.4.0              pyhd8ed1ab_0    conda-forge
conda-libmamba-solver     24.1.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
conda-smithy              3.36.2          win_pyh7428d3b_0    conda-forge
console_shortcut_miniconda 0.1.1                haa95532_1    defaults
cryptography              40.0.2          py310h6e82f81_0    conda-forge
deprecated                1.2.14             pyh1a96a4e_0    conda-forge
distlib                   0.3.8              pyhd8ed1ab_0    conda-forge
distro                    1.9.0              pyhd8ed1ab_0    conda-forge
editables                 0.5                pyhd8ed1ab_0    conda-forge
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
filelock                  3.14.0             pyhd8ed1ab_0    conda-forge
fmt                       10.2.1               h181d51b_0    conda-forge
frozendict                2.4.4           py310ha8f682b_0    conda-forge
git                       2.45.1               h57928b3_0    conda-forge
gitdb                     4.0.11             pyhd8ed1ab_0    conda-forge
gitpython                 3.1.43             pyhd8ed1ab_0    conda-forge
glob2                     0.7                        py_0    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hatch                     1.11.1             pyhd8ed1ab_0    conda-forge
hatchling                 1.24.2             pyhd8ed1ab_0    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
httpcore                  1.0.5              pyhd8ed1ab_0    conda-forge
httpx                     0.27.0             pyhd8ed1ab_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
hyperlink                 21.0.0             pyhd3deb0d_0    conda-forge
idna                      3.7                pyhd8ed1ab_0    conda-forge
importlib-metadata        7.1.0              pyha770c72_0    conda-forge
importlib_metadata        7.1.0                hd8ed1ab_0    conda-forge
importlib_resources       6.4.0              pyhd8ed1ab_0    conda-forge
isodate                   0.6.1              pyhd8ed1ab_0    conda-forge
jaraco.classes            3.4.0              pyhd8ed1ab_1    conda-forge
jaraco.context            5.3.0              pyhd8ed1ab_1    conda-forge
jaraco.functools          4.0.0              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py310h5588dad_3    conda-forge
jsonschema                4.22.0             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
keyring                   25.2.1             pyh7428d3b_0    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
libarchive                3.7.2                h313118b_1    conda-forge
libcurl                   8.8.0                hd5e4a3a_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
liblief                   0.14.1               he0c23c2_1    conda-forge
libmamba                  1.5.8                h3f09ed1_0    conda-forge
libmambapy                1.5.8           py310h04f2035_0    conda-forge
libsolv                   0.7.29               h0ea2cb4_0    conda-forge
libsqlite                 3.45.3               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libxml2                   2.12.7               h283a6d9_0    conda-forge
libzlib                   1.2.13               h2466b09_6    conda-forge
license-expression        30.1.1             pyhd8ed1ab_0    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              hcfcfb64_1001    conda-forge
m2-msys2-runtime          2.5.0.17080.65c939c               3    conda-forge
m2-patch                  2.7.5                         2    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_0    conda-forge
markupsafe                2.1.5           py310h8d17308_0    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_0    conda-forge
menuinst                  2.1.0           py310h9e98ed7_0    conda-forge
more-itertools            10.2.0             pyhd8ed1ab_0    conda-forge
msrest                    0.6.21             pyh44b312d_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
oauthlib                  3.2.2              pyhd8ed1ab_0    conda-forge
openssl                   3.3.1                h2466b09_0    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pathspec                  0.12.1             pyhd8ed1ab_0    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_0    conda-forge
pip                       23.1.2             pyhd8ed1ab_0    conda-forge
pkginfo                   1.10.0             pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.2              pyhd8ed1ab_0    conda-forge
pluggy                    1.5.0              pyhd8ed1ab_0    conda-forge
powershell_shortcut_miniconda 0.0.1                haa95532_1    defaults
psutil                    5.9.8           py310h8d17308_0    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py-lief                   0.14.1          py310h9e98ed7_1    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6           py310h8d17308_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pycryptodome              3.20.0          py310h8d17308_0    conda-forge
pygithub                  2.3.0              pyhd8ed1ab_0    conda-forge
pygments                  2.18.0             pyhd8ed1ab_0    conda-forge
pyjwt                     2.8.0              pyhd8ed1ab_1    conda-forge
pynacl                    1.5.0           py310h635b8f1_3    conda-forge
pyopenssl                 23.2.0             pyhd8ed1ab_1    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.10.11         h4de0772_0_cpython    conda-forge
python-dateutil           2.9.0              pyhd8ed1ab_0    conda-forge
python-libarchive-c       5.1             py310h5588dad_0    conda-forge
python_abi                3.10                    4_cp310    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pywin32-ctypes            0.2.2           py310h5588dad_1    conda-forge
pyyaml                    6.0.1           py310h8d17308_1    conda-forge
referencing               0.35.1             pyhd8ed1ab_0    conda-forge
reproc                    14.2.4.post0         hcfcfb64_1    conda-forge
reproc-cpp                14.2.4.post0         h63175ca_1    conda-forge
requests                  2.32.2             pyhd8ed1ab_0    conda-forge
requests-oauthlib         2.0.0              pyhd8ed1ab_0    conda-forge
rich                      13.7.1             pyhd8ed1ab_0    conda-forge
ripgrep                   14.1.0               h7f3b576_0    conda-forge
rpds-py                   0.18.1          py310hc226416_0    conda-forge
ruamel.yaml               0.17.40         py310h8d17308_0    conda-forge
ruamel.yaml.clib          0.2.8           py310h8d17308_0    conda-forge
scrypt                    0.8.24          py310h03188d8_0    conda-forge
setuptools                67.7.2             pyhd8ed1ab_0    conda-forge
shellingham               1.5.4              pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
smmap                     5.0.0              pyhd8ed1ab_0    conda-forge
sniffio                   1.3.1              pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tomli-w                   1.0.0              pyhd8ed1ab_0    conda-forge
tomlkit                   0.12.5             pyha770c72_0    conda-forge
toolz                     0.12.1             pyhd8ed1ab_0    conda-forge
tqdm                      4.66.4             pyhd8ed1ab_0    conda-forge
trove-classifiers         2024.5.22          pyhd8ed1ab_0    conda-forge
truststore                0.8.0              pyhd8ed1ab_0    conda-forge
typer                     0.12.3             pyhd8ed1ab_0    conda-forge
typer-slim                0.12.3             pyhd8ed1ab_0    conda-forge
typer-slim-standard       0.12.3               hd8ed1ab_0    conda-forge
typing-extensions         4.11.0               hd8ed1ab_0    conda-forge
typing_extensions         4.11.0             pyha770c72_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
userpath                  1.7.0              pyhd8ed1ab_0    conda-forge
uv                        0.2.4                ha08ef0e_0    conda-forge
vc                        14.3                ha32ba9b_20    conda-forge
vc14_runtime              14.38.33135         h835141b_20    conda-forge
virtualenv                20.26.2            pyhd8ed1ab_0    conda-forge
vs2015_runtime            14.38.33135         h22015db_20    conda-forge
vsts-python-api           0.1.25             pyhd8ed1ab_1    conda-forge
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyhd8ed1ab_6    conda-forge
wrapt                     1.16.0          py310h8d17308_0    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
yaml-cpp                  0.8.0                h63175ca_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstandard                 0.22.0          py310h0009e47_0    conda-forge
zstd                      1.5.5                h12be248_0    conda-forge

Environment info

active environment : None
       user config file : C:\Users\User\.condarc
 populated config files : C:\Users\User\.condarc
          conda version : 24.5.0
    conda-build version : 24.5.0
         python version : 3.10.11.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=icelake
                          __conda=24.5.0=0
                          __win=0=0
       base environment : C:\Users\User\pythonARM\BuildDir\conda\miniconda  (writable)
      conda av data dir : C:\Users\User\pythonARM\BuildDir\conda\miniconda\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\User\pythonARM\BuildDir\conda\miniconda\pkgs
                          C:\Users\User\.conda\pkgs
                          C:\Users\User\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\User\pythonARM\BuildDir\conda\miniconda\envs
                          C:\Users\User\.conda\envs
                          C:\Users\User\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/24.5.0 requests/2.32.2 CPython/3.10.11 Windows/10 Windows/10.0.22631 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
          administrator : False
             netrc file : None
           offline mode : False