Skip to content

Commit e5293c8

Browse files
authored
Start deprecation of miniforge-variant: Mambaforge (#360)
* Warn if Mambaforge is used * pre-commit * Also warn for the pypy variant * Rebuild
1 parent 710ac12 commit e5293c8

File tree

7 files changed

+38
-49
lines changed

7 files changed

+38
-49
lines changed

.github/workflows/caching-envs-example.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ jobs:
3636
steps:
3737
- uses: actions/checkout@v4
3838

39-
- name: Setup Mambaforge
39+
- name: Setup Miniforge
4040
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4
4141
with:
42-
miniforge-variant: Mambaforge
4342
miniforge-version: latest
4443
activate-environment: anaconda-client-env
4544
use-mamba: true
@@ -65,6 +64,6 @@ jobs:
6564

6665
- name: Update environment
6766
run:
68-
mamba env update -n anaconda-client-env -f
67+
conda env update -n anaconda-client-env -f
6968
etc/example-environment-caching.yml
7069
if: steps.cache.outputs.cache-hit != 'true'

.github/workflows/example-10.yml

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
printenv | sort
4848
4949
example-10-mambaforge:
50+
# NOTE: Mambaforge is now equivalent to Miniforge.
51+
# We are only testing this to make sure there's a smooth transition.
52+
# It should be removed once the product is definitely sunset.
5053
# prevent cronjobs from running on forks
5154
if:
5255
(github.event_name == 'schedule' && github.repository ==

.github/workflows/example-13.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
os: ["macos-14"]
28-
variant:
29-
["Miniforge3", "Mambaforge", "Miniconda", "no-variant", "empty-with"]
28+
variant: ["Miniforge3", "Miniconda", "no-variant", "empty-with"]
3029
include:
3130
# This is Intel, not Apple Silicon, but doesn't bundle Miniconda
3231
- os: macos-13
3332
variant: empty-with
3433
steps:
3534
- uses: actions/checkout@v4
3635
- uses: ./
37-
if: matrix.variant == 'Miniforge3' || matrix.variant == 'Mambaforge'
36+
if: matrix.variant == 'Miniforge3'
3837
id: setup-miniforge
3938
continue-on-error: true
4039
with:
@@ -72,7 +71,7 @@ jobs:
7271
shell: bash -el {0}
7372
run: conda create -n unused --dry-run zlib
7473
- name: Run mamba
75-
if: matrix.variant == 'Miniforge3' || matrix.variant == 'Mambaforge'
74+
if: matrix.variant == 'Miniforge3'
7675
shell: bash -el {0}
7776
run: mamba --version
7877
- name: Install Python

README.md

+9-39
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ This action sets up a `base`
77
available in `$CONDA`
88
- installing a specific (or latest) version of
99
- [Miniconda3][miniconda-repo]
10-
- [Miniforge][miniforge-releases] (or Mambaforge)
10+
- [Miniforge][miniforge-releases]
1111
- any [constructor]-based installer by or URL or filesystem path
1212

1313
A `conda-build-version` or `mamba-version` may be provided to install specific
14-
versions of `conda` or `mamba` into `base`
14+
versions of `conda` or `mamba` into `base`.
1515

1616
The base `condabin/` folder is added to `$PATH` and shell integration is
1717
initialized across all platforms.
@@ -403,6 +403,10 @@ jobs:
403403

404404
### Example 6: Mamba
405405

406+
> Note: `conda` 23.10+ uses `conda-libmamba-solver` by default, which provides
407+
> comparable performance to `mamba`. Most users won't need this setting with
408+
> recent conda versions.
409+
406410
Experimental! Use `mamba` to enable much faster conda installs. `mamba-version`
407411
accepts a version string `x.y` (including `"*"`). It requires you specify
408412
`conda-forge` as part of the channels, ideally with the highest priority.
@@ -509,40 +513,8 @@ jobs:
509513
miniforge-version: latest
510514
```
511515

512-
In addition to `Miniforge3` with `conda` and `CPython`, for each of its many
513-
supported platforms and architectures, additional variants including
514-
`Mambaforge` (which comes pre-installed `mamba` in addition to `conda` on all
515-
platforms) and `Miniforge-pypy3`/`Mamabaforge-pypy3` (which replace `CPython`
516-
with `pypy3` on Linux/MacOS) are available.
517-
518-
```yaml
519-
jobs:
520-
example-10-mambaforge:
521-
name: Ex10 (${{ matrix.os }}, Mambaforge)
522-
runs-on: ${{ matrix.os }}-latest
523-
strategy:
524-
fail-fast: false
525-
matrix:
526-
os: ["ubuntu", "macos", "windows"]
527-
include:
528-
- os: ubuntu
529-
environment-file: etc/example-environment-no-name.yml
530-
miniforge-variant: Mambaforge
531-
miniforge-version: 4.9.2-4
532-
- os: windows
533-
environment-file: etc/example-explicit.Windows.conda.lock
534-
condarc-file: etc/example-condarc.yml
535-
miniforge-variant: Mambaforge
536-
steps:
537-
- uses: actions/checkout@v4
538-
- uses: conda-incubator/setup-miniconda@v3
539-
with:
540-
condarc-file: ${{ matrix.condarc-file }}
541-
environment-file: ${{ matrix.environment-file }}
542-
miniforge-variant: ${{ matrix.miniforge-variant }}
543-
miniforge-version: ${{ matrix.miniforge-version }}
544-
use-mamba: true
545-
```
516+
In addition to `Miniforge3` with `conda`, `mamba` and `CPython`, you can also
517+
install `Miniforge-pypy3`, which replaces `CPython` with `PyPy.
546518

547519
### Example 11: Alternative Architectures
548520

@@ -678,13 +650,11 @@ The first installation step should setup a Miniconda variant without specifying
678650
a environment file.
679651

680652
```yaml
681-
- name: Setup Mambaforge
653+
- name: Setup Miniforge
682654
uses: conda-incubator/setup-miniconda@v3
683655
with:
684-
miniforge-variant: Mambaforge
685656
miniforge-version: latest
686657
activate-environment: anaconda-client-env
687-
use-mamba: true
688658
```
689659

690660
It's a good idea to refresh the cache every 24 hours to avoid inconsistencies of

action.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ inputs:
4040
description:
4141
"If provided, this variant of Miniforge will be downloaded and installed.
4242
If `miniforge-version` is not provided, the `latest` version will be used.
43-
Currently-known values: - Miniforge3 (default) - Miniforge-pypy3 -
44-
Mambaforge - Mambaforge-pypy3 Visit
43+
Currently-known values: Miniforge3 (default), Miniforge-pypy3. Visit
4544
https://github.com/conda-forge/miniforge/releases/ for more information on
46-
available variants"
45+
available variants."
4746
required: false
4847
default: ""
4948
miniforge-version:

dist/setup/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -48150,6 +48150,13 @@ function parseInputs() {
4815048150
if (core.isDebug()) {
4815148151
core.info(JSON.stringify(inputs));
4815248152
}
48153+
if (inputs.miniforgeVariant === "Mambaforge" ||
48154+
inputs.miniforgeVariant === "Mambaforge-pypy3") {
48155+
core.warning("'Mambaforge' variants are now equivalent to 'Miniforge3'. " +
48156+
"In the future, we will ignore with a warning and use 'Miniforge3'. " +
48157+
"Eventually, using 'Mambaforge' will throw an error. " +
48158+
"Please change to 'Miniforge3' at your earliest convenience.");
48159+
}
4815348160
return inputs;
4815448161
});
4815548162
}

src/input.ts

+12
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,17 @@ export async function parseInputs(): Promise<types.IActionInputs> {
137137
core.info(JSON.stringify(inputs));
138138
}
139139

140+
if (
141+
inputs.miniforgeVariant === "Mambaforge" ||
142+
inputs.miniforgeVariant === "Mambaforge-pypy3"
143+
) {
144+
core.warning(
145+
"'Mambaforge' variants are now equivalent to 'Miniforge3'. " +
146+
"In the future, we will ignore with a warning and use 'Miniforge3'. " +
147+
"Eventually, using 'Mambaforge' will throw an error. " +
148+
"Please change to 'Miniforge3' at your earliest convenience.",
149+
);
150+
}
151+
140152
return inputs;
141153
}

0 commit comments

Comments
 (0)