Skip to content

Upgrade setup-miniconda v2 to v3, fix arm64/Mambaforge/checkout ordering#148

Merged
bschilder merged 2 commits intoneurogenomics:masterfrom
bschilder:fix-miniconda-architecture
Mar 13, 2026
Merged

Upgrade setup-miniconda v2 to v3, fix arm64/Mambaforge/checkout ordering#148
bschilder merged 2 commits intoneurogenomics:masterfrom
bschilder:fix-miniconda-architecture

Conversation

@bschilder
Copy link
Collaborator

@bschilder bschilder commented Mar 13, 2026

Summary

  • Upgrade conda-incubator/setup-miniconda@v2 to @v3: v2 defaults architecture: x64, which downloads x86_64 installers on arm64 macOS runners (e.g. macos-15-arm64). v3 auto-detects the runner architecture.
  • Note Mambaforge discontinuation: Mambaforge releases are no longer published by conda-forge, causing 404 errors when miniforge_variant: Mambaforge is used. Updated the input description to recommend Miniforge3.
  • Move checkout before setup-miniconda: When users specify environment_file pointing to a repo file (e.g. inst/conda/env.yml), the file must exist before setup-miniconda runs. Previously checkout happened after, so environment_file could only work with URLs, not local repo paths.

Problem

When a downstream package uses:

miniforge_variant: Mambaforge
environment_file: inst/conda/my_env.yml

Two failures occur:

  1. 404 on Mambaforge download — Mambaforge releases are discontinued
  2. environment_file not found — checkout happens after setup-miniconda, so repo files don't exist yet

Even switching to Miniforge3, v2's x64 default means arm64 macOS runners install x86_64 conda via Rosetta instead of native arm64 builds.

Changes

File Change
action.yml setup-miniconda@v2@v3
action.yml Move actions/checkout@v4 before setup-miniconda
action.yml Update miniforge_variant description re: Mambaforge

Test plan

  • Verify Miniforge3 installs correctly on macOS arm64 runners
  • Verify environment_file with repo-local paths works after checkout reorder
  • Verify conda env creation works on all 3 OS runners (ubuntu, macOS, windows)
  • Verify no regressions for miniforge_variant: false (default — most users)

bschilder and others added 2 commits March 13, 2026 19:06
- setup-miniconda@v2 defaults architecture to x64, which fails on
  arm64 macOS runners (e.g. macos-15-arm64). v3 auto-detects the
  runner architecture correctly.
- Mambaforge releases are no longer published by conda-forge,
  causing 404 errors. Updated docs to note this and recommend
  Miniforge3 instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When users specify environment_file pointing to a repo file (e.g.
inst/conda/env.yml), the file must exist before setup-miniconda runs.
Previously checkout happened after setup-miniconda, so environment_file
could only reference URLs, not local repo paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bschilder bschilder self-assigned this Mar 13, 2026
@bschilder bschilder changed the title Upgrade setup-miniconda v2 → v3, note Mambaforge discontinuation Upgrade setup-miniconda v2 to v3, fix arm64/Mambaforge/checkout ordering Mar 13, 2026
@bschilder bschilder merged commit 3e374f5 into neurogenomics:master Mar 13, 2026
2 of 6 checks passed
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.

1 participant