Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Nov 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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