Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/jpegio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# jpegio from a bare clone, the way a user builds it: build_mp.py fetches
# MicroPython and the pinned modules itself. Its golden corpus without LVGL,
# then beside lvgl-micropython as LVGL's JPEG decoder. (These checks moved
# here with jpegio from displayif's clean-build workflow, 2026-10-06.)
name: jpegio

on:
push:
branches: [main]
paths:
- 'modules/jpegio/**'
- 'build_mp.py'
- 'modules.lock'
- 'patches/**'
- '.github/workflows/jpegio.yml'
pull_request:
paths:
- 'modules/jpegio/**'
- 'build_mp.py'
- 'modules.lock'
- 'patches/**'
- '.github/workflows/jpegio.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
unix:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v7

- name: Install the unix port's build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libffi-dev pkg-config

- name: Build the unix port with jpegio
run: python3 build_mp.py --port unix --modules jpegio

- name: The golden corpus (no Pillow needed)
run: ./builds/unix/standard/micropython modules/jpegio/tests/test_jpegio.py

- name: The LVGL-less contract (must print SKIP)
# register_lvgl_decoder() and lvgl_decoders() are module attributes on
# every build, the first raising RuntimeError here, the second
# returning () (modules/jpegio/README.md).
run: |
./builds/unix/standard/micropython modules/jpegio/tests/test_jpegio_lvgl.py | tee lvgl.out
grep -q 'register_lvgl_decoder() -> RuntimeError' lvgl.out
grep -q 'lvgl_decoders() == ()' lvgl.out
grep -q '^SKIP' lvgl.out

unix-lvgl:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v7

- name: Install the unix port's build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libffi-dev pkg-config

- name: Build the unix port with jpegio and lvgl-micropython
run: python3 build_mp.py --port unix --modules jpegio,lvgl-micropython

- name: One TJpgDec in the firmware, and it is jpegio's
# LVGL's own tjpgd.o compiles empty (LV_USE_TJPGD 0 in lvgl-bindings),
# so exactly one object defines jd_prepare, and jpegio's two objects
# call into it.
working-directory: builds/unix/standard
run: |
find . -name '*.o' -exec nm -A {} + 2>/dev/null | grep ' T jd_prepare$' > jd.txt
cat jd.txt
test "$(wc -l < jd.txt)" = 1
grep -q '^./jpegio/src/tjpgd/tjpgd.o:' jd.txt
nm jpegio/src/jpegio.o | grep -q ' U jd_prepare$'
nm jpegio/src/lvgl_decoder.o | grep -q ' U jd_decomp$'

- name: The golden corpus, unchanged beside LVGL
run: ./builds/unix/standard/micropython modules/jpegio/tests/test_jpegio.py

- name: JPEGs through lv.image
run: ./builds/unix/standard/micropython modules/jpegio/tests/test_jpegio_lvgl.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!/modules/manifest.py
!/modules/all/
!/modules/castif/
!/modules/jpegio/
!/modules/tflite/
!/modules/vision/
!/modules/.esp-vision/
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ New here? The [newcomer's guide](docs/newcomers.md) explains the model; the
fetches when a module or a toolchain isn't there. In the PyDevices
workspace both are links to the sibling checkouts instead.
- `modules/` — `manifest.py` (the manifest every build freezes), `all/`
(every module), `castif/` (the ESP32-P4 cast, which lives only here),
(every module), `castif/` (the ESP32-P4 cast) and `jpegio/` (the JPEG
decoder, from displayif), which live only here,
`tflite/` and `vision/` (esp-vision's modules, from the pin in `.esp-vision/`;
see [docs/esp-vision.md](docs/esp-vision.md)), and the modules themselves,
linked or cloned.
Expand Down
6 changes: 4 additions & 2 deletions docs/build-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ micropython-pydevices/
│ ├── manifest.py tracked: reads the module list build_mp.py sets, includes each, raises on a missing one
│ ├── all/manifest.py tracked: every sibling with a root manifest.py, except opt-in ones
│ ├── castif/ tracked: lives only here (moves from usermods/); ESP32-P4 only
│ ├── jpegio/ tracked: lives only here (moved from displayif, 2026-10-06); every port
│ ├── audiodsp -> ../../audiodsp ignored symlinks in the workspace,
│ ├── audioif -> ../../audioif clones at the modules.lock commit anywhere else
│ ├── audiocomponents, cameraif, displayif, lvgl-micropython, palettes,
Expand Down Expand Up @@ -242,8 +243,9 @@ Deferred, because the build script doesn't need them:
- **A CI leg that builds the union** on one desktop port, so building only
what you ask for doesn't lose the cross-port check that caught usbif's
breaks in September.
- **jpegio** out of displayif into its own repo, and whether esp-vision's
sensor and H.264 replace cameraif (and castif's encoder). esp-vision's
- **jpegio** left displayif on 2026-10-06 for `modules/jpegio` here (the
anchor's media modules roadmap), not a repo of its own. Whether esp-vision's
sensor and H.264 replace cameraif (and castif's encoder) stays open. esp-vision's
`tflite` and image stack are in as modules; where `sensor` stands is in
[esp-vision.md](esp-vision.md).
- **CircuitPython.** It doesn't read our manifests, and none of this reaches
Expand Down
2 changes: 1 addition & 1 deletion docs/newcomers.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ way autosize grows the app partition when the image doesn't fit.
| `build_mp.py` | The build command. |
| `UPSTREAM` | The MicroPython release the patches apply to. |
| `modules.lock`, `deps.lock` | What gets fetched when it's missing. |
| `modules/` | The module manifest, `all/`, `castif/`, `tflite/` and `vision/` ([esp-vision's](esp-vision.md)), and the modules. |
| `modules/` | The module manifest, `all/`, the modules that live only here (`castif/`, `jpegio/`, and `tflite/` and `vision/`, [esp-vision's](esp-vision.md)), and the rest, linked or cloned. |
| `patches/` | The patch series and `apply_patches.py`. |
| `variants/` | Our unix, windows and webassembly variants, and the esp32 settings and board variants. |

Expand Down
4 changes: 2 additions & 2 deletions modules.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ audiocomponents https://github.com/PyDevices/audiocomponents.git 883d591784
audiodsp https://github.com/PyDevices/audiodsp.git 7da36f7bf016236c8df02505a653ea35dc62d600
audioif https://github.com/PyDevices/audioif.git b6b35a48a0cd23ddc549f8c0643d77ffe778da28
cameraif https://github.com/PyDevices/cameraif.git 77b20b128800d5e1e23aab4c131e58f46b12cad2
displayif https://github.com/PyDevices/displayif.git b8366781c580da3a1683713e774d4d4e7aaf939f
lvgl-micropython https://github.com/PyDevices/lvgl-micropython.git 8f7d89d0f8170ef526d5bd798c4bc0d05651309e
displayif https://github.com/PyDevices/displayif.git 17b3750828d5bfc7dc33a6f068e98a17ec3389d6
lvgl-micropython https://github.com/PyDevices/lvgl-micropython.git d42aeff1514987f2fd9d71c79e9737ebda7fa088
palettes https://github.com/PyDevices/palettes.git 6f0870f0c8a0b48c56d2150b3f800bbbee7761e1
pdwidgets https://github.com/PyDevices/pdwidgets.git 306c1e20e0c3c63066dab6d10155fcf165a6ba13
pydevices https://github.com/PyDevices/pydevices.git 36cba5f9da32a9d9005e7fe725ce8bd70aa21921
Expand Down
Loading
Loading