Unverified Commit 00073437 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] speed up conda setup for macOS and Linux jobs (#5743)

parent 0b937d10
......@@ -93,14 +93,9 @@ if [[ $TASK == "lint" ]]; then
exit 0
fi
conda create -q -y -n $CONDA_ENV "${CONDA_PYTHON_REQUIREMENT}"
source activate $CONDA_ENV
cd $BUILD_DIRECTORY
if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
cd $BUILD_DIRECTORY/docs
conda env update \
conda env create \
-n $CONDA_ENV \
--file ./env.yml || exit -1
conda install \
......@@ -109,6 +104,7 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
-n $CONDA_ENV \
doxygen \
'rstcheck>=6.0.0' || exit -1
source activate $CONDA_ENV
# check reStructuredText formatting
cd $BUILD_DIRECTORY/python-package
rstcheck --report-level warning $(find . -type f -name "*.rst") || exit -1
......@@ -131,8 +127,8 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
exit 0
fi
# re-including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy
conda install -q -y -n $CONDA_ENV \
# including python=version[build=*cpython] to ensure that conda doesn't fall back to pypy
conda create -q -y -n $CONDA_ENV \
cloudpickle \
dask-core \
distributed \
......@@ -147,6 +143,10 @@ conda install -q -y -n $CONDA_ENV \
scikit-learn \
scipy || exit -1
source activate $CONDA_ENV
cd $BUILD_DIRECTORY
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