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] [python-package] build macOS x86_64 wheels on macOS 13 (Ventura) #6669

Merged
merged 12 commits into from
Jan 20, 2025

Conversation

jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Oct 9, 2024

I recently noticed warnings like this on Azure DevOps:

A brownout will take place on November 4, 14:00 UTC - November 5, 00:00 UTC to raise awareness of the upcoming macOS-12 environment removal. For more details, see actions/runner-images#10721

This proposes moving Azure DevOps x86_64 macOS jobs in this project to macOS 13 (Ventura).

Notes for Reviewers

Some relevant links.

.ci/setup.sh Outdated Show resolved Hide resolved
@StrikerRUS
Copy link
Collaborator

This PR is a blocker now.

Target date
Azure DevOps - January 13th, 2025

All Azure macOS jobs are failing with

##[error]No config name or imagelabel provided in request
,##[error]The remote provider was unable to process the request.

now. E.g. https://dev.azure.com/lightgbm-ci/lightgbm-ci/_build/results?buildId=17480&view=results

@jameslamb
Copy link
Collaborator Author

ugh sorry for letting it slip. I will work on this right now.

@jameslamb jameslamb self-assigned this Jan 20, 2025
@jameslamb
Copy link
Collaborator Author

Ok, getting closer! Python jobs are producing wheels with the expected tags.

checking './dist/lightgbm-4.5.0.99-py3-none-macosx_10_15_x86_64.whl'

(Azure DevOps Python bdist job on macos-13, x86_64)

checking './dist/lightgbm-4.5.0.99-py3-none-macosx_12_0_arm64.whl'

(GitHub Actions Python bdist job on macos-14, arm64)

However, the r-package (macos-13, clang, R 4.3, cran) job is failing with this NOTE from R CMD check:

* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
  ‘dsymutil-328525’ ‘dsymutil-b1ee31’ ‘dsymutil-bde960’

(build link)

I'll try to fix that.

xcode_path="/Applications/Xcode_14.3.app/Contents/Developer"
else
xcode_path="/Applications/Xcode_15.0.app/Contents/Developer"
fi
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chose the oldest included versions of XCode from here:

And while doing this, proposing this more-direct approach for selecting the version... depending on the actual macOS version instead of things that indirectly select it from this project's CI configs, like $AZURE and $COMPILER.

# ref:
# - https://github.com/llvm/llvm-project/issues/61920
# - https://github.com/golang/go/issues/59026#issuecomment-1520487072
DSYMUTIL_REPRODUCER_PATH: /dev/null
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When dsymutil is run with e.g. --gen-reproducer or similar flags, it leaves behind these temporary directories with details for filing bug reports.

In some versions of clang, those are not cleaned up correctly (llvm/llvm-project#61920).

dsymutil is writing those files to TMPDIR, which is the "temp directory" referred to in this R CMD check NOTE.

Redirecting these files to anywhere else avoids the R CMD check NOTE. That can be done via environment variable DSYMUTIL_REPRODUCER_PATH. Here, I'm following the tip from golang/go#59026 (comment) and using /dev/null, so the files aren't even written to disk at all.

I think this is all fine for CI. If this kind of thing was a problem on CRAN, it'd affect every project on CRAN building with clang 14, as I LightGBM isn't doing anything custom with dsymutil.

@jameslamb jameslamb changed the title WIP: [ci] [python-package] build macOS x86_64 wheels on macOS 13 (Ventura) [ci] [python-package] build macOS x86_64 wheels on macOS 13 (Ventura) Jan 20, 2025
@jameslamb jameslamb marked this pull request as ready for review January 20, 2025 06:53
@jameslamb jameslamb requested a review from StrikerRUS as a code owner January 20, 2025 06:53
Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for fast update!

@StrikerRUS StrikerRUS merged commit 7679c73 into master Jan 20, 2025
48 checks passed
@StrikerRUS StrikerRUS deleted the macos-version branch January 20, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants