Skip to content

Use cibuildwheel and update grpcio #57

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

Merged
merged 2 commits into from
Jul 1, 2022
Merged

Conversation

cretz
Copy link
Member

@cretz cretz commented Jun 28, 2022

What was changed

Use cibuildwheel in CI now and update grpcio package.

Why?

  • Need cibuildwheel at least for its Linux docker capabilities
    • We get macOS and Linux arm builds out of this (note we don't build Linux arm binaries by default on PRs since they use emulation which is very slow)
  • grpcio made a new release to fix its bad wheel naming for macOS arm builds

Checklist

  1. Closes Investigate more generic manylinux support #10
  2. Closes Support macOS arm64 #9

@cretz cretz requested a review from a team June 28, 2022 19:01
@CLAassistant
Copy link

CLAassistant commented Jun 28, 2022

CLA assistant check
All committers have signed the CLA.

@cretz cretz force-pushed the cibuildwheel branch 12 times, most recently from 7f9ba27 to ebe6762 Compare June 29, 2022 15:38
@cretz cretz force-pushed the cibuildwheel branch 3 times, most recently from e4c7602 to 0334677 Compare June 29, 2022 19:12
@cretz cretz marked this pull request as ready for review June 29, 2022 19:39
# Rename the wheel file and confirm it is changed. We need to make it
# py37 minimum interpreter and abi3 compat.
wheel_file_pieces = existing_wheel_file.split("-")
if len(wheel_file_pieces) < 4:
Copy link
Member

Choose a reason for hiding this comment

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

nit:
Can this be > 4?
If it can't you can destructure into part1, part2, _py, _abi and replace the join with f"{part1}-{part2}-cp37-abi3" (replace part1 and part2 with meaningful names)

Copy link
Member Author

Choose a reason for hiding this comment

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

While I haven't seen more than 4 (file + the 3 platform compat pieces), I am intentionally not assuming the number of parts here, just that I need to replace the third and fourth.

# We separate out Linux aarch64 so we can choose not to run it during PR since
# it is so slow in cibuildwheel (uses QEMU emulation). We can put this back in
# the above matrix when Linux ARM runners are available.
compile-binaries-linux-aarch64:
Copy link
Member

Choose a reason for hiding this comment

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

nit: you can merge this with the matrix above and add conditions to skip in PR CI

Copy link
Member Author

@cretz cretz Jun 29, 2022

Choose a reason for hiding this comment

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

The job if can't include a matrix variable in its expression. It is evaluated before the matrix is loaded. There is also no "exit early" step for a job. Technically I could add an if to each step to skip linux aarch64 during PR, but that is ugly. There are also other ugly options: https://stackoverflow.com/questions/65384420/how-to-make-a-github-action-matrix-element-conditional.

This is the result of several attempts at several options (including workflow reuse which had little value and you can't use a strategy with a job use clause anyways).

(the original version did have these combined before it became clear Linux aarch64 was way too slow, but I still want to keep cibuildwheel's approach instead of custom cross-compile at least if/until we get Linux arm runners)

Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

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

Just a couple of nits, nothing blocking

@cretz cretz merged commit 0392468 into temporalio:main Jul 1, 2022
@cretz cretz deleted the cibuildwheel branch July 1, 2022 15:26
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.

Investigate more generic manylinux support Support macOS arm64
3 participants