Skip to content

Latest commit

 

History

History
113 lines (83 loc) · 4.21 KB

File metadata and controls

113 lines (83 loc) · 4.21 KB

Publishing and releases

lvgl-python is the packaged CPython endpoint for the shared API generated by lvgl-bindings. Release inputs are immutable: every sync accepts only a full 40-character bindings commit SHA or a vX.Y.Z bindings tag and records the resolved commit in LVGL_BINDINGS_COMMIT.

Safety model

Generation, validation, synchronization, and publication are separate actions.

  • lvgl-bindings/regenerate_all.sh writes artifacts only.
  • lvgl-bindings/scripts/release_dry_run.sh generates in temporary storage, verifies all artifacts, runs tests, and computes the expected version without committing, tagging, pushing, dispatching, or publishing.
  • This repo's Sync and release workflow defaults to dry-run.
  • sync mode is the explicit request to commit and push synchronized sources.
  • release mode is the explicit request to commit, create a GitHub Release, and start package publication.
  • A normal push to either repository never starts a release.

Version scheme

Versions are LVGL_MAJOR.LVGL_MINOR.N. For the current API line this means 9.5.N; N is one greater than the highest existing v9.5.* tag in this repository. Preview it without mutation:

./scripts/next_release_version.sh --verbose

Local dry run

Sync an exact bindings source, rebuild the extension, run its focused tests and the matching canonical smoke suite, then inspect the next version:

./scripts/sync_from_lvgl_bindings.sh --ref <40-character-bindings-sha>
python -m pip install -e .
python -m unittest discover -s tests -v
python ../lvgl-bindings/tools/test_lvgl_smoke.py
./scripts/next_release_version.sh --verbose

The sync command changes only the local checkout. It vendors generated/lvgl_python.c, generated/lvgl.pyi, lv_conf.h, the Python helpers, the LVGL submodule pin, and LVGL_BINDINGS_COMMIT.

GitHub workflow

Run Sync and release with two required inputs:

  • lvgl_bindings_ref: exact full SHA or vX.Y.Z tag.
  • mode: dry-run, sync, or release.

Examples:

# Validate only; no external mutation.
gh workflow run sync-and-release.yml --repo PyDevices/lvgl-python \
  -f lvgl_bindings_ref=<40-character-bindings-sha> -f mode=dry-run

# Commit and push the exact sync, but do not create a release.
gh workflow run sync-and-release.yml --repo PyDevices/lvgl-python \
  -f lvgl_bindings_ref=<40-character-bindings-sha> -f mode=sync

# Explicitly commit, create a GitHub Release, and publish packages.
gh workflow run sync-and-release.yml --repo PyDevices/lvgl-python \
  -f lvgl_bindings_ref=<40-character-bindings-sha> -f mode=release

The explicit Release bindings workflow in lvgl-bindings provides the coordinated upstream entry point. It validates the exact source first and only dispatches mode=release when its publish input is deliberately enabled.

Package matrix

The published-release workflow uses the PyDevices reusable native/WASM package builder. The repository's pyproject.toml keeps the platform policy:

  • CPython 3.10–3.14 Linux x86_64 manylinux wheels.
  • CPython 3.10–3.14 Windows AMD64 wheels.
  • CPython 3.13–3.14 Android arm64-v8a and x86_64 wheels.
  • Pyodide/WebAssembly wheels supplied by the reusable release workflow.

Native wheel smoke tests import lvgl, call init(), and call deinit(). Android wheels are cross-built and validated on device by the PyDevices Android application workflow.

Local wheel validation

For a development wheel on the current host:

python -m pip install build
python -m build --wheel
python -m pip install --force-reinstall dist/pydevices_lvgl-*.whl
python -m unittest discover -s tests -v

The wheel must contain lvgl.pyi beside the native extension. The focused test suite verifies that installation contract.

To reproduce release-platform wheels, use cibuildwheel. Linux manylinux builds require Docker; Windows builds require native MSVC; Android builds require the Android SDK/NDK environment used by cibuildwheel.

Publication boundary

Only a published GitHub Release or an explicit exact-tag retry invokes publish-release-packages.yml. Implementation and dry-run validation must not create a GitHub Release and therefore cannot upload to TestPyPI.