Skip to content

Build extensions in mpconfigport and mpconfigboard #6629

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

Merged
merged 5 commits into from
Jul 26, 2022

Conversation

Neradoc
Copy link

@Neradoc Neradoc commented Jul 22, 2022

Move the list of extensions per board into mpconfigport.mk an mpconfigboard.mk, with CIRCUITPY_BUILD_EXTENSIONS as a list of the exact extensions, eg: bin,uf2. Default port value is set in the port config file, by variant if necessary (like IDF_TARGET).
resolves #6269 and replaces #6618

The list of extensions is retrieved along other configuration data with get_settings_from_makefile which uses a call to make in order to automatically manage defaults per port and overrides per board.
It is used from 3 files:

  • shared_bindings_matrix.py which is part of the build-doc workflow and Read The Docs.
  • build_board_info.py which is part of the circuitpython.org update workflow.
  • build_release_files.py which is part of the build workflow, once per board.

The support matrix docs page seems properly generated.
The json generated by build_board_info matches the output from main.
The build CI on my fork reported no errors, though I only briefly checked if the generated files matched (uf2, bin, etc.).

Other notes:

  • support_matrix_by_board returns each board info as a dict. (with changes to support_matrix.rst)
  • that dictionary now contains the list of extensions to build.
  • the frozen modules can optionally be paired with the URL of the module's repo for the matrix.
  • move get_board_mapping() into the support matrix script.

I originally wanted to reorganize the python tools a little bit with this PR, by making a module in the tools directory for the common functions. However, this demands a little bit more consideration, to separate configuration data that should cause a build of all boards, versus those that don't. It can come later.

For example ALIASES_BRAND_NAMES only matters for the website update, whereas adding to LANGUAGE_ALLOW_LIST should probably trigger a compile of all, baring a trick to only compile the new language.

jepler
jepler previously approved these changes Jul 22, 2022
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

I didn't spot any concerns. I didn't do any direct testing, though, so leaving unmerged right this second in case someone else wants to do that. Thanks for working on this! The scripts don't have to be perfected today, but it's good to take a look every now and then to see what can be better. Please feel free to ping if nobody else weighs in.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Awesome! I merged a conflict in (sorry!) so it'll need one more rev. Thanks!

Neradoc added 5 commits July 26, 2022 18:15
- define CIRCUITPY_BUILD_EXTENSIONS to predefined values
- set CIRCUITPY_BUILD_EXTENSIONS in port and board config
- reuse the support matrix "get_settings_from_makefile" to get it
- move the existing port and board specific values
- remove the C3 specific board values because it's not the default
- update build_release_files.py to use get_settings_from_makefile
the modules_support_matrix usees a dictionnary per board instead of a list
optionally include the frozen modules URLs in it
…a list from there

uppercase some of the configuration lists and dicts
properly split the extensions into a list
@Neradoc Neradoc force-pushed the board-extensions-in-boards-dir branch from f35dca8 to 6e5c818 Compare July 26, 2022 16:19
@Neradoc
Copy link
Author

Neradoc commented Jul 26, 2022

Rebased on main.

@tannewt
Copy link
Member

tannewt commented Jul 26, 2022

This was a network error.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Thank you!

@tannewt tannewt merged commit bc926b0 into adafruit:main Jul 26, 2022
@Neradoc Neradoc deleted the board-extensions-in-boards-dir branch August 10, 2022 00:53
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.

Move "extension_by_board" deeper into Ports
3 participants