From aa9009bcac2dbaf730ae8210357901d48a56dea4 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 02:53:16 +0200 Subject: [PATCH 01/19] [ci] Use Visual Studio 2019 for AppVeyor builds --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index bb15958136c3..68736d0bd481 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,6 @@ version: 4.3.0.99.{build} -image: Visual Studio 2015 +image: Visual Studio 2019 platform: x64 configuration: # a trick to construct a build matrix with multiple Python versions - '3.8' From 8e1c008cecd427f9a005d09fe58753eaf6eda48d Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 03:18:26 +0200 Subject: [PATCH 02/19] Pyarrow build 3 --- .appveyor.yml | 2 +- .ci/conda-envs/ci-core.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 68736d0bd481..bb15958136c3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,6 @@ version: 4.3.0.99.{build} -image: Visual Studio 2019 +image: Visual Studio 2015 platform: x64 configuration: # a trick to construct a build matrix with multiple Python versions - '3.8' diff --git a/.ci/conda-envs/ci-core.txt b/.ci/conda-envs/ci-core.txt index ef04e4df2b3a..e6aa21d267ff 100644 --- a/.ci/conda-envs/ci-core.txt +++ b/.ci/conda-envs/ci-core.txt @@ -23,7 +23,7 @@ joblib>=1.3.2 matplotlib-base>=3.7.3 numpy>=1.24.4 pandas>2.0 -pyarrow>=6.0 +pyarrow=15.0.2=*_3 python-graphviz>=0.20.3 scikit-learn>=1.3.2 scipy>=1.1 From 0e38ddd3c2f20b8915a61cdf81f63bf33f0fa1a9 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 03:22:44 +0200 Subject: [PATCH 03/19] Fix build string --- .ci/conda-envs/ci-core.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/conda-envs/ci-core.txt b/.ci/conda-envs/ci-core.txt index e6aa21d267ff..64c09bb6fdaf 100644 --- a/.ci/conda-envs/ci-core.txt +++ b/.ci/conda-envs/ci-core.txt @@ -23,7 +23,7 @@ joblib>=1.3.2 matplotlib-base>=3.7.3 numpy>=1.24.4 pandas>2.0 -pyarrow=15.0.2=*_3 +pyarrow=15.0.2=*_3_cpu python-graphviz>=0.20.3 scikit-learn>=1.3.2 scipy>=1.1 From 5a74d9cc29002951e0d31b2495be303603fb9214 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 10:06:37 +0200 Subject: [PATCH 04/19] Try build 4 --- .ci/conda-envs/ci-core.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/conda-envs/ci-core.txt b/.ci/conda-envs/ci-core.txt index 64c09bb6fdaf..2022aded68f9 100644 --- a/.ci/conda-envs/ci-core.txt +++ b/.ci/conda-envs/ci-core.txt @@ -23,7 +23,7 @@ joblib>=1.3.2 matplotlib-base>=3.7.3 numpy>=1.24.4 pandas>2.0 -pyarrow=15.0.2=*_3_cpu +pyarrow=15.0.2=*_4_cpu python-graphviz>=0.20.3 scikit-learn>=1.3.2 scipy>=1.1 From 9df071585e83944a8442d18db07aa41d3af94209 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 16:54:30 +0200 Subject: [PATCH 05/19] Conditionally execute tests --- .appveyor.yml | 1 + .ci/conda-envs/ci-core.txt | 2 +- tests/python_package_test/test_arrow.py | 21 ++++++++++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index bb15958136c3..0f0c7d2d17ee 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -40,4 +40,5 @@ test_script: - conda config --add channels conda-forge - conda config --set channel_priority strict - conda init powershell + - set ALLOW_SKIP_ARROW_TESTS="1" - powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1 diff --git a/.ci/conda-envs/ci-core.txt b/.ci/conda-envs/ci-core.txt index 2022aded68f9..ef04e4df2b3a 100644 --- a/.ci/conda-envs/ci-core.txt +++ b/.ci/conda-envs/ci-core.txt @@ -23,7 +23,7 @@ joblib>=1.3.2 matplotlib-base>=3.7.3 numpy>=1.24.4 pandas>2.0 -pyarrow=15.0.2=*_4_cpu +pyarrow>=6.0 python-graphviz>=0.20.3 scikit-learn>=1.3.2 scipy>=1.1 diff --git a/tests/python_package_test/test_arrow.py b/tests/python_package_test/test_arrow.py index 855300dda1ef..882b79a4cc96 100644 --- a/tests/python_package_test/test_arrow.py +++ b/tests/python_package_test/test_arrow.py @@ -1,16 +1,25 @@ # coding: utf-8 import filecmp +import os from pathlib import Path from typing import Any, Dict, Optional import numpy as np -import pyarrow as pa import pytest import lightgbm as lgb from .utils import np_assert_array_equal +# NOTE: In the AppVeyor CI, importing pyarrow fails due to an old Visual Studio version. Hence, +# we conditionally import pyarrow here (and skip tests if it cannot be imported). However, we +# don't want these tests to silently be skipped, hence, we only conditionally import when a +# specific env var is set. +if os.getenv("ALLOW_SKIP_ARROW_TESTS") == "1": + pa = pytest.importorskip("pyarrow") +else: + import pyarrow as pa # type: ignore + # ----------------------------------------------------------------------------------------------- # # UTILITIES # # ----------------------------------------------------------------------------------------------- # @@ -132,7 +141,10 @@ def assert_datasets_equal(tmp_path: Path, lhs: lgb.Dataset, rhs: lgb.Dataset): ("arrow_table_fn", "dataset_params"), [ # Use lambda functions here to minimize memory consumption (lambda: generate_simple_arrow_table(), dummy_dataset_params()), - (lambda: generate_simple_arrow_table(empty_chunks=True), dummy_dataset_params()), + ( + lambda: generate_simple_arrow_table(empty_chunks=True), + dummy_dataset_params(), + ), (lambda: generate_dummy_arrow_table(), dummy_dataset_params()), (lambda: generate_nullable_arrow_table(pa.float32()), dummy_dataset_params()), (lambda: generate_nullable_arrow_table(pa.int32()), dummy_dataset_params()), @@ -360,7 +372,10 @@ def assert_equal_predict_arrow_pandas(booster: lgb.Booster, data: pa.Table): def test_predict_regression(): data_float = generate_random_arrow_table(10, 10000, 42) data_bool = generate_random_arrow_table(1, 10000, 42, generate_nulls=False, values=np.array([True, False])) - data = pa.Table.from_arrays(data_float.columns + data_bool.columns, names=data_float.schema.names + ["col_bool"]) + data = pa.Table.from_arrays( + data_float.columns + data_bool.columns, + names=data_float.schema.names + ["col_bool"], + ) dataset = lgb.Dataset( data, From 6673f57acdaca285ebd6302b001c7e30da09a737 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 18:02:25 +0200 Subject: [PATCH 06/19] Fix? --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0f0c7d2d17ee..25e88f2b649c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -41,4 +41,4 @@ test_script: - conda config --set channel_priority strict - conda init powershell - set ALLOW_SKIP_ARROW_TESTS="1" - - powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1 + - powershell.exe -ExecutionPolicy Bypass -Command "$env:ALLOW_SKIP_ARROW_TESTS = '1'; & %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1" From 292a9d8480130141ff5b0bbc087aaab895816111 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 18:30:52 +0200 Subject: [PATCH 07/19] Finalize? --- .appveyor.yml | 3 +-- .ci/test_windows.ps1 | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 25e88f2b649c..bb15958136c3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -40,5 +40,4 @@ test_script: - conda config --add channels conda-forge - conda config --set channel_priority strict - conda init powershell - - set ALLOW_SKIP_ARROW_TESTS="1" - - powershell.exe -ExecutionPolicy Bypass -Command "$env:ALLOW_SKIP_ARROW_TESTS = '1'; & %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1" + - powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1 diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 61ef1ae0f2a1..12f90f71cd05 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -9,6 +9,7 @@ function Check-Output { # unify environment variable for Azure DevOps and AppVeyor if (Test-Path env:APPVEYOR) { $env:APPVEYOR = "true" + $env:ALLOW_SKIP_ARROW_TESTS = "1" } if ($env:TASK -eq "r-package") { From d59c7509e033bdd3cfb3a3d0aab820d56d432ae2 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Wed, 24 Apr 2024 20:31:04 +0200 Subject: [PATCH 08/19] Xcode 14.3 --- .ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index ec9e3f114655..fbb5ebfcd2fc 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -17,7 +17,7 @@ if [[ $OS_NAME == "macos" ]]; then 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 + sudo xcode-select -s /Applications/Xcode_14.3.app/Contents/Developer || exit 1 if [[ $TASK != "mpi" ]]; then brew install gcc fi From 15acee88d195b255908221db3993fd60c20c2a91 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 01:26:51 +0200 Subject: [PATCH 09/19] Try fix --- .ci/setup.sh | 2 +- .github/workflows/python_package.yml | 14 ++++++------ .github/workflows/r_package.yml | 34 ++++++++++++++-------------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index fbb5ebfcd2fc..1fac017bbdfe 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -17,7 +17,7 @@ if [[ $OS_NAME == "macos" ]]; then sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit 1 fi else # gcc - sudo xcode-select -s /Applications/Xcode_14.3.app/Contents/Developer || exit 1 + sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer || exit 1 if [[ $TASK != "mpi" ]]; then brew install gcc fi diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index 27aecf82b419..723b7e80161e 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -27,27 +27,27 @@ jobs: fail-fast: false matrix: include: - - os: macOS-latest + - os: macos-13 task: regular python_version: '3.9' - - os: macOS-latest + - os: macos-13 task: sdist python_version: '3.10' - - os: macOS-latest + - os: macos-13 task: bdist python_version: '3.7' - - os: macOS-latest + - os: macos-13 task: if-else python_version: '3.9' - - os: macOS-latest + - os: macos-13 task: mpi method: source python_version: '3.10' - - os: macOS-latest + - os: macos-13 task: mpi method: pip python_version: '3.11' - - os: macOS-latest + - os: macos-13 task: mpi method: wheel python_version: '3.8' diff --git a/.github/workflows/r_package.yml b/.github/workflows/r_package.yml index 3cae5af43908..a0220735b824 100644 --- a/.github/workflows/r_package.yml +++ b/.github/workflows/r_package.yml @@ -3,11 +3,11 @@ name: R-package on: push: branches: - - master + - master pull_request: branches: - - master - - release/* + - master + - release/* # automatically cancel in-progress builds if another commit is pushed concurrency: @@ -44,32 +44,32 @@ jobs: compiler: gcc r_version: 3.6 build_type: cmake - container: 'ubuntu:18.04' + container: "ubuntu:18.04" - os: ubuntu-latest task: r-package compiler: gcc r_version: 4.3 build_type: cmake - container: 'ubuntu:22.04' + container: "ubuntu:22.04" - os: ubuntu-latest task: r-package compiler: clang r_version: 3.6 build_type: cmake - container: 'ubuntu:18.04' + container: "ubuntu:18.04" - os: ubuntu-latest task: r-package compiler: clang r_version: 4.3 build_type: cmake - container: 'ubuntu:22.04' - - os: macOS-latest + container: "ubuntu:22.04" + - os: macos-13 task: r-package compiler: gcc r_version: 4.3 build_type: cmake container: null - - os: macOS-latest + - os: macos-13 task: r-package compiler: clang r_version: 4.3 @@ -127,8 +127,8 @@ jobs: compiler: gcc r_version: 4.3 build_type: cran - container: 'ubuntu:22.04' - - os: macOS-latest + container: "ubuntu:22.04" + - os: macos-13 task: r-package compiler: clang r_version: 4.3 @@ -184,13 +184,13 @@ jobs: CTAN_MIRROR: https://ctan.math.illinois.edu/systems/win32/miktex TINYTEX_INSTALLER: TinyTeX - name: Setup and run tests on Linux and macOS - if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest' + if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-latest' shell: bash run: | export TASK="${{ matrix.task }}" export COMPILER="${{ matrix.compiler }}" export GITHUB_ACTIONS="true" - if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then + if [[ "${{ matrix.os }}" == "macos-13" ]]; then export OS_NAME="macos" elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then export OS_NAME="linux" @@ -308,7 +308,7 @@ jobs: runs-on: ubuntu-latest needs: [test, test-r-sanitizers, test-r-debian-clang] steps: - - name: Note that all tests succeeded - uses: re-actors/alls-green@v1.2.2 - with: - jobs: ${{ toJSON(needs) }} + - name: Note that all tests succeeded + uses: re-actors/alls-green@v1.2.2 + with: + jobs: ${{ toJSON(needs) }} From 28b17d9821e0439152ec06fe5f565d5e9acfe89f Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 01:27:33 +0200 Subject: [PATCH 10/19] Try fix --- tests/python_package_test/test_arrow.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/python_package_test/test_arrow.py b/tests/python_package_test/test_arrow.py index 882b79a4cc96..bc7c4dddb2cf 100644 --- a/tests/python_package_test/test_arrow.py +++ b/tests/python_package_test/test_arrow.py @@ -141,10 +141,7 @@ def assert_datasets_equal(tmp_path: Path, lhs: lgb.Dataset, rhs: lgb.Dataset): ("arrow_table_fn", "dataset_params"), [ # Use lambda functions here to minimize memory consumption (lambda: generate_simple_arrow_table(), dummy_dataset_params()), - ( - lambda: generate_simple_arrow_table(empty_chunks=True), - dummy_dataset_params(), - ), + (lambda: generate_simple_arrow_table(empty_chunks=True), dummy_dataset_params()), (lambda: generate_dummy_arrow_table(), dummy_dataset_params()), (lambda: generate_nullable_arrow_table(pa.float32()), dummy_dataset_params()), (lambda: generate_nullable_arrow_table(pa.int32()), dummy_dataset_params()), From d124dbd1add777fd30d55c51e68313cf333b0f45 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 01:28:02 +0200 Subject: [PATCH 11/19] Fix --- tests/python_package_test/test_arrow.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/python_package_test/test_arrow.py b/tests/python_package_test/test_arrow.py index bc7c4dddb2cf..ab871048a949 100644 --- a/tests/python_package_test/test_arrow.py +++ b/tests/python_package_test/test_arrow.py @@ -369,10 +369,7 @@ def assert_equal_predict_arrow_pandas(booster: lgb.Booster, data: pa.Table): def test_predict_regression(): data_float = generate_random_arrow_table(10, 10000, 42) data_bool = generate_random_arrow_table(1, 10000, 42, generate_nulls=False, values=np.array([True, False])) - data = pa.Table.from_arrays( - data_float.columns + data_bool.columns, - names=data_float.schema.names + ["col_bool"], - ) + data = pa.Table.from_arrays(data_float.columns + data_bool.columns, names=data_float.schema.names + ["col_bool"]) dataset = lgb.Dataset( data, From e183202f86ff847b0e109ac66e5e455bc506d427 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 01:29:30 +0200 Subject: [PATCH 12/19] Comment --- .ci/setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci/setup.sh b/.ci/setup.sh index 1fac017bbdfe..104648789bf8 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -17,6 +17,8 @@ if [[ $OS_NAME == "macos" ]]; then sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit 1 fi else # gcc + # Check https://github.com/actions/runner-images/tree/main/images/macos for available + # versions of Xcode sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer || exit 1 if [[ $TASK != "mpi" ]]; then brew install gcc From 911b62dc35f3e0cc16e204e3fe50c8ceac7eb55b Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 10:03:19 +0200 Subject: [PATCH 13/19] Fix --- .github/workflows/python_package.yml | 2 +- .github/workflows/r_package.yml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index 723b7e80161e..ae7716705fa3 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -63,7 +63,7 @@ jobs: export TASK="${{ matrix.task }}" export METHOD="${{ matrix.method }}" export PYTHON_VERSION="${{ matrix.python_version }}" - if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then + if [[ "${{ matrix.os }}" == "macos-13" ]]; then export COMPILER="gcc" export OS_NAME="macos" elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then diff --git a/.github/workflows/r_package.yml b/.github/workflows/r_package.yml index a0220735b824..c0346866deb9 100644 --- a/.github/workflows/r_package.yml +++ b/.github/workflows/r_package.yml @@ -3,11 +3,11 @@ name: R-package on: push: branches: - - master + - master pull_request: branches: - - master - - release/* + - master + - release/* # automatically cancel in-progress builds if another commit is pushed concurrency: @@ -44,25 +44,25 @@ jobs: compiler: gcc r_version: 3.6 build_type: cmake - container: "ubuntu:18.04" + container: 'ubuntu:18.04' - os: ubuntu-latest task: r-package compiler: gcc r_version: 4.3 build_type: cmake - container: "ubuntu:22.04" + container: 'ubuntu:22.04' - os: ubuntu-latest task: r-package compiler: clang r_version: 3.6 build_type: cmake - container: "ubuntu:18.04" + container: 'ubuntu:18.04' - os: ubuntu-latest task: r-package compiler: clang r_version: 4.3 build_type: cmake - container: "ubuntu:22.04" + container: 'ubuntu:22.04' - os: macos-13 task: r-package compiler: gcc @@ -127,7 +127,7 @@ jobs: compiler: gcc r_version: 4.3 build_type: cran - container: "ubuntu:22.04" + container: 'ubuntu:22.04' - os: macos-13 task: r-package compiler: clang @@ -308,7 +308,7 @@ jobs: runs-on: ubuntu-latest needs: [test, test-r-sanitizers, test-r-debian-clang] steps: - - name: Note that all tests succeeded - uses: re-actors/alls-green@v1.2.2 - with: - jobs: ${{ toJSON(needs) }} + - name: Note that all tests succeeded + uses: re-actors/alls-green@v1.2.2 + with: + jobs: ${{ toJSON(needs) }} From 4b97dd26ede5a0f720ea740ca2dda0c07813cca4 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 10:35:06 +0200 Subject: [PATCH 14/19] debug --- .ci/setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/setup.sh b/.ci/setup.sh index 104648789bf8..9c6c5213c663 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -26,6 +26,7 @@ if [[ $OS_NAME == "macos" ]]; then fi if [[ $TASK == "mpi" ]]; then brew install open-mpi + tree /usr/local/Cellar/open-mpi fi if [[ $TASK == "swig" ]]; then brew install swig From bb2ecb94132ed463f39788d141ccd6c341cc468b Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 10:40:29 +0200 Subject: [PATCH 15/19] debug --- .ci/setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 9c6c5213c663..cba37fd54f68 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -26,7 +26,9 @@ if [[ $OS_NAME == "macos" ]]; then fi if [[ $TASK == "mpi" ]]; then brew install open-mpi - tree /usr/local/Cellar/open-mpi + ls /usr/local/Cellar/open-mpi + ls /usr/local/Cellar/open-mpi/5.0.3 + ls /usr/local/Cellar/open-mpi/5.0.3/lib fi if [[ $TASK == "swig" ]]; then brew install swig From fb41b7e5db5205d02890a19ec6059f102a6d99a7 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 11:22:15 +0200 Subject: [PATCH 16/19] prefix path --- .ci/setup.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index cba37fd54f68..e7ed038579d2 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -26,9 +26,7 @@ if [[ $OS_NAME == "macos" ]]; then fi if [[ $TASK == "mpi" ]]; then brew install open-mpi - ls /usr/local/Cellar/open-mpi - ls /usr/local/Cellar/open-mpi/5.0.3 - ls /usr/local/Cellar/open-mpi/5.0.3/lib + export CMAKE_PREFIX_PATH="/opt/homebrew" fi if [[ $TASK == "swig" ]]; then brew install swig From eba09aa1b0b25ed6763b8e5e26b5faa6794d0c4f Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 11:27:04 +0200 Subject: [PATCH 17/19] prefix path --- .ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index e7ed038579d2..9f9e04130574 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -26,7 +26,7 @@ if [[ $OS_NAME == "macos" ]]; then fi if [[ $TASK == "mpi" ]]; then brew install open-mpi - export CMAKE_PREFIX_PATH="/opt/homebrew" + export CMAKE_PREFIX_PATH="/usr/local/Cellar" fi if [[ $TASK == "swig" ]]; then brew install swig From 60958203e3021ac28c1db5fc42f9c171f361f8a1 Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 17:17:33 +0200 Subject: [PATCH 18/19] brew link? --- .ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 9f9e04130574..affc58bc5c59 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -26,7 +26,7 @@ if [[ $OS_NAME == "macos" ]]; then fi if [[ $TASK == "mpi" ]]; then brew install open-mpi - export CMAKE_PREFIX_PATH="/usr/local/Cellar" + brew link open-mpi fi if [[ $TASK == "swig" ]]; then brew install swig From 85939eaa6f30fe773e8851882b5587ba59f0f46f Mon Sep 17 00:00:00 2001 From: Oliver Borchert Date: Thu, 25 Apr 2024 18:03:16 +0200 Subject: [PATCH 19/19] Exclude --- .ci/setup.sh | 1 - .github/workflows/python_package.yml | 26 ++++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index affc58bc5c59..104648789bf8 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -26,7 +26,6 @@ if [[ $OS_NAME == "macos" ]]; then fi if [[ $TASK == "mpi" ]]; then brew install open-mpi - brew link open-mpi fi if [[ $TASK == "swig" ]]; then brew install swig diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index ae7716705fa3..8b2ed1dcc5c1 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -39,18 +39,20 @@ jobs: - os: macos-13 task: if-else python_version: '3.9' - - os: macos-13 - task: mpi - method: source - python_version: '3.10' - - os: macos-13 - task: mpi - method: pip - python_version: '3.11' - - os: macos-13 - task: mpi - method: wheel - python_version: '3.8' + # We're currently skipping MPI jobs on macOS, see https://github.com/microsoft/LightGBM/pull/6425 + # for further details. + # - os: macos-13 + # task: mpi + # method: source + # python_version: '3.10' + # - os: macos-13 + # task: mpi + # method: pip + # python_version: '3.11' + # - os: macos-13 + # task: mpi + # method: wheel + # python_version: '3.8' steps: - name: Checkout repository uses: actions/checkout@v3