Wykres commitów

15 Commity (master)

Autor SHA1 Wiadomość Data
Angus Gratton 4cc67065dd tools/ci.sh: Add unix-ffi library when testing unix-ffi subdirectory.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2024-02-19 23:21:04 +11:00
Jim Mussared cee0945f1c all: Replace "black" with "ruff format".
- Add config for [tool.ruff.format] to pyproject.toml.
- Update pre-commit to run both ruff and ruff-format.
- Update a small number of files that change with ruff's rules.
- Update CI.
- Simplify codeformat.py just forward directly to "ruff format"

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-12-20 11:56:24 +11:00
Jim Mussared ad0a2590cc tools/verifygitlog.py: Add git commit message checking.
This adds verifygitlog.py from the main repo, adds it to GitHub workflows,
and also pre-commit.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-12-20 11:46:40 +11:00
Jim Mussared efa0402846 tools/codeformat.py: Fix ruff warnings.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-27 12:28:29 +10:00
Jim Mussared 232859250c tools/codeformat.py: Remove git state detection.
This was added to speed up running codeformat.py when only a small number
of files are changed, but it breaks running the tool on the master branch.
The pre-commit tool handles this correctly, and it's working well in the
main repo, so we can remove the special handling.

This makes codeformat.py behave identically to the main repository, but
without additional code for handling .c/.h files.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-27 12:26:08 +10:00
Damien George 752ce66c24 github/workflows: Build all example .py files as part of CI.
Signed-off-by: Damien George <damien@micropython.org>
2023-07-24 10:28:49 +10:00
Jim Mussared 9b5f4d73b0 tools/makepyproject.py: Add tool to generate PyPI package.
This tool makes a buildable package (including pyproject.toml) from
supported micropython-lib packages, suitable for publishing to PyPI and
using from CPython.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-07 13:24:15 +10:00
Angus Gratton 40dfc5fbc5 github/workflows: Attach built packages to GitHub workflow artifacts. 2023-03-02 16:45:08 +11:00
Angus Gratton 1eb282ad47 tools/ci.sh: Support publishing package and index files to GitHub Pages.
Opt-in feature to make it easier for folks to test packages that are still
in development, open in Pull Requests, or even in independent forks.

---

To enable this on your own GitHub fork of the micropython-lib repository
then navigate to the fork's "Settings" -> "Secrets and variables" ->
"Actions" -> "Variables" page, then click "New repository variable", and
create a variable named MIP_INDEX with value true (or any "truthy" value).

Once enabled then any time a branch is pushed to your fork and builds
successfully, GitHub Actions will also push the built packages and package
index to the gh-pages branch which is associated with the repo's GitHub
Pages web site.  The packages can then be installed remotely via:

    mpremote mip --index \
      https://USERNAME.github.io/micropython-lib/mip/BRANCH_NAME PACKAGE_NAME

or on a device as:

    mip.install(PACKAGE_NAME, index="https://USERNAME.github.io/micropython-lib/mip/BRANCHNAME")

(Replace USERNAME, BRANCH_NAME and PACKAGE_NAME as applicable. If you've
renamed your fork, change the name micropython-lib to match.)

Note: As well as the MIP_INDEX repository variable, this functionality
depends on both GitHub Actions and GitHub Pages being enabled on your
repository in GitHub.  However both options should enable automatically,
unless they have been manually disabled.

This work was funded through GitHub Sponsors.
2023-03-02 16:44:18 +11:00
Damien George c1526d2d1e github/workflows: Add workflow to build all packages.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-01 12:28:25 +11:00
Jim Mussared d0f97fc218 tools/build.py: Make build.py work without f-strings.
Allows running on older CPython versions.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-29 23:51:03 +10:00
Jim Mussared 58a93f3d7f tools/build.py: Add script for deploying to a static web server.
This populates https://micropython.org/pi/v2 with compiled packages,
suitable for use by `mip` and `mpremote`.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-29 22:54:32 +10:00
Andrew Leech 22cd7fdd64 tools/codeformat: Fix compatibility running from subfolder in repo. 2022-03-23 12:16:24 +11:00
Andrew Leech ab1e6231dc tools/codeformat: By default only check/update on current git branch.
It can be difficult using the codeformat.py tool when there are other files
in the repository not currently matching the standard.

For developers, running over the entire repo can throw up a large list of
changes in a local git which can lead to inclusion of unrelated changes in
commits if they're added accidentally.  If the files arg is used to trim
down the list of files scanned, it runs a risk of missing some files
they've modified.  In CI, it means that PR's can fail on codeformat for
issues that aren't related to that PR.

This change adds a git query in the codeformat tool by default to only work
on the list of files that have been modified in the current branch.  This
can still be overridden by the files arg to run over all files still, eg.
python3 tools/codeformat.py -v '**'.
2022-03-22 16:46:48 +11:00
Damien George d093a684a4 tools: Add code formatting and CI scripts.
Adapted from the micropython repo.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-27 22:42:36 +10:00