Skip to content

Commit

Permalink
[ci] use mamba instead of conda in macOS and Linux CI jobs (#6140)
Browse files Browse the repository at this point in the history
  • Loading branch information
borchero committed Oct 25, 2023
1 parent 8ed371c commit 2d358d5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2d358d5

Please sign in to comment.