junzis / pyModeS

Python decoder for Mode S and ADS-B signals
GNU General Public License v3.0
546 stars 153 forks source link

Fix the build failing on Linux platforms other than AMD64 (x86_64) #139

Closed maranov closed 1 year ago

maranov commented 1 year ago

137

xoolive commented 1 year ago

Thank you for the effort, I will merge after I find the time to test with https://github.com/marketplace/actions/run-on-architecture

maranov commented 1 year ago

deploy_other_archs job added. Had to merge the steps into a single-step equivalent so they can execute with run-on-arch images. Everything is set up manually, so the Python interpreter is limited to the version that comes with the distro. Not ideal, but it should cover the typical use cases.

Uploading Codecov reports might be redundant in deploy_other_archs. The step could probably be removed, but I've kept it.

VEnv and Docker image caching seems to work OK. The emulation is slow, but the runtime is IMHO still reasonable.

xoolive commented 1 year ago

There were other issues of compilation, so I removed all compilation optimisation, so this makes this proposal obsolete. I will look further into integrating the check on different platforms though, so your work is not lost!

maranov commented 1 year ago

@xoolive, no problem. At least I had a reason to check out GitHub Actions.

Slightly related: Since PMS now requires compilation, it can't be installed in environments where there is no compiler, like the python-slim Docker images. This is probably fine, but should you look for a reason to implement builds & tests for every platform, then having all platform-dependent wheels on PyPi could be an additional benefit.

xoolive commented 1 year ago

Do you know the libc version on that docker image? Because in the end it all boils down to this... there are compiled wheels for this new release on pypi but if your libc is older you may not be able to use it. But it's easy to adjust afterwards

maranov commented 1 year ago

You're right. What I've said above only applied to PMS 2.14.

The Docker images are Debian-based. Bullseye's libc is 2.31. Same for Ubuntu 20.04. So the issue only affects older (though still supported) LTSes (Ubuntu 22.04 is fine, for example).

xoolive commented 1 year ago

Then do we agree that it could be enough as is?

maranov commented 1 year ago

Using ubuntu-20.04 instead of ubuntu-latest (22.04) should expand the wheel compatibility, but I'm leaving this completely up to you. It's not a problem for my use cases. Just wanted to let you know.

xoolive commented 1 year ago

Well, you are right on one hand, but on the other, ubuntu-20.04 will end up being deprecated while ubuntu-latest will not.

Recompiling the library for an older Linux system is quite easy, so I would rather leave it as is...