Skip to content

Commit

Permalink
[ci] [python-package] build macOS x86_64 wheels on macOS 13 (Ventura) (
Browse files Browse the repository at this point in the history
…#6669)

* [ci] [python-package] build macOS x86_64 wheels on macOS 13 (Ventura)

* update Xcode version

* Update .ci/setup.sh

* fix XCode version detection

* revert debugging change

* remove dsymutil dirs

* avoid producing dsymutil reproducer directories

* restore all CI
  • Loading branch information
jameslamb authored Jan 20, 2025
1 parent e61bcbe commit 7679c73
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
15 changes: 9 additions & 6 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ ARCH=$(uname -m)


if [[ $OS_NAME == "macos" ]]; then
# Check https://github.com/actions/runner-images/tree/main/images/macos for available
# versions of Xcode
macos_ver=$(sw_vers --productVersion)
if [[ "${macos_ver}" =~ 13. ]]; then
xcode_path="/Applications/Xcode_14.3.app/Contents/Developer"
else
xcode_path="/Applications/Xcode_15.0.app/Contents/Developer"
fi
sudo xcode-select -s "${xcode_path}" || exit 1
if [[ $COMPILER == "clang" ]]; then
brew install libomp
if [[ $AZURE == "true" ]]; then
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
# versions of Xcode
sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer || exit 1
brew install 'gcc@12'
fi
if [[ $TASK == "mpi" ]]; then
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/r_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
# on Debian-based images, avoid interactive prompts
DEBIAN_FRONTEND: noninteractive
# Fix issues like the following that can show up running 'R CMD check' on
# specific clang versions:
#
# * checking for detritus in the temp directory ... NOTE
# Found the following files/directories:
# ‘dsymutil-63923a’ ‘dsymutil-9aa721’ ‘dsymutil-b7e1bb’
#
# These are unlikely to show up in CRAN's checks. They come from
# 'dsymutil ---gen-reproducer' being run (not something LightGBM explicitly does).
#
# ref:
# - https://github.com/llvm/llvm-project/issues/61920
# - https://github.com/golang/go/issues/59026#issuecomment-1520487072
DSYMUTIL_REPRODUCER_PATH: /dev/null
# parallelize compilation (extra important for Linux, where CRAN doesn't supply pre-compiled binaries)
MAKEFLAGS: "-j4"
# hack to get around this:
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ jobs:
OS_NAME: 'macos'
PRODUCES_ARTIFACTS: 'true'
pool:
vmImage: 'macOS-12'
vmImage: 'macOS-13'
strategy:
matrix:
regular:
Expand Down

0 comments on commit 7679c73

Please sign in to comment.