Unverified Commit 1a67a36f authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] prefer CPython in Linux and macOS test environment (#5555)

parent fc47f5e1
......@@ -29,7 +29,7 @@ if [[ "$TASK" == "cpp-tests" ]]; then
exit 0
fi
conda create -q -y -n $CONDA_ENV python=$PYTHON_VERSION
conda create -q -y -n $CONDA_ENV "python=$PYTHON_VERSION[build=*cpython]"
source activate $CONDA_ENV
cd $BUILD_DIRECTORY
......@@ -125,6 +125,7 @@ else
DEPENDENCIES="dask=2022.7.0 distributed=2022.7.0 scipy<1.9"
fi
# re-including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy
conda install -q -y -n $CONDA_ENV \
cloudpickle \
${DEPENDENCIES} \
......@@ -134,12 +135,10 @@ conda install -q -y -n $CONDA_ENV \
pandas \
psutil \
pytest \
"python=$PYTHON_VERSION[build=*cpython]" \
python-graphviz \
scikit-learn || exit -1
# python-graphviz has to be installed separately to prevent conda from downgrading to pypy
conda install -q -y -n $CONDA_ENV \
python-graphviz || exit -1
if [[ $OS_NAME == "macos" ]] && [[ $COMPILER == "clang" ]]; then
# fix "OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized." (OpenMP library conflict due to conda's MKL)
for LIBOMP_ALIAS in libgomp.dylib libiomp5.dylib libomp.dylib; do sudo ln -sf "$(brew --cellar libomp)"/*/lib/libomp.dylib $CONDA_PREFIX/lib/$LIBOMP_ALIAS || exit -1; done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment