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

Modernize wheel building job config #1783

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

nicholasjng
Copy link
Contributor

It is now possible to build Mac wheels on native machines in Github Actions, so ARM64 Mac wheels are now built and tested on M1 machines.

Also, the artifact up-/download was migrated to v4, which made it necessary to upload wheels to unique artifact names, and then later stitch them together again in a subsequent job.

The cross-platform Mac build injection in setup.py was removed, since it is no longer necessary.

I relanded a monkey-patching of Bazel build files, this time for MODULE.bazel. This is because rules_python does not allow running as the root user, which is the case in cibuildwheel+Linux (happens in a Docker container). Since I did not see a quick way of switching to rootless containers, and did not want to hardcode the config change (it can apparently cause cache misses and build failures), I inject the "ignore_root_user_error" flag into the MODULE.bazel file when running in cibuildwheel on Linux.


That last paragraph wrecked my day, but that's apparently a design choice by rules_python. I verified that the wheels build, see https://github.com/nicholasjng/benchmark/actions/runs/8691995492 (the failure is only because I screwed up the musllinux exclude flag, which I reverted back to how it was.)

It is now possible to build Mac wheels on native machines in Github
Actions, so ARM64 Mac wheels are now built and tested on M1 machines.

Also, the artifact up-/download was migrated to v4, which made it
necessary to upload wheels to unique artifact names, and then later
stitch them together again in a subsequent job.

The cross-platform Mac build injection in setup.py was removed,
since it is no longer necessary.

I relanded a monkey-patching of Bazel build files, this time for
MODULE.bazel. This is because `rules_python` does not allow running
as the root user, which is the case in cibuildwheel+Linux (happens
in a Docker container). Since I did not see a quick way of switching
to rootless containers, and did not want to hardcode the config change
(it can apparently cause cache misses and build failures), I inject the
"ignore_root_user_error" flag into the MODULE.bazel file when running
in cibuildwheel on Linux.
@dmah42 dmah42 merged commit bc946b9 into google:main Apr 15, 2024
80 checks passed
@nicholasjng
Copy link
Contributor Author

Thanks!

@nicholasjng nicholasjng deleted the modernize-wheel-ci branch April 15, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants