Skip to content

Unified interface for common conda-forge.yml tasks that should be independent of CI provider #2349

@h-vetinari

Description

@h-vetinari

In #2347, @jaimergp commented about

env:
# default value; make it explicit, as it needs to match with artefact
# generation below. Not configurable for now, can be revisited later
CONDA_BLD_DIR: C:\bld

as follows:

This is going to undo the performance improvements on MS-hosted Windows runners, not that we use those currently, but making a note here for the future.

My response was:

In what way does it "undo" them? AFAIU we don't have them yet on the GHA runners, i.e. we were defaulting to C:\bld when CONDA_BLD_DIR wasn't being set.

We currently only have an interface to do this on azure

azure:
  settings_win:
    variables:
      CONDA_BLD_PATH: C:\\bld\\

It would be nice if we could generalize some of that into something that's independent of the provider. Setting environment variables should be a no-brainer, swapfiles maybe (#1971), and artefact generation would also be a candidate (while it clearly has to be implemented per provider, the demand itself that artefacts be created shouldn't have to be provider-specific). [...]

So here's an issue to design a better interface. I think we want to be able to

All of these may be (and often are) dependent on the platform, but shouldn't necessarily have to depend on the provider (except of course in the sense that each provider might have different - or sometimes even missing - implementations for the same interface).

So rather than the yaml above, we could have something like

set_env_vars:
  all:
    - FOO=1
  linux:       # values from `all:` are merged with platform-specific ones
    - BAR=2
  osx:
    - BAZ=3
  win:
    - QUX=4

and then similarly for

store_build_artifacts:
  all: true
  linux: true  # error if `all:` conflicts with platform-specific value
  osx: true
  win: true

etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions