Skip to content

CI: replace micromamba + environment.yaml with pixi#166

Merged
lmoresi merged 1 commit into
developmentfrom
ci/pixi-replace-micromamba
May 4, 2026
Merged

CI: replace micromamba + environment.yaml with pixi#166
lmoresi merged 1 commit into
developmentfrom
ci/pixi-replace-micromamba

Conversation

@lmoresi
Copy link
Copy Markdown
Member

@lmoresi lmoresi commented May 4, 2026

Summary

Replaces the failing micromamba + `environment.yaml` install step with `prefix-dev/setup-pixi` against the committed `pixi.lock`. The CI now uses the same pinned dependency set developers use locally, deterministically, in seconds rather than 60+ minutes.

Why

Since 2026-04-30 every push to `development` and every PR has failed CI with the runner timing out:

```text
Resolving Environment ⧖ Starting # 02:51:02
##[error]The runner has received a shutdown signal. # 03:57:25
```

Three consecutive `push`-event runs on `development` have failed the same way; PRs #154, #163 inherited it. The 66-minute window is entirely in micromamba's conda-forge dependency resolve — tests never start. Diagnosis chain: `environment.yaml` has loose constraints (`python <= 3.11`, an exact pin on `petsc=3.21.5` that's now a year-old in conda-forge, and several unpinned packages including `pykdtree` which UW3 doesn't even use any more), and recent conda-forge package state shifts have put the solver into deep backtracking.

What changes

Step Before After
Install `mamba-org/setup-micromamba@v2` + `environment.yaml` (60+ min, often timing out) `prefix-dev/setup-pixi@v0.9.4` + `pixi.lock` (`frozen: true`), seconds
Build `pip install -e .` (editable, against project policy per CLAUDE.md) `pixi run -e dev build` (= `pip install . --no-build-isolation`, non-editable)
Test `./scripts/test.sh --p 2` `pixi run -e dev ./scripts/test.sh --p 2`
Timeout none (runner default ≳ 6h) explicit 60 min cap

What does NOT change

Test plan

This PR's own CI run is the test plan — if it completes green in <10 min instead of timing out at ~90 min, we've fixed the unblocker.

If the pixi step succeeds but tests then expose a real divergence vs the previous environment (different Python minor, different package versions), that's a useful signal — the existing `environment.yaml` has been silently falling out of sync with `pixi.lock` for a while, and tests passing under one but not the other tells us where the latent bugs are.

Underworld development team with AI support from Claude Code

Since 2026-04-30 every push to development and every PR has been failing
CI with the runner timing out:

    Resolving Environment ⧖ Starting           # 02:51:02
    ##[error]The runner has received a shutdown signal.   # 03:57:25

That's 66 minutes spent in micromamba's conda-forge solve before the
test step starts, after which GitHub kills the runner. environment.yaml
has loose constraints (python <= 3.11, an exact pin on petsc=3.21.5
that's now a year-old in conda-forge, and several unpinned packages
including pykdtree which UW3 doesn't actually use any more) — that
combination, plus recent conda-forge package state shifts, has put the
solver into deep backtracking.

The pixi.lock committed in the repo already captures the exact same
dependency set we use locally for development. Using
prefix-dev/setup-pixi with frozen: true (refuses to re-solve) gives a
deterministic, fast install matching local dev state. Bonus: the build
step now uses `pixi run -e dev build` (= `pip install . --no-build-isolation`
from pixi.toml), avoiding the editable install the previous CI was doing
in violation of project policy (CLAUDE.md "NEVER use pip install -e .").

Replaces the workflow file in place; keeping environment.yaml in the
repo for now because PR #133 (Gadi Singularity container) consumes it,
and removing it would create a cross-PR ordering hazard.

Test plan: this commit's own CI run is the test plan — if it goes
green in <10 min instead of red in 90 min, we have our answer.

Underworld development team with AI support from Claude Code
Copilot AI review requested due to automatic review settings May 4, 2026 11:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the primary GitHub Actions CI workflow to use Pixi + the committed pixi.lock for dependency installation, replacing the previously timing-out micromamba + environment.yaml solve step. This aligns CI with the repo’s pinned developer environment and should eliminate long conda-forge backtracking on runners.

Changes:

  • Replace micromamba/environment.yaml setup with prefix-dev/setup-pixi using the dev Pixi environment and frozen: true.
  • Run build and tests via pixi run -e dev ... to ensure all commands execute inside the Pixi environment.
  • Add an explicit job timeout (timeout-minutes: 60) to prevent unbounded CI hangs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


# We should trigger this from an upload event. Note that pdoc requires us to import the
# built code, so this is a building test as well as documentation deployment
# Build + test on every PR / push to main / development.
@lmoresi lmoresi merged commit ed3de29 into development May 4, 2026
5 checks passed
@lmoresi lmoresi deleted the ci/pixi-replace-micromamba branch May 4, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants