Commit graph

678 commits

Author SHA1 Message Date
Dan Halbert
ae4e79224e set PULL in proper workflow file 2023-11-22 10:59:27 -05:00
Dan Halbert
0bd2a377b3 add branch and PR number to uploaded build filenames 2023-11-22 10:51:30 -05:00
Jim Mussared
303ccca7c6 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 (and only check C
  files when running codeformat.py)
- Update CI.
- Simplify codeformat.py to remove all the Python-specific logic (just run
  "ruff format" directly).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-11-03 13:30:38 +11:00
Scott Shawcroft
7f4bb4da93
Switch to GCC 13.2 2023-10-30 20:30:30 -07:00
Jim Mussared
e579ebb11b teensy: Remove the teensy port.
This port is largely unmaintained, has limited features (the only hardware
support is for GPIO and timer, and no machine module), only supports a
small number of Teensy boards, and can be confused with the mimxrt support
for Teensy 4.x.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
2023-10-31 13:04:41 +11:00
Jim Mussared
3bf70f16e9 py/mkrules.mk: Add MICROPY_PREVIEW_VERSION_2.
This provides a way to enable features and changes slated for MicroPython
2.x, by running `make MICROPY_PREVIEW_VERSION_2=1`. Also supported for
the cmake ports (except Zephyr).

This is an alternative to having a 2.x development branch (or equivalently,
keeping a 1.x release branch). Any feature or change that needs to be
"hidden" until 2.x can use this flag (either in the Makefile or the
preprocessor).

A good example is changing function arguments or other public API features,
in particular to aid in improving consistency between ports.

When `MICROPY_PREVIEW_VERSION_2` is enabled, the REPL banner is amended to
say "MicroPython (with v2.0 preview) vX.Y.Z", and sys.implementation gets a
new field `_v2` set to `True`.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-27 15:28:46 +11:00
Dan Halbert
557efbeb29 restore lib/mbedtls; remove gzip doc; restore zlib tests 2023-10-24 12:51:54 -04:00
Dan Halbert
342b5e2884 .github/workflows/run-tests.yml: drop 'u' 2023-10-24 12:18:33 -04:00
Scott Shawcroft
48f4b0f7cb
Switch to gcc 12.3 for arm32
Fixes #7432
2023-10-17 11:43:38 -07:00
Jim Mussared
c2361328e1 github/workflows: Pin ruff to 0.1.0 and change flags for new version.
The `--format` flag was changed to `--output-format` in the recent update.

Pin to this version to prevent further updates from breaking (e.g. through
new rules or other changes).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-17 13:56:33 +11:00
Dan Halbert
057dc8df19 fix build directories assumed by S3 upload commands 2023-10-16 22:11:21 -04:00
Scott Shawcroft
9c9819d021
Hopefully fix mpy-cross upload 2023-10-16 10:43:30 -07:00
Scott Shawcroft
9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Scott Shawcroft
db9085cab7
Hopefully fix mpy-cross-mac build 2023-10-11 10:04:03 -07:00
Scott Shawcroft
9ded673895
Unpack mpy-cross to the new location 2023-10-11 10:04:03 -07:00
Scott Shawcroft
22a44c6003
Try and fix mpy-cross variants 2023-10-11 10:03:46 -07:00
Jim Mussared
5232847771 README.md: Update CI badges.
- Fix URL for the unix badge.
- Add stm32 CI badge.
- Add docs CI badge (linking to the documentation)
- Make docs CI run on push (so we get a badge generated).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-06 16:39:55 +11:00
Jos Verlinde
a93ebd0e03 docs: Add requirements.txt file with dependencies for Sphinx.
Signed-off-by: Jos Verlinde <Jos.Verlinde@Microsoft.com>
2023-10-02 12:35:12 +11:00
MicroDev
02da5ca22f
update espressif ci 2023-09-13 11:35:14 -07:00
dependabot[bot]
5e50593738 github/workflows: Bump actions/checkout from 3 to 4.
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 11:27:05 +10:00
Dan Halbert
4a62665175 fix native tests 2023-08-22 12:57:47 -04:00
a94301122a
Make natmods work again.
And put back our magic number, because our bytecode format differs
from upstream

