From 01960f83b72867204ff4559f12bfad2ca163a950 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 16 Jun 2024 19:56:49 -0500 Subject: [PATCH 1/6] [ci] drop macOS 11 (Big Sur) testing --- .ci/test.sh | 2 +- .vsts-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index 4f3de6a6f1ea..498b3c3ea9cf 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -172,7 +172,7 @@ elif [[ $TASK == "bdist" ]]; then ./dist/*.whl \ ./dist/tmp.whl || exit 1 if [[ $ARCH == "x86_64" ]]; then - PLATFORM="macosx_10_15_x86_64.macosx_11_6_x86_64.macosx_12_5_x86_64" + PLATFORM="macosx_11_0_x86_64.macosx_12_0_x86_64.macosx_13_0_x86_64" else PLATFORM="macosx_14_0_arm64" fi diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 9b440cb9fac1..2b1cdaa4058c 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -254,7 +254,7 @@ jobs: OS_NAME: 'macos' PRODUCES_ARTIFACTS: 'true' pool: - vmImage: 'macOS-11' + vmImage: 'macOS-12' strategy: matrix: regular: From 8292130d7fb2fd6cb93413382e7b331ca98cc8c3 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 16 Jun 2024 20:24:04 -0500 Subject: [PATCH 2/6] let scikit-build-core choose the target platform --- .ci/test.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.ci/test.sh b/.ci/test.sh index 498b3c3ea9cf..d1b5fe5f3ecc 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -168,17 +168,6 @@ elif [[ $TASK == "bdist" ]]; then if [[ $OS_NAME == "macos" ]]; then cd $BUILD_DIRECTORY && sh ./build-python.sh bdist_wheel || exit 1 sh $BUILD_DIRECTORY/.ci/check_python_dists.sh $BUILD_DIRECTORY/dist || exit 1 - mv \ - ./dist/*.whl \ - ./dist/tmp.whl || exit 1 - if [[ $ARCH == "x86_64" ]]; then - PLATFORM="macosx_11_0_x86_64.macosx_12_0_x86_64.macosx_13_0_x86_64" - else - PLATFORM="macosx_14_0_arm64" - fi - mv \ - ./dist/tmp.whl \ - dist/lightgbm-$LGB_VER-py3-none-$PLATFORM.whl || exit 1 if [[ $PRODUCES_ARTIFACTS == "true" ]]; then cp dist/lightgbm-$LGB_VER-py3-none-macosx*.whl $BUILD_ARTIFACTSTAGINGDIRECTORY || exit 1 fi From 912fe1d84ece046642984923df11c0088ad112b8 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 16 Jun 2024 20:33:04 -0500 Subject: [PATCH 3/6] explicitly set MACOSX_DEPLOYMENT_TARGET --- .ci/test.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.ci/test.sh b/.ci/test.sh index d1b5fe5f3ecc..d950f01e989f 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -29,6 +29,19 @@ if [[ $IN_UBUNTU_BASE_CONTAINER == "true" ]]; then export LC_ALL="en_US.UTF-8" fi +# Setting MACOSX_DEPLOYMENT_TARGET prevents CMake from building against too-new +# macOS features, and helps tools like Python build tools determine the appropriate +# wheel compatibility tags. +# +# ref: +# * https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html +# * https://github.com/scikit-build/scikit-build-core/blob/acb7d0346e4a05bcb47a4ea3939c705ab71e3145/src/scikit_build_core/builder/macos.py#L36 +if [[ $ARCH == "x86_64" ]]; then + export MACOSX_DEPLOYMENT_TARGET=10.15 +else + export MACOSX_DEPLOYMENT_TARGET=12.0 +fi + if [[ "${TASK}" == "r-package" ]] || [[ "${TASK}" == "r-rchk" ]]; then bash ${BUILD_DIRECTORY}/.ci/test_r_package.sh || exit 1 exit 0 From 193b1105b65bafd2327fd403a6430ebe4e148b7f Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 16 Jun 2024 21:05:14 -0500 Subject: [PATCH 4/6] update Xcode version --- .ci/setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 7fe54db9c2fc..3641d5132ade 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -14,7 +14,8 @@ if [[ $OS_NAME == "macos" ]]; then if [[ $COMPILER == "clang" ]]; then brew install libomp if [[ $AZURE == "true" ]]; then - sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer || exit 1 + ls /Applications/Xcode-* + sudo xcode-select -s /Applications/Xcode_12.5.1.app/Contents/Developer || exit 1 fi else # gcc # Check https://github.com/actions/runner-images/tree/main/images/macos for available From a5ff6fe32ce5cb2f9b6043b0677e6bfe06e7f848 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 16 Jun 2024 21:23:08 -0500 Subject: [PATCH 5/6] more logs --- .ci/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 3641d5132ade..5b288be73fab 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -14,7 +14,7 @@ if [[ $OS_NAME == "macos" ]]; then if [[ $COMPILER == "clang" ]]; then brew install libomp if [[ $AZURE == "true" ]]; then - ls /Applications/Xcode-* + ls /Applications/ || true sudo xcode-select -s /Applications/Xcode_12.5.1.app/Contents/Developer || exit 1 fi else # gcc From 5fe2f1214cbe0106237247032d4e7de4d4a51ed7 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 16 Jun 2024 21:28:41 -0500 Subject: [PATCH 6/6] fix Xcode version --- .ci/setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 5b288be73fab..3fd3356e34d7 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -14,8 +14,7 @@ if [[ $OS_NAME == "macos" ]]; then if [[ $COMPILER == "clang" ]]; then brew install libomp if [[ $AZURE == "true" ]]; then - ls /Applications/ || true - sudo xcode-select -s /Applications/Xcode_12.5.1.app/Contents/Developer || exit 1 + sudo xcode-select -s /Applications/Xcode_13.1.0.app/Contents/Developer || exit 1 fi else # gcc # Check https://github.com/actions/runner-images/tree/main/images/macos for available