Closed maranov closed 1 year ago
Thank you so much! Could you please open a PR and maybe see if you can include your platform in the github set of actions (the tests should be enough)?
Haven't used Actions yet (just GitLab CI/CD). I've experimented a bit with https://github.com/marketplace/actions/run-on-architecture, but I haven't figured out how to combine it with poetry/venv/etc. steps. Maybe I'll experiment a bit more later...
Either way, I've submitted just the build fix. The conditions should work fine based on the tests on my machines:
An old AMD64 Centos 7:
ARMv8 (RPi 4) Ubuntu:
AMD64 Windows 10:
I think the action you got is a good one, we can include it in the matrix run in .github/workflows/run_tests.yml
There should be only one item to add in the whole set of steps, then things should go smoothly.
I've done a bit of experimenting in https://github.com/maranov/pyModeS/tree/feature/aarch64-actions. The install-poetry and other actions don't support different architectures and multiple actions can't be combined (AFAIK). So the solution would IMHO be an additional separate job, where everything runs in an AArch64 container. Without the setup-python/install-poetry I'm limited to the Python version supplied with the distro, though. There's some issue with poetry as well that I haven't figured out yet.
Normally I'd just use the official Python Docker containers, but Actions only support AMD64/x86 and run-on-arch already needs to make its own container to emulate the chosen architecture. So, we'll probably have to accept that non-AMD64 pipeline will be more limited regarding OS/Python version combinations.
Hi, the 2.14 fails to build on non-AMD64 platforms, where some of the (optimization) GCC flags are unavailable. I've managed to build it on ARMv8 by limiting the flags to just AMD64:
AFAIK there's no direct equivalent for any of these flags on AArch64 (vectorization is already part of the base instruction set). Running
python -m pytest tests
passes OK. Themake ext/make test
instructions from the Readme no longer work due tosetup.py
being removed.What do you think? I could open a PR if this looks OK.
Build attempt
``` # pip install . --upgrade Processing /host Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting pyzmq<25.0,>=24.0 Downloading pyzmq-24.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (894 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 894.4/894.4 KB 6.0 MB/s eta 0:00:00 Collecting numpy<2.0,>=1.24 Downloading numpy-1.24.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 12.6 MB/s eta 0:00:00 Building wheels for collected packages: pymodes Building wheel for pymodes (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for pymodes (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [59 lines of output] Compiling pyModeS/c_common.pyx because it changed. Compiling pyModeS/decoder/flarm/decode.pyx because it changed. [1/2] Cythonizing pyModeS/c_common.pyx [2/2] Cythonizing pyModeS/decoder/flarm/decode.pyx gcc: error: unrecognized command-line option ‘-msse’ gcc: error: unrecognized command-line option ‘-msse2’ gcc: error: unrecognized command-line option ‘-mfma’ gcc: error: unrecognized command-line option ‘-mfpmath=sse’ Traceback (most recent call last): File "/usr/local/lib/python3.8/distutils/unixccompiler.py", line 117, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + File "/usr/local/lib/python3.8/distutils/ccompiler.py", line 910, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/local/lib/python3.8/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/local/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix raise DistutilsExecError( distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "build.py", line 77, in