drop btree & framebuf natmods, they had additional problems I didn't
want to fix right now.
2023-08-19 16:59:13 -05:00
Damien George
6a9db521ed github/workflows: Update esp32 CI to use IDF v5.0.
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23 15:34:53 +10:00
Dan Halbert
e684d19c76 apt-get update before apt-get install for mpy-cross 2023-05-20 23:42:30 -04:00
Damien George
ab3f9ecb59 github/workflows: Force use of Ubuntu-20.04 for unix 32-bit builds.
To be able to install libffi-dev:i386.

Signed-off-by: Damien George <damien@micropython.org>
2023-05-18 13:12:40 +10:00
Tekktrik
6f8670a284 Updated how stubs are built 2023-05-09 22:01:24 -04:00
Christian Clauss
78a1aa1711 github/workflows: Add GitHub Action to lint Python code with ruff.
Signed-off-by: Damien George <damien@micropython.org>
2023-05-02 23:52:11 +10:00
Damien George
b1229efbd1 all: Fix spelling mistakes based on codespell check.
Signed-off-by: Damien George <damien@micropython.org>
2023-04-27 18:03:06 +10:00
Damien George
e131b53fdf github/workflows: Add spell check to code formatting workflow.
Signed-off-by: Damien George <damien@micropython.org>
2023-04-27 18:03:06 +10:00
Jim Mussared
82a59a824c github/workflows: Fetch full history for mpremote workflow.
Instead of doing the shallow checkout followed by an unshallow-with-tags,
just set fetch-depth=0 to get the full history to start with.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-27 12:59:22 +10:00
Dan Halbert
d1df7e9cff Add 'sudo apt-get update' before any 'sudo apt-get install' 2023-04-17 19:51:02 -04:00
MicroDev
3a4bffdd65
use correct commits for diff 2023-03-12 09:44:13 +05:30
MicroDev
a6400fb08a
use intersection of changes per commit and merge ref 2023-03-11 00:26:34 +05:30
MicroDev
64ba371f28
conditionally run jobs on push 2023-03-10 16:33:43 +05:30
MicroDev
f0b509cd0d
partially revert refactor workflow names 2023-03-08 00:51:02 +05:30
MicroDev
03bb7ff652
refactor boards / build to ports / board 2023-03-07 03:22:31 +05:30
MicroDev
b17364a447
conditionally build all languages 2023-03-04 15:08:54 +05:30
MicroDev
d35297ceae
refactor workflow names 2023-03-04 12:11:30 +05:30
MicroDev
055c9bfb40
split boards dynamically 2023-03-04 12:10:36 +05:30
dependabot[bot]
fc4c47f7bc github/workflows: Bump actions/upload-artifact from 2 to 3.
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 11:13:24 +11:00
dependabot[bot]
cd4e53a2fe github/workflows: Bump actions/checkout from 2 to 3.
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 11:11:48 +11:00
dependabot[bot]
ddebda55e7 github/workflows: Bump actions/setup-python from 1 to 4.
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 1 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v1...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 10:54:45 +11:00
Dan Halbert
8c714ec864
Merge pull request #7497 from tannewt/banglejs2
Add Bangle.js 2, JDI memory displays and ACeP epd
2023-02-24 18:20:06 -05:00
MicroDev
0e17deff05
ci fix scheduler 2023-02-24 11:41:41 +05:30
Jim Mussared
7c6a9856ea github/workflows: Add workflow to build mpremote wheel.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-24 11:50:28 +11:00
Scott Shawcroft
f832386cda
Merge remote-tracking branch 'adafruit/main' into banglejs2 2023-02-23 14:43:38 -08:00
MicroDev
60a9c7e5b2
move windows workflow to build ci and more 2023-02-23 14:39:37 +05:30
MicroDev
f4f95ada79
fix empty exclude commit 2023-02-22 20:49:14 +05:30
MicroDev
1ea21cc8fc
refactor and simplify fetching port deps 2023-02-22 20:11:38 +05:30
MicroDev
592fea6822
split atmel-samd instead of raspberrypi 2023-02-22 20:08:13 +05:30
Dan Halbert
932b10f551
Merge pull request #7627 from MicroDev1/ci
Re-enable changes per commit
2023-02-21 23:04:04 -05:00
Scott Shawcroft
de5f58a61d
Merge branch 'main' into banglejs2 2023-02-21 12:04:28 -08:00
MicroDev
9c0165f18d
Merge pull request #7571 from tekktrik/dev/issue-template-fixes
Minor fixes to bug report template
2023-02-19 00:10:56 +05:30
Alec Delaney
f165b01552
Reintroduce Python rendering per review feedback 2023-02-18 10:17:28 -05:00
MicroDev
dc80133d7e
re-enable changes per commit 2023-02-18 16:29:59 +05:30
Damien George
c7391a2d80 github/workflows: Add "shared/**" to list of paths that trigger CI.
All ports use code from shared/ so should rebuild when it changes.

