-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix dependency typo and unpin cibuildwheel version in wheel building … #1263
Conversation
brilliant! thank you :) there's some bazel actions here that you can copy, and maybe this action will help with the pybind issue? |
did you want to land this change as is while you work through the other issues? |
Thank you @dominichamon! I wanted to submit a working solution, so I will continue fixing the other stuff and rebasing until it works.
Hmmm ok, I'll try that out then. I'll focus on fixing the Linux bazel problem first, because that seems "in reach". Hope I won't run out of Github Actions Free Tier minutes along the way though :) |
for the purposes of this PR if you set the action to trigger on pull request you should be able to use my quota. |
The failure confuses me even more considering that the I created another branch, and the discovery fails even with a preceding successful Bazel cache mounting, so it seems something else is going on. Maybe Bazel does not show up on PATH (probably unlikely), or cibuildwheel does not have access to PATH. Latest attempt: https://github.com/nicholasjng/benchmark/runs/4020132378 |
i'm a bit out of my depth here but is it possible you're building from within a docker container that doesn't have bazel installed? |
That was right! I fiddled around and it turns out that you have to install Bazel into the container itself. After some tries, I succeeded in building x86 wheels using the Apparently in this form Consider the failure for aarch64 after the x86_64 run; there, the bazel installation fails due to a failure to Let me know what you think. |
maybe you can make your life simpler using https://cibuildwheel.readthedocs.io/en/stable/options/#archs to get just a couple of basic ones working first. |
d47d5f3
to
6cba205
Compare
Good news, I have been able to get all wheels to build on all platforms after some tweaks. Completed run: https://github.com/nicholasjng/benchmark/actions/runs/1434685479 Featured wheels (all including Python 3.7-3.10)
Left TODO are:
|
nice! is it ready for me to review? |
Yes, please! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you want to have this run on push instead of manually?
.github/workflows/wheels.yml
Outdated
with: | ||
name: dist | ||
path: wheelhouse/*.whl | ||
|
||
build_wheels: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe "build_windows" to match the others?
TBH, I am not sure: The wheels should be built for every new release, since PyPI also groups them by release (and the release numbers are part of the wheel names). I have seen repos with the trigger set to published release, but given that the Python bindings version and the Google Benchmark version are not the same, this would fail if a new GBM version gets published without a new Python bindings version. One could prevent this, though, by checking the release tag against the current. What do you think? |
gotcha.
i'm missing something, why are they not the same?
i don't know exactly how this would work but i would like to see this automated if at all possible. if not possible, then could you add instructions to the releasing doc? https://google.github.io/benchmark/releasing.html |
That I am not sure about, either.
This is definitely possible. I did this on a hobby project previously, I think I will use the logic from there. Regarding the versioning, I see two possibilities (largely):
I personally favor option 1), but ultimately it is of course your call. Also, I should add a wheel pushing step to upload the built wheels to PyPI (using |
option 1 sounds great and would make a lot of sense to users. no, we've had no need for a pypi api token. let's tackle that as a separate PR maybe :) |
As of this commit, all wheel building jobs complete on GitHub Actions. Since some platform-specific options had to be set to fix different types of build problems underway, the build job matrix was unrolled. Still left TODO: * Wheel testing after build (running the Python bindings test) * Emulating bazel on other architectures to build aarch64/i686/ppc64le * Enabling Win32 (this fails due to linker errors).
6cba205
to
b1e8848
Compare
I added wheel test commands and a published release trigger in b1e8848. Every built wheel (except macOS ARM, which cannot yet be tested on GHA runners) passes the tests (one run through the Python bindings). Also, I edited the |
happy for me to merge? |
Yeah, I guess we can do the PyPI publishing job separately (I would need your input on that again). Would you like me to add a note about bumping the Python bindings version before tagging/release? |
oh, yes if the version needs to be bumped somewhere new then that should be in the docs/releasing.md doc. |
Done in 62e5038. |
thanks! |
google#1263) * Fix dependency typo and unpin cibuildwheel version in wheel building action * Move to monolithic build jobs, restrict to x64 architectures As of this commit, all wheel building jobs complete on GitHub Actions. Since some platform-specific options had to be set to fix different types of build problems underway, the build job matrix was unrolled. Still left TODO: * Wheel testing after build (running the Python bindings test) * Emulating bazel on other architectures to build aarch64/i686/ppc64le * Enabling Win32 (this fails due to linker errors). * Add binding test commands for all wheels, set macOSX deployment target to 10.9 * Add instructions for updating Python __version__ variable before release creation
…action.
Apologies for abandoning the Python wheels, I got sidetracked by some things over the last few months. In its current form, the wheel building action did not work due to a careless typo by me, that is fixed with this commit.
I started a first hail-mary workflow run in my fork just a few minutes ago. The results can be found here. In short, as a summary:
So that is currently 1/3. If someone has experience with setting up Bazel inside GitHub Actions (specifically Linux and Windows), I would love to get some direction on this.
cc @yashk2810 (who caught the typo here)