diff --git a/.github/workflows/caching-envs-example.yml b/.github/workflows/caching-envs-example.yml index 3aafdcca..68437a03 100644 --- a/.github/workflows/caching-envs-example.yml +++ b/.github/workflows/caching-envs-example.yml @@ -36,10 +36,9 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Mambaforge + - name: Setup Miniforge uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4 with: - miniforge-variant: Mambaforge miniforge-version: latest activate-environment: anaconda-client-env use-mamba: true @@ -65,6 +64,6 @@ jobs: - name: Update environment run: - mamba env update -n anaconda-client-env -f + conda env update -n anaconda-client-env -f etc/example-environment-caching.yml if: steps.cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/example-10.yml b/.github/workflows/example-10.yml index c948553e..1da773cf 100644 --- a/.github/workflows/example-10.yml +++ b/.github/workflows/example-10.yml @@ -47,6 +47,9 @@ jobs: printenv | sort example-10-mambaforge: + # NOTE: Mambaforge is now equivalent to Miniforge. + # We are only testing this to make sure there's a smooth transition. + # It should be removed once the product is definitely sunset. # prevent cronjobs from running on forks if: (github.event_name == 'schedule' && github.repository == diff --git a/.github/workflows/example-13.yml b/.github/workflows/example-13.yml index 4c6dd440..716e6e63 100644 --- a/.github/workflows/example-13.yml +++ b/.github/workflows/example-13.yml @@ -25,8 +25,7 @@ jobs: fail-fast: false matrix: os: ["macos-14"] - variant: - ["Miniforge3", "Mambaforge", "Miniconda", "no-variant", "empty-with"] + variant: ["Miniforge3", "Miniconda", "no-variant", "empty-with"] include: # This is Intel, not Apple Silicon, but doesn't bundle Miniconda - os: macos-13 @@ -34,7 +33,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./ - if: matrix.variant == 'Miniforge3' || matrix.variant == 'Mambaforge' + if: matrix.variant == 'Miniforge3' id: setup-miniforge continue-on-error: true with: @@ -72,7 +71,7 @@ jobs: shell: bash -el {0} run: conda create -n unused --dry-run zlib - name: Run mamba - if: matrix.variant == 'Miniforge3' || matrix.variant == 'Mambaforge' + if: matrix.variant == 'Miniforge3' shell: bash -el {0} run: mamba --version - name: Install Python diff --git a/README.md b/README.md index bfa89246..2150f7ec 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ This action sets up a `base` available in `$CONDA` - installing a specific (or latest) version of - [Miniconda3][miniconda-repo] - - [Miniforge][miniforge-releases] (or Mambaforge) + - [Miniforge][miniforge-releases] - any [constructor]-based installer by or URL or filesystem path A `conda-build-version` or `mamba-version` may be provided to install specific -versions of `conda` or `mamba` into `base` +versions of `conda` or `mamba` into `base`. The base `condabin/` folder is added to `$PATH` and shell integration is initialized across all platforms. @@ -403,6 +403,10 @@ jobs: ### Example 6: Mamba +> Note: `conda` 23.10+ uses `conda-libmamba-solver` by default, which provides +> comparable performance to `mamba`. Most users won't need this setting with +> recent conda versions. + Experimental! Use `mamba` to enable much faster conda installs. `mamba-version` accepts a version string `x.y` (including `"*"`). It requires you specify `conda-forge` as part of the channels, ideally with the highest priority. @@ -509,40 +513,8 @@ jobs: miniforge-version: latest ``` -In addition to `Miniforge3` with `conda` and `CPython`, for each of its many -supported platforms and architectures, additional variants including -`Mambaforge` (which comes pre-installed `mamba` in addition to `conda` on all -platforms) and `Miniforge-pypy3`/`Mamabaforge-pypy3` (which replace `CPython` -with `pypy3` on Linux/MacOS) are available. - -```yaml -jobs: - example-10-mambaforge: - name: Ex10 (${{ matrix.os }}, Mambaforge) - runs-on: ${{ matrix.os }}-latest - strategy: - fail-fast: false - matrix: - os: ["ubuntu", "macos", "windows"] - include: - - os: ubuntu - environment-file: etc/example-environment-no-name.yml - miniforge-variant: Mambaforge - miniforge-version: 4.9.2-4 - - os: windows - environment-file: etc/example-explicit.Windows.conda.lock - condarc-file: etc/example-condarc.yml - miniforge-variant: Mambaforge - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - condarc-file: ${{ matrix.condarc-file }} - environment-file: ${{ matrix.environment-file }} - miniforge-variant: ${{ matrix.miniforge-variant }} - miniforge-version: ${{ matrix.miniforge-version }} - use-mamba: true -``` +In addition to `Miniforge3` with `conda`, `mamba` and `CPython`, you can also +install `Miniforge-pypy3`, which replaces `CPython` with `PyPy. ### Example 11: Alternative Architectures @@ -678,13 +650,11 @@ The first installation step should setup a Miniconda variant without specifying a environment file. ```yaml -- name: Setup Mambaforge +- name: Setup Miniforge uses: conda-incubator/setup-miniconda@v3 with: - miniforge-variant: Mambaforge miniforge-version: latest activate-environment: anaconda-client-env - use-mamba: true ``` It's a good idea to refresh the cache every 24 hours to avoid inconsistencies of diff --git a/action.yml b/action.yml index 2ec29f7c..9e1699d7 100644 --- a/action.yml +++ b/action.yml @@ -40,10 +40,9 @@ inputs: description: "If provided, this variant of Miniforge will be downloaded and installed. If `miniforge-version` is not provided, the `latest` version will be used. - Currently-known values: - Miniforge3 (default) - Miniforge-pypy3 - - Mambaforge - Mambaforge-pypy3 Visit + Currently-known values: Miniforge3 (default), Miniforge-pypy3. Visit https://github.com/conda-forge/miniforge/releases/ for more information on - available variants" + available variants." required: false default: "" miniforge-version: diff --git a/dist/setup/index.js b/dist/setup/index.js index 7078b2a9..77635470 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -48150,6 +48150,13 @@ function parseInputs() { if (core.isDebug()) { core.info(JSON.stringify(inputs)); } + if (inputs.miniforgeVariant === "Mambaforge" || + inputs.miniforgeVariant === "Mambaforge-pypy3") { + core.warning("'Mambaforge' variants are now equivalent to 'Miniforge3'. " + + "In the future, we will ignore with a warning and use 'Miniforge3'. " + + "Eventually, using 'Mambaforge' will throw an error. " + + "Please change to 'Miniforge3' at your earliest convenience."); + } return inputs; }); } diff --git a/src/input.ts b/src/input.ts index a605d80a..65f00e1c 100644 --- a/src/input.ts +++ b/src/input.ts @@ -137,5 +137,17 @@ export async function parseInputs(): Promise { core.info(JSON.stringify(inputs)); } + if ( + inputs.miniforgeVariant === "Mambaforge" || + inputs.miniforgeVariant === "Mambaforge-pypy3" + ) { + core.warning( + "'Mambaforge' variants are now equivalent to 'Miniforge3'. " + + "In the future, we will ignore with a warning and use 'Miniforge3'. " + + "Eventually, using 'Mambaforge' will throw an error. " + + "Please change to 'Miniforge3' at your earliest convenience.", + ); + } + return inputs; }