From a8d097a6be7f1c0d5835d46d2007b6b45a495fd7 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 25 Oct 2023 16:48:42 +0200 Subject: [PATCH] [ci] use `mamba` instead of `conda` in macOS and Linux CI jobs (#6140) --- .ci/test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index af7cae2e3858..37fbd19152d6 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -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