Skip to content

Commit

Permalink
[ci] prefer CPython in Linux and macOS test environment (#5555)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored Nov 3, 2022
1 parent fc47f5e commit 1a67a36
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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} \
Expand All @@ -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
Expand Down

0 comments on commit 1a67a36

Please sign in to comment.