Skip to content

Commit 254deea

Browse files
authored
Merge pull request #388 from conda-incubator/mamba-1x
[CI] Fix mamba 1.x examples
2 parents eacf539 + 2ea4cd7 commit 254deea

File tree

3 files changed

+6
-85
lines changed

3 files changed

+6
-85
lines changed

.github/workflows/example-10.yml

-73
Original file line numberDiff line numberDiff line change
@@ -73,76 +73,3 @@ jobs:
7373
conda list
7474
python -VV
7575
printenv | sort
76-
77-
example-10-mambaforge:
78-
# NOTE: Mambaforge is now equivalent to Miniforge.
79-
# We are only testing this to make sure there's a smooth transition.
80-
# It should be removed once the product is definitely sunset.
81-
# prevent cronjobs from running on forks
82-
if:
83-
(github.event_name == 'schedule' && github.repository ==
84-
'conda-incubator/setup-miniconda') || (github.event_name != 'schedule')
85-
name: Ex10 (${{ matrix.os }}, Mambaforge)
86-
runs-on: ${{ matrix.os }}-latest
87-
defaults:
88-
run:
89-
shell: bash -el {0}
90-
strategy:
91-
fail-fast: false
92-
matrix:
93-
os: ["ubuntu", "macos", "windows"]
94-
include:
95-
# should use mamba 0.7.4 to upgrade to mamba 0.7.6
96-
- os: ubuntu
97-
environment-file: etc/example-environment-no-name.yml
98-
miniforge-variant: Mambaforge
99-
miniforge-version: 4.9.2-2
100-
mamba-version: 0.7.6
101-
python-version: 3.6
102-
# should use mamba >= 0.20
103-
- os: ubuntu
104-
environment-file: etc/example-environment-no-name.yml
105-
miniforge-variant: Mambaforge
106-
mamba-version: ">=0.20"
107-
# should use mamabforge `latest`
108-
- os: windows
109-
environment-file: etc/example-explicit.Windows.conda.lock
110-
condarc-file: etc/example-condarc.yml
111-
miniforge-variant: Mambaforge
112-
- os: macos
113-
miniforge-variant: Mambaforge
114-
miniforge-version: "23.3.1-1"
115-
timeout-minutes: 30
116-
steps:
117-
- uses: actions/checkout@v4
118-
- uses: ./
119-
id: setup-miniconda
120-
with:
121-
condarc-file: ${{ matrix.condarc-file }}
122-
environment-file: ${{ matrix.environment-file }}
123-
miniforge-variant: ${{ matrix.miniforge-variant }}
124-
miniforge-version: ${{ matrix.miniforge-version }}
125-
mamba-version: ${{ matrix.mamba-version }}
126-
use-mamba: true
127-
python-version: ${{ matrix.python-version }}
128-
clean-patched-environment-file: false
129-
130-
- run: |
131-
mamba info
132-
mamba list
133-
python -VV
134-
printenv | sort
135-
- name: verify unpatched environment.yml is reported and not cleaned
136-
if: contains(matrix.environment-file, '.yml') && !matrix.python-version
137-
run: |
138-
set -eux
139-
ls '${{ steps.setup-miniconda.outputs.environment-file }}'
140-
ls '${{ matrix.environment-file }}'
141-
diff -s '${{ steps.setup-miniconda.outputs.environment-file }}' '${{ matrix.environment-file }}' | grep 'are identical'
142-
- name: verify patched output is reported, correct, and not cleaned
143-
if: contains(matrix.environment-file, '.yml') && matrix.python-version
144-
run: |
145-
set -eux
146-
if [ "$(diff '${{ steps.setup-miniconda.outputs.environment-file }}' '${{ matrix.environment-file }}' | grep -c 'python=${{ matrix.python-version }}')" -ge 1 ] ; then echo ok ; else exit 1 ; fi
147-
python --version | grep "Python ${{ matrix.python-version }}"
148-
awk '/- conda-forge/,/- defaults/' '${{ steps.setup-miniconda.outputs.environment-file }}'

.github/workflows/example-6.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
35-
mamba-version: ["1.5.10", "2"]
35+
mamba-version: ["1.5.*", "2"]
3636
include:
3737
- os: ubuntu-latest
3838
activate-environment: anaconda-client-env
@@ -49,13 +49,7 @@ jobs:
4949
- uses: ./
5050
with:
5151
miniforge-variant: Miniforge3
52-
# Use an old Miniforge (without conda-libmamba-solver) to allow updates to mamba v2.
53-
# Set the solver to classic for those too. This can be removed when
54-
# conda-libmamba-solver is released with libmamba v2 compatibility.
55-
miniforge-version:
56-
${{ matrix.mamba-version == '2' && '23.1.0-0' || 'latest' }}
57-
conda-solver:
58-
${{ matrix.mamba-version == '2' && 'classic' || 'libmamba' }}
52+
miniforge-version: latest
5953
python-version: "3.11"
6054
mamba-version: ${{ matrix.mamba-version }}
6155
channels: conda-forge,nodefaults

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,10 @@ jobs:
450450

451451
### Example 7: Lockfiles
452452

453-
`conda list --explicit` and [conda-lock][] support generating [explicit
454-
environment specifications][explicit-spec], which skip the environment solution
455-
step altogether, as they contain the _ordered_ list of exact URLs needed to
456-
reproduce the environment.
453+
`conda list --explicit` and [conda-lock][conda-lock] support generating
454+
[explicit environment specifications][explicit-spec], which skip the environment
455+
solution step altogether, as they contain the _ordered_ list of exact URLs
456+
needed to reproduce the environment.
457457

458458
This means explicitly-defined environments which:
459459

0 commit comments

Comments
 (0)