Signed-off-by: Damien George <damien@micropython.org>
2023-02-17 12:33:13 +11:00
MicroDev
729fc97668
custom board build 2023-02-16 09:36:12 +05:30
MicroDev
3036348f72
couple ci fixes
- upload stubs as `.tar.gz` instead of `.zip`
- append recursive flag only when the source ends with a backslash
2023-02-16 09:07:41 +05:30
Scott Shawcroft
931c7c1c51
Add Bangle.js 2, JDI memory displays and ACeP epd
This 2-in-1 PR started with the goal of support the Bangle.js 2
smartwatch with *no USB*.
* Adds "secure" DFU build support with a committed private key.
* Adds 3-bit color support with one dummy bit for the JDI memory display
* Allows nrf boards to have a board_background_task() run in RUN_BACKGROUND_TASK.
  This is needed because the Bangle.js 2 uses the watchdog to reset.
* Renamed port_background_task() to port_background_tick() to indicate it
  runs on tick, not RUN_BACKGROUND_TASK.
* Marks serial connected when the display terminal is inited. This means
  that safe mode messages show up on the display.

ACep, 7-color epaper displays also pack 3 bits in 4. So, I added that
support as well.
* Adds 3-bit ACeP color support for 7-color e-paper displays. (Not
  watch related but similar due to color depth.)
* Allows a refresh sequence instead of a single int command. The 7" ACeP
  display requires a data byte for refresh.
* Adds optional delay after resetting the display. The ACeP displays
  need this. (Probably to load LUTs from flash.)
* Adds a cleaning phase for ACeP displays before the real refresh.

For both:
* Add dither support to Palette.
* Palette no longer converts colors when set. Instead, it caches
  converted colors at each index.
* ColorConverter now caches the last converted color. It should make
  conversions faster for repeated colors (not dithering.)
2023-02-15 15:03:40 -08:00
MicroDev
9de039b625
pass secrets to reusable workflows 2023-02-15 21:31:15 +05:30
MicroDev
cfea7c1d69
refactor mpy-cross-mac aws path 2023-02-15 10:56:54 +05:30
MicroDev
5168e96d0c
fix docs upload to aws 2023-02-15 10:56:06 +05:30
MicroDev
50c52fca88
split raspberrypi and refactor espressif 2023-02-14 20:38:14 +05:30
MicroDev
65e9d937ac
use python based msgfmt 2023-02-13 11:22:35 +05:30
Alec Delaney
6726f2518e
Minor fixes to bug report template 2023-02-11 22:30:25 -05:00
MicroDev
d959ef1e5b
use venv to cache python deps 2023-02-11 14:09:32 +05:30
MicroDev
70a4efc08a
use composite action for aws s3 upload 2023-02-10 23:24:46 +05:30
MicroDev
17e03c4768
ci max parallelism 2023-02-10 21:32:23 +05:30
MicroDev
23bb17c240
use composite actions and reusable workflow 2023-02-10 17:14:21 +05:30
MicroDev
baaa2362c2
use already built mpy-cross 2023-02-10 16:38:25 +05:30
Dan Halbert
cc822e0d8d
Merge pull request #7499 from MicroDev1/ci
Use composite action for fetching submodules
2023-01-28 16:10:23 -05:00
MicroDev
fc0bd6b7eb
use composite action for fetching submodules 2023-01-28 15:41:11 +05:30
Alec Delaney
ab0cbb5a04 Update notification workflow 2023-01-27 13:56:35 -05:00
MicroDev
39b4f26932
update ci 2023-01-21 11:01:09 +05:30
Damien George
4f3780a156 examples/embedding: Rework example to use ports/embed.
Signed-off-by: Damien George <damien@micropython.org>
2023-01-20 22:28:50 +11:00
MicroDev
f36c862cab
refactor stuff in ci 2023-01-18 12:12:54 +05:30
MicroDev
3b2fe1510e
cache idf and its submodules 2023-01-16 20:42:38 +05:30
MicroDev
bad80ef703
fix idf submodules init 2023-01-16 18:03:29 +05:30
MicroDev
1e2d0a4be8
gettext is pre-installed on mac 2023-01-16 17:13:19 +05:30
MicroDev
fd3faa4a05
only install awscli when required 2023-01-16 17:03:39 +05:30
David Lechner
4eefe78e8e github/workflows/code_size: Print code size change.
The intention of using `tee` is to both print the code size change in
the CI logs and save them to a file. Using redirection to a file
caused it to not print the changes.

