Skip to content
Draft
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
17 changes: 14 additions & 3 deletions .github/workflows/build-onnxsim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ jobs:
path: python-wheels
persist-credentials: false

# Only some versions need patching, so a missing directory is not an error.
- name: Apply patches
run: git apply -v python-wheels/patches/onnxsim/${{ env.ONNXSIM_VERSION }}/*.patch
run: |
patches="$PWD/python-wheels/patches/onnxsim/${ONNXSIM_VERSION}"
if [ -d "$patches" ]; then git apply -v "$patches"/*.patch; fi

- name: Build wheels
uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
Expand Down Expand Up @@ -128,11 +131,13 @@ jobs:
# sympy/onnxslim/ultralytics/rfdetr paths; most guard the import with
# pytest.importorskip, so they collect fine and just skip without
# riscv64 wheels for those. onnxruntime does have a riscv64 wheel on
# our registry, but only from cp312 (matrix.onnxruntime). Five files
# our registry, but only from cp312 (matrix.onnxruntime). These files
# import torch/timm/onnxruntime unconditionally at module level
# (no importorskip), which aborts collection outright rather than
# skipping when the import fails - not just deselecting their tests,
# so ignore the files themselves.
# so ignore the files themselves. 0.8.1 added six more torch-importing
# files (test_gan, test_graph_grad_torch_autograd, test_pytorch_export_simple,
# test_rknn3_compat, test_tflite_export_torchvision, test_torch_export_integration).
CIBW_TEST_REQUIRES: pytest pytest-xdist ${{ matrix.onnxruntime }}
CIBW_TEST_COMMAND: >-
pytest {project}/tests/
Expand All @@ -142,6 +147,12 @@ jobs:
--ignore={project}/tests/test_timm.py
--ignore={project}/tests/test_rfdetr.py
--ignore={project}/tests/test_yolo.py
--ignore={project}/tests/test_gan.py
--ignore={project}/tests/test_graph_grad_torch_autograd.py
--ignore={project}/tests/test_pytorch_export_simple.py
--ignore={project}/tests/test_rknn3_compat.py
--ignore={project}/tests/test_tflite_export_torchvision.py
--ignore={project}/tests/test_torch_export_integration.py

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down
1 change: 1 addition & 0 deletions docs/packages/onnxsim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ versions:
- filename: onnxsim-0.7.3-cp312-abi3-manylinux_2_39_riscv64.whl
sha256: 630922bc5ff479b7616d602f3a8dc9d2bdf749096413be6990ce5e66cf89cfe7
requires-python: '>=3.10'
- version: 0.8.1
Loading