Skip to content

Commit 7db69d7

Browse files
committed
Disable unneeded update of mamba solver; set channel priority
1 parent be7134f commit 7db69d7

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

.github/workflows/test_branches.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,21 @@ jobs:
304304
# Set up environment
305305
conda config --set always_yes yes
306306
conda config --set auto_update_conda false
307-
#conda config --remove channels defaults
308-
#conda config --append channels nodefaults
307+
conda config --set channel_priority strict
308+
conda config --remove channels defaults
309+
conda config --append channels nodefaults
309310
conda config --append channels conda-forge
310311
# Try to install mamba
311-
# Note: removed '--update-deps' on 2025-02-28 to work around
312-
# broken libffi(?)
313-
conda install -q -y -n base conda-libmamba-solver \
314-
|| MAMBA_FAILED=1
315-
if test -z "$MAMBA_FAILED"; then
316-
echo "*** Activating the mamba environment solver ***"
317-
conda config --set solver libmamba
312+
CONDA_VER=$(conda --version | cut -d\ -f2)
313+
if test 23.10 = "`echo -e "23.10\n$CONDA_VER" | sort -V | tail -1`"; then
314+
# Note: removed '--update-deps' on 2025-02-28 to work around
315+
# broken libffi(?)
316+
conda install -q -y -n base conda-libmamba-solver \
317+
|| MAMBA_FAILED=1
318+
if test -z "$MAMBA_FAILED"; then
319+
echo "*** Activating the mamba environment solver ***"
320+
conda config --set solver libmamba
321+
fi
318322
fi
319323
# Add the rest of the channels
320324
conda config --append channels gurobi

.github/workflows/test_pr_and_main.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -341,17 +341,21 @@ jobs:
341341
# Set up environment
342342
conda config --set always_yes yes
343343
conda config --set auto_update_conda false
344-
#conda config --remove channels defaults
345-
#conda config --append channels nodefaults
344+
conda config --set channel_priority strict
345+
conda config --remove channels defaults
346+
conda config --append channels nodefaults
346347
conda config --append channels conda-forge
347348
# Try to install mamba
348-
# Note: removed '--update-deps' on 2025-02-28 to work around
349-
# broken libffi(?)
350-
conda install -q -y -n base conda-libmamba-solver \
351-
|| MAMBA_FAILED=1
352-
if test -z "$MAMBA_FAILED"; then
353-
echo "*** Activating the mamba environment solver ***"
354-
conda config --set solver libmamba
349+
CONDA_VER=$(conda --version | cut -d\ -f2)
350+
if test 23.10 = "`echo -e "23.10\n$CONDA_VER" | sort -V | tail -1`"; then
351+
# Note: removed '--update-deps' on 2025-02-28 to work around
352+
# broken libffi(?)
353+
conda install -q -y -n base conda-libmamba-solver \
354+
|| MAMBA_FAILED=1
355+
if test -z "$MAMBA_FAILED"; then
356+
echo "*** Activating the mamba environment solver ***"
357+
conda config --set solver libmamba
358+
fi
355359
fi
356360
# Add the rest of the channels
357361
conda config --append channels gurobi

0 commit comments

Comments
 (0)