Signed-off-by: David Lechner <david@pybricks.com>
2023-01-16 12:06:17 +11:00
MicroDev
03804e6ec1
refactor and alphabetically arrange matrix jobs 2023-01-14 20:42:58 +05:30
MicroDev
434c2355a0
multiple ci enhancements
- selectively fetch submodule tags
- conditionally build mpy-cross
- remove frozen from submodule cache
2023-01-14 17:10:40 +05:30
MicroDev
6bc0274aec
cache common submodules and share cp version 2023-01-14 10:58:04 +05:30
MicroDev
ad4357d152
use pr head ref and not the merge ref 2023-01-11 19:22:07 +05:30
MicroDev
722a313cc1
set base and head commit only when the event is a pr 2023-01-07 21:13:07 +05:30
MicroDev
f0e7e3115a
refactor how base and head commit are set
- avoid `github.event.after` as it isn't available during initial CI run of the PR
2023-01-07 21:03:16 +05:30
MicroDev
09adb24284
slightly refactor ci 2023-01-07 18:41:16 +05:30
MicroDev
8096c94e1b
build docs only when //| matches 2023-01-07 18:17:48 +05:30
MicroDev
03d4d63ab5
simplify fetching changed files 2023-01-07 17:48:39 +05:30
MicroDev
a97d8e97ad
update tj-actions/changed-files to v34 2023-01-05 12:00:46 +05:30
David Lechner
3b285326e3 github/workflows: Update existing comments for code_size_comment.
This modifies the automated code size comment to edit an existing comment
if one already exists instead of always creating a new comment.  This
reduces noise on pull requests that are repeatedly updated.

Signed-off-by: David Lechner <david@pybricks.com>
2022-12-19 14:42:07 +11:00
David Lechner
5608226cfd github/workflows: Cancel when branch is updated.
This adds a concurrency section to all github workflows to cancel any
in progress workflow when a branch is updated. This should cancel any
ongoing or queued workflows, e.g. when a pull request is updated.

Signed-off-by: David Lechner <david@pybricks.com>
2022-12-14 13:42:50 +11:00
MicroDev
b01bf1e16c
revert fetch-depth setting in ci 2022-12-12 02:10:01 +05:30
MicroDev
53e1416484
downgrade and lock tj-actions/changed-files at v34.5.1 2022-12-12 02:09:08 +05:30
MicroDev
628865b235
change fetch-depth setting in ci 2022-12-11 20:49:00 +05:30
MicroDev
fa14307c7d
update tj-actions/changed-files to v34.5.3 2022-12-11 20:19:43 +05:30
David Lechner
96c23432f6 github/workflows: Fix code size comment workflow for non-PR.
This fixes the case for the code size comment action where there is no
matching artifact.  Apparently, the result of the github-script action was
not treating `false` as a boolean value.  To fix the problem we change the
result to use string.  Also add some logging to make the step a bit less
cryptic.

Signed-off-by: David Lechner <david@pybricks.com>
2022-12-07 13:40:59 +11:00
Dan Halbert
845b68c351
Merge pull request #7204 from jepler/build-python3x
return to using python 3.x for builds
2022-11-30 15:18:29 -05:00
David Lechner
1b774b373e github/workflows: Comment on code size change instead of failing CI.
This changes the code size workflow to post a comment on pull requests with
the code size report.  It also removes the error threshold so that the test
won't fail if code size increases.

Allowable code size changes are subjective, so shouldn't cause CI to fail.
In addition, failing CI tests can cause other hooks like code coverage
reports to be suppressed, so this fixes that problem as well.

Fixes issue #8464.

Signed-off-by: David Lechner <david@pybricks.com>
2022-11-29 11:36:28 +11:00