10000 .github/workflows/build_mpy_cross.yml: Build various mpy-cross binaries. by jimmo · Pull Request #10834 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

.github/workflows/build_mpy_cross.yml: Build various mpy-cross binaries. #10834

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jimmo
Copy link
Member
@jimmo jimmo commented Feb 24, 2023

This provides binaries that will be used to generate mpy-cross binaries for inclusion in a future PyPI package.

Includes Linux (32-bit and 64-bit), Windows (32-bit and 64-bit), aarch64 (e.g. 64-bit Raspberry Pi 4), armhf (e.g. earlier 32-bit Raspberry Pi), macos (x64, works on M1/ARM too). This is the same set that @andrewleech provides currently for https://pypi.org/project/mpy-cross/ via https://gitlab.com/alelec/mpy_cross/-/blob/master/.gitlab-ci.yml

Demo artifacts are here: https://github.com/jimmo/micropython/actions/runs/4259908934
Tested both Windows builds in Wine, armhf on a Raspberry Pi 3 running Buster, macos on an M1.

I have a Raspberry 4, will test the aarch64 build there soon. Can test the Windows builds on real Windows next week.

Currently using Ubuntu Bionic as the build environment (so that it supports older glibc, i.e. Ubuntu Bionic LTS and Debian Buster). This is deprecated, but we can move to Focal when support is removed (which will support the current Debian/Raspbian Bullseye and Ubuntu LTS).

This work was funded through GitHub Sponsors.

This provides binaries that will be used to generate mpy-cross binaries
for inclusion in a future PyPI package.

Includes Linux (32-bit and 64-bit), Windows (32-bit and 64-bit), aarch64
(e.g. 64-bit Raspberry Pi 4), armhf (e.g. earlier 32-bit Raspberry Pi),
macos (x64, works on M1/ARM too).

Currently using Ubuntu Bionic as the build environment (so that it supports
older glibc, i.e. Ubuntu Bionic LTS and Debian Buster). This is
deprecated, but we can move to Focal when support is removed (which will
support the current Debian/Raspbian Bullseye and Ubuntu LTS).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
@github-actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
        rp2:    +0 +0.000% PICO

@andrewleech
Copy link
Contributor

Nice work bringing it all together!

@dlech
Copy link
Contributor
dlech commented Feb 24, 2023

Alternate solution: https://github.com/pybricks/python-mpy-cross-multi (with binaries provided by https://github.com/pybricks/python-mpy-cross)

Advantages:

  • Proper native Apple arm64 build
  • Not limited to oldest GitHub CI Linux version
  • Proper sdist that includes mpy-cross source code (but not full micropython source tree) so it can be built on platforms with no working binary wheel
  • Having one mpy-cross-vX package for every MPY version allows a single application to target multiple MPY versions. This way, a single application can support both current and older MicroPython targets without having to have two versions of the application. (This seems useful for the micropython-lib "binary wheels" use case where we might want to publish mpy files for both the current stable MicroPython release and the development release which could have a different MPY version at the same time).
  • The work is already done - happy to move the repository to the micropython organization and add MicroPython admins to existing PyPi projects.

Notes:

  • Builds for 32-bit Raspberry Pi are available through piwheels.org rather than through PyPI.

@massimosala
Copy link

Hi

Last year I open as issue regarding the usefulness of two mpy-cross utilities:
#11664

@jimmo Jim suggested to me to continue the discussion here.

I waited ... no hurry ... and now I ask for an update ;-)
Have the two versions been merged?


Docs

For the common man, IMHO, there must be a brief summary of this development in the MP's official documents.
And, if there were still two packages, it would be nice to have two lists of their respective pros/cons.

@dlech
Copy link
Contributor
dlech commented Jun 18, 2024

More recent related discussions:

@andrewleech was working on filling in some of the missing features in his version recently, so maybe close to no longer needing two different packages for different use cases?

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.

4 participants
0