Skip to content

Adding Linux and Mac ARM wheels - #104

Merged
jcrist merged 3 commits into
msgspec:masterfrom
cjermain:ci_arm_wheels
May 30, 2022
Merged

Adding Linux and Mac ARM wheels#104
jcrist merged 3 commits into
msgspec:masterfrom
cjermain:ci_arm_wheels

Conversation

@cjermain

Copy link
Copy Markdown
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

cjermain commented May 3, 2022

Copy link
Copy Markdown
Contributor Author

@jcrist, what do you think?

@jcrist

jcrist commented May 10, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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

@stephanieolsen

Copy link
Copy Markdown

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
Copy Markdown
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

jcrist commented May 29, 2022

Copy link
Copy Markdown
Member

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

jcrist commented May 30, 2022

Copy link
Copy Markdown
Member

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 msgspec: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