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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Linux and Mac ARM wheels #104

Merged
merged 3 commits into from May 30, 2022
Merged

Conversation

cjermain
Copy link
Contributor

This resolves #103 by adding steps for Linux and Mac ARM wheels in the CI build. I also bumped the version of pypa/cibuildwheel to v2.4.0.

Mac support: https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon
Linux support: https://cibuildwheel.readthedocs.io/en/stable/faq/#emulation

I don't have a great way of testing this. 馃槃

@cjermain
Copy link
Contributor Author

cjermain commented May 3, 2022

@jcrist, what do you think?

@jcrist
Copy link
Owner

jcrist commented May 10, 2022

Thanks @cjermain! Apologies for the delay here - it looks like there are some test failures on the new architectures. I'm not sure what's going on - hopefully will find some time to debug before the next release. If you're interested in debugging here, I'd welcome the help, though so far this has been mostly a single-dev codebase and the internals are mostly undocumented.

Updating ci_arm_wheels branch
@cjermain
Copy link
Contributor Author

It looks like the CI issues were related to 2 changes in the main branch since I forked. I've merged upstream into this, and it would be great to kick off the builds again.

@cjermain
Copy link
Contributor Author

It looks like there are still some errors when testing the Linux ARM wheel:
https://github.com/jcrist/msgspec/runs/6528746892?check_suite_focus=true#step:4:821

@solsen2142
Copy link

After testing with the other architectures, it looks the only issue is with aarch64 for Linux. If we only want MacOS for now, we could come back to Linux aarch64 later.

@cjermain
Copy link
Contributor Author

Thanks @solsen2142! I'm hoping to run this on a Linux ARM VM on top of a Mac M1 chip, so for me the Linux build is a priority.

Some ARM compatibility fixes. The main issue here was that C leaves it
up to the implementation whether `char` is a signed or unsigned type. In
x86 systems it's generally a signed type, but on linux ARM it's
unsigned. OSX ARM defines it as a signed type for compatibility with x86
OSX.
@jcrist
Copy link
Owner

jcrist commented May 29, 2022

Thanks for your work here @cjermain - I've pushed up a patch that should (hopefully) fix the linux ARM builds. The main issue was that apparently C leaves it up to the implementation whether char is a signed or unsigned type. On x86 it's generally a signed type, but on linux ARM it's unsigned. OSX ARM defines it as signed for compatibility with x86 OSX.

@jcrist
Copy link
Owner

jcrist commented May 30, 2022

Tests are green, merging. Unfortunately, this makes the linux builds ~8x slower. I'll push a followup PR to trim down the builds for non-releases. We only really need to test on linux once for every python version + one build on aarch64 to catch architecture-specific bugs.

@jcrist jcrist merged commit 3943a01 into jcrist:master May 30, 2022
@jcrist jcrist mentioned this pull request May 30, 2022
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.

Build wheels for Linux/Mac ARM
3 participants