[ci] use `mamba` instead of `conda` in macOS and Linux CI jobs (#6140)

This commit is contained in:
Oliver Borchert 2023-10-25 16:48:42 +02:00 коммит произвёл GitHub
Родитель 8ed371cee4
Коммит 2d358d5d20
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -37,7 +37,7 @@ fi
CONDA_PYTHON_REQUIREMENT="python=$PYTHON_VERSION[build=*cpython]"
if [[ $TASK == "if-else" ]]; then
conda create -q -y -n $CONDA_ENV ${CONDA_PYTHON_REQUIREMENT} numpy
mamba create -q -y -n $CONDA_ENV ${CONDA_PYTHON_REQUIREMENT} numpy
source activate $CONDA_ENV
mkdir $BUILD_DIRECTORY/build && cd $BUILD_DIRECTORY/build && cmake .. && make lightgbm -j4 || exit -1
cd $BUILD_DIRECTORY/tests/cpp_tests && ../../lightgbm config=train.conf convert_model_language=cpp convert_model=../../src/boosting/gbdt_prediction.cpp && ../../lightgbm config=predict.conf output_result=origin.pred || exit -1
@ -67,7 +67,7 @@ fi
if [[ $TASK == "lint" ]]; then
cd ${BUILD_DIRECTORY}
conda create -q -y -n $CONDA_ENV \
mamba create -q -y -n $CONDA_ENV \
${CONDA_PYTHON_REQUIREMENT} \
cmakelint \
cpplint \
@ -87,10 +87,10 @@ fi
if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
cd $BUILD_DIRECTORY/docs
conda env create \
mamba env create \
-n $CONDA_ENV \
--file ./env.yml || exit -1
conda install \
mamba install \
-q \
-y \
-n $CONDA_ENV \
@ -128,7 +128,7 @@ if [[ $PYTHON_VERSION == "3.7" ]]; then
fi
# including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy
conda create -q -y -n $CONDA_ENV \
mamba create -q -y -n $CONDA_ENV \
${CONSTRAINED_DEPENDENCIES} \
cloudpickle \
joblib \
@ -304,7 +304,7 @@ matplotlib.use\(\"Agg\"\)\
' plot_example.py # prevent interactive window mode
sed -i'.bak' 's/graph.render(view=True)/graph.render(view=False)/' plot_example.py
# requirements for examples
conda install -q -y -n $CONDA_ENV \
mamba install -q -y -n $CONDA_ENV \
h5py \
ipywidgets \
notebook