Skip to content

Update to use pre compiled mpy-cross binaries #19

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 11 commits into
base: main
Choose a base branch
from

Conversation

jake1164
Copy link
Contributor

build-mpy stopped working and compiling the CircutPython version so I made the changes indicated in #17. I removed the CircuitPython checkout and replaced it with pulling the default (current 8.0.5) version of mpy-cross. I also added the ability to specify a specific version of mpy-cross.

Changed from fetch-submodules to fetch-all-submodules.

The error message "No rule to make target 'fetch-submodules'. Stop." might be resolved by using the correct make targets. Here are some relevant findings from the adafruit/circuitpython repository:

Makefile Targets:

fetch-translate-submodules: Fetches submodules for translation.
fetch-all-submodules: Fetches submodules for all ports.
Relevant Issues:

Issue #9301: Discusses issues with submodule fetching in CI actions.
Issue #9552: Details on setup documentation and fetching submodules for the Espressif build environment.
Issue #8027: Provides information on issues related to building with submodules.
To resolve the issue, you can try running:

make fetch-all-submodules
For more details on related issues, you can view the full list of discussions here.
@jake1164
Copy link
Contributor Author

Not sure if there is a better way or maybe not include a default version, the default version could get outdated pretty quickly and require frequent changes. Any thoughts or preferences? I guess based on the change frequency I would lean no default and the user having to specify the version.

@tekktrik
Copy link
Member

Hi! Sorry this slipped by me, let me take a look over the next couple days and get back to you!

@tekktrik tekktrik self-requested a review March 10, 2025 18:00
@jake1164
Copy link
Contributor Author

jake1164 commented Mar 10, 2025 via email

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am so sorry for the late review. I really like this idea of using the pre-comipled binary. I think there are a couple of API-like changes I'd want to keep retained, but on the whole this is a great change! Let me know if you're still able to work on this, or I can take it from here if you've unfortunately had to move on.

@@ -20,9 +20,8 @@ Inputs
Argument Name Description Default Notes
======================= ===================================================================== ==================== =====================================================================
github-token Your GitHub token N/A N/A
circuitpy-tag The version of CircuitPython to compile for N/A You can use any valid tag (or branch) from ``adafruit/circuitpython``
mpy-cross-version The version of mpy-cross to download and use 9.2.4 You can specify any version from ``https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/mpy-cross/linux-amd64``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be a little overwhelming and translates to the same effect as the CircuitPython version. I think this name and description should remain as is, so it's easier for people to understand exactly which version they should be selecting. In that case, changing it to circuitpy-version would also be appropriate.

cd ${{ inputs.circuitpython-repo-name }}/mpy-cross
make clean
make
mkdir mpy-cross
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having the escape hatch of the folder name being customizable is nice in the VERY rare event it conflicts with something in the user's repository. I'd keep this functionality included, though I'd rename it to something more appropriate if we're downloading the pre-compiled binary. Altertnatively, you could just place it in the root folder, in which case I agree the escape hatch isn't needed.

files should or should not be compiled and/or zipped. For example, if you wanted to compile and zip
files in a folder named ``microcontroller`` and you wanted to use a manifest file named ``mpy_manifest.txt``
to specify certain files NOT to compile, you could modify the script above to be:
files should or should not be compiled and/or zipped as well as the ability to specify a different mpy-cross
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just missing a period at the end of the sentence. I would also make this refer to the version of CircuitPython instead of specifically to the mpy-cross version.

@jake1164
Copy link
Contributor Author

jake1164 commented May 23, 2025 via email

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.

2 participants