Commit bf378fe
committed
CI: recreate conda env from conda-forge to avoid mixed-channel solve
pytorch/test-infra's setup-miniconda action pre-populates the conda env
at ${CONDA_PREFIX} with cmake=3.22, ninja=1.10, pkg-config=0.29, and
wheel=0.37 from the anaconda defaults channel. Our subsequent install
of cmake=3.31.2 from conda-forge has to reconcile two channels in one
solve, and that's been intermittently failing because conda-forge's
newer cmake needs transitive deps (libzlib>=1.3.1, rhash>=1.4.5) that
defaults' shipped versions don't satisfy. Patches that just tweak the
solver flags (--strict-channel-priority, --override-channels alone,
--update-deps) each address one symptom but expose another, because
libmamba on macOS has gaps around channel priority and in-place
upgrades that surface differently per runner class.
Tear down the pre-populated env and recreate it from conda-forge only
with --override-channels. The python version is read from the existing
env so we recreate at parity. Because we recreate at the same prefix,
${CONDA_RUN}, ${CONDA_INSTALL}, and the ~80 workflow callsites that
depend on those vars keep working unchanged. The cache layer in
setup-miniconda caches the base/clone-source rather than the per-run
env, so destroy+recreate doesn't disturb caching either.
This is the surgical short-term fix. The lasting fix is to plumb a
default-packages input through pytorch/test-infra's macos_job.yml so
we can pass default-packages: "" and skip the wasted install entirely;
that's a follow-up upstream PR.
Authored with Claude Code.1 parent e84a418 commit bf378fe
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
13 | 28 | | |
14 | 29 | | |
15 | 30 | | |
| |||
0 commit comments