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] migrate CI from macOS 10.15 to 11 (fixes #5391) #5396

Merged
merged 13 commits into from
Nov 25, 2022
2 changes: 1 addition & 1 deletion .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if [[ $OS_NAME == "macos" ]]; then
if [[ $COMPILER == "clang" ]]; then
brew install libomp
if [[ $AZURE == "true" ]]; then
sudo xcode-select -s /Applications/Xcode_10.3.app/Contents/Developer || exit -1
sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit -1
fi
else # gcc
sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer || exit -1
Expand Down
15 changes: 5 additions & 10 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,11 @@ if [[ $TASK == "swig" ]]; then
exit 0
fi

# temporary fix for https://github.com/microsoft/LightGBM/issues/5390
if [[ $PYTHON_VERSION == "3.7" ]]; then
DEPENDENCIES="dask distributed"
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} \
dask-core \
distributed \
joblib \
matplotlib \
numpy \
Expand All @@ -137,7 +131,8 @@ conda install -q -y -n $CONDA_ENV \
pytest \
"python=$PYTHON_VERSION[build=*cpython]" \
python-graphviz \
scikit-learn || exit -1
scikit-learn \
scipy || 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)
Expand All @@ -155,7 +150,7 @@ if [[ $TASK == "sdist" ]]; then
elif [[ $TASK == "bdist" ]]; then
if [[ $OS_NAME == "macos" ]]; then
cd $BUILD_DIRECTORY/python-package && python setup.py bdist_wheel --plat-name=macosx --python-tag py3 || exit -1
mv dist/lightgbm-$LGB_VER-py3-none-macosx.whl dist/lightgbm-$LGB_VER-py3-none-macosx_10_15_x86_64.macosx_11_6_x86_64.macosx_12_0_x86_64.whl
mv dist/lightgbm-$LGB_VER-py3-none-macosx.whl dist/lightgbm-$LGB_VER-py3-none-macosx_10_15_x86_64.macosx_11_6_x86_64.macosx_12_5_x86_64.whl
if [[ $PRODUCES_ARTIFACTS == "true" ]]; then
cp dist/lightgbm-$LGB_VER-py3-none-macosx*.whl $BUILD_ARTIFACTSTAGINGDIRECTORY
fi
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ jobs:
OS_NAME: 'macos'
PRODUCES_ARTIFACTS: 'true'
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
strategy:
matrix:
regular:
Expand Down
2 changes: 1 addition & 1 deletion python-package/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For **Linux** users, **glibc** >= 2.14 is required for LightGBM ``<=3.3.3`` and

For **macOS** (we provide wheels for 3 newest macOS versions) users:

- Starting from version 2.2.1, the library file in distribution wheels is built by the **Apple Clang** (Xcode_8.3.3 for versions 2.2.1 - 2.3.1, Xcode_9.4.1 for versions 2.3.2 - 3.3.2 and Xcode_10.3 from version 4.0.0) compiler. This means that you don't need to install the **gcc** compiler anymore. Instead of that you need to install the **OpenMP** library, which is required for running LightGBM on the system with the **Apple Clang** compiler. You can install the **OpenMP** library by the following command: ``brew install libomp``.
- Starting from version 2.2.1, the library file in distribution wheels is built by the **Apple Clang** (Xcode_8.3.3 for versions 2.2.1 - 2.3.1, Xcode_9.4.1 for versions 2.3.2 - 3.3.2 and Xcode_11.7 from version 4.0.0) compiler. This means that you don't need to install the **gcc** compiler anymore. Instead of that you need to install the **OpenMP** library, which is required for running LightGBM on the system with the **Apple Clang** compiler. You can install the **OpenMP** library by the following command: ``brew install libomp``.

- For version smaller than 2.2.1 and not smaller than 2.1.2, **gcc-8** with **OpenMP** support must be installed first. Refer to `Installation Guide <https://github.com/microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#gcc>`__ for installation of **gcc-8** with **OpenMP** support.

Expand Down
1 change: 1 addition & 0 deletions tests/python_package_test/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,7 @@ def test_network_params_not_required_but_respected_if_given(task, listen_port, c

@pytest.mark.parametrize('task', tasks)
def test_machines_should_be_used_if_provided(task, cluster):
pytest.skip("skipping due to timeout issues discussed in https://github.com/microsoft/LightGBM/issues/5390")
with Client(cluster) as client:
_, _, _, _, dX, dy, _, dg = _create_data(
objective=task,
Expand Down