Added test workflow to install builded wheels before the upload#58
Added test workflow to install builded wheels before the upload#58jakub-kocka wants to merge 6 commits intomainfrom
Conversation
👋 Hello jakub-kocka, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
d660b51 to
3994296
Compare
d3e68a3 to
f92957f
Compare
988982b to
2687841
Compare
7718581 to
502fe66
Compare
cbbc0dc to
92249a1
Compare
There was a problem hiding this comment.
Pull request overview
This PR strengthens the wheel build/release pipeline by adding CI workflows and helper scripts to (1) test-install repaired wheels before upload and (2) validate uploaded wheels against exclude_list.yaml, while also making exclude-list processing platform-aware.
Changes:
- Added new CI workflows for unit tests, cross-platform wheel installation testing, and post-upload S3 verification against
exclude_list.yaml. - Introduced new tooling/scripts to extract excluded packages, test wheel installation, and verify S3 contents; updated exclude-list and platform resolution logic.
- Enhanced S3 upload logging/statistics and made repair step tolerant of “no wheels to repair”.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
yaml_list_adapter.py |
Adds platform filtering and platform-marker normalization for exclude/include YAML processing. |
verify_s3_wheels.py |
New script to scan S3 wheels and detect exclude-list violations. |
upload_wheels.py |
Adds “new vs existing” upload logging and end-of-run statistics. |
test_wheels_install.py |
New CI script to filter/install wheels locally and remove incompatible/excluded wheels. |
test_build_wheels.py |
Reworks/adds unit tests for YAML adapter and helper functions. |
repair_wheels.py |
Treats “no wheels found” as a successful no-op. |
os_dependencies/ubuntu.sh |
Expands PyGObject-related deps (incl. runtime libs) and improves install formatting. |
os_dependencies/manylinux.sh |
Adds more introspection/cairo deps and best-effort girepository installs for repair. |
os_dependencies/linux_arm.sh |
Makes sudo optional and expands/softens ARM dependency installs for CI containers. |
extract_exclude_packages.py |
New utility to list excluded packages for a given platform/Python version. |
exclude_list.yaml |
Updates platform taxonomy and refines/extends exclusion rules and comments. |
build_wheels_from_file.py |
Adds --ci-tests mode to expect failures when building excluded packages. |
build_wheels.py |
Loads exclude list filtered to the current platform. |
_helper_functions.py |
Adds platform resolver, wheel parsing, and exclude-check helpers for install/S3 verification. |
.github/workflows/wheels-repair.yml |
Skips repair steps when no wheels and adds a “merge all repaired wheels” job. |
.github/workflows/upload-python-wheels.yml |
Switches upload input to “tested wheels” artifacts and merges them. |
.github/workflows/unit-tests.yml |
New workflow for unit tests + exclude-build checks + S3 verification on PRs. |
.github/workflows/test-wheels-install.yml |
New reusable workflow to test-install repaired wheels across OS/Python matrices. |
.github/workflows/build-wheels-python-dependent.yml |
Adds Windows OS dependency installation step. |
.github/workflows/build-wheels-platforms.yml |
Inserts test-install gate before upload and adds post-upload S3 verification. |
.github/workflows/build-wheels-defined.yml |
Adds platform selector, ARMv7 legacy build option, and integrates test-install + S3 verify. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
df00c76 to
483d363
Compare
|
There are some "violations" of the |
|
@jakub-kocka There must be something wrong because on the list of violations there are two esptool packages and I removed all of them after the last incident. I can delete them but please check why are they are so we won't delete anything by mistake. And please send me the list of full patch as they should be specified at the time of running the command. |
| required: false | ||
| default: true | ||
| os_linux_armv7_legacy: | ||
| description: Build on linux armv7 legacy (bullseye, glibc 2.31) |
There was a problem hiding this comment.
Maybe state why do we need "legacy" build. Then it will be clear in the future when such legacy build can be removed.
There was a problem hiding this comment.
Why isn’t this documented anywhere? It appears to have been introduced in #56, but there’s no mention of the change or its rationale. This really should be described in much more detail, especially if it’s intended as a workaround for patchelf.
| run: python -m pip install -r build_requirements.txt | ||
|
|
||
| - name: Install additional OS dependencies - Windows | ||
| run: powershell -ExecutionPolicy Bypass -File os_dependencies/windows.ps1 |
There was a problem hiding this comment.
No need to check platform for OS Windows?
| -w /work \ | ||
| -e GH_TOKEN="${GH_TOKEN}" \ | ||
| -e PIP_NO_CACHE_DIR=1 \ | ||
| -e LDFLAGS="-Wl,-z,max-page-size=0x1000" \ |
There was a problem hiding this comment.
Why such max-page-size?
Yes, there was, indeed. I will investigate this and let you know, thanks. |
|
@jakub-kocka LGTM in general but I haven't checked every line. The main problem with this repository that there is too much done in Gitlab YAML config files. That makes the review hard (i.e. noticing potential issues). The checking is done at several places. It can happen that we add another upload and forgot about implementing the check. This was the issue before as well: the upload happened in so many different cases that we missed something. Please think about it if there could be one script (shell, Python) which would do the upload and would ensure that the exclude list is always honored. Then it wouldn't be possible to bypass the checks. |
Description
Added/Fixed unit tests and made them automatically run on PR
Added installation tests for built wheels before upload to Espressif's PyPI
repair stepof the workflow to actually test platform-independent wheels on all platforms and Python versions in thetest stepIntroduced architecture resolver for
exclude_list.yamlAdded another verification workflow that runs on every PR to actually check what is uploaded in the S3 and if there are exclude list "violations" - might be from manual wheels upload (highly likely not complete wheel) ... this check also runs after the upload of main builds to check if we have not uploaded anything that we don't want to
Fixed the new issues - https://github.com/espressif/idf-python-wheels/actions/runs/21887651772
Upload has been enhanced in logging scope as well to actually show a completely new package being uploaded (green colour and ++), also statistics are implemented at the end of uploading:
Related
Testing
Unit tests: https://github.com/espressif/idf-python-wheels/actions/runs/22177100784?pr=58
Action run platforms-dispatch: https://github.com/espressif/idf-python-wheels/actions/runs/22177171603
Action run defined-wheel: https://github.com/espressif/idf-python-wheels/actions/runs/22177157441
Checklist
Before submitting a Pull Request, please ensure the following: