Skip to content

Commit

Permalink
Merge pull request #324 from daquexian/fix_ci
Browse files Browse the repository at this point in the history
upgrade buildwheel
  • Loading branch information
daquexian authored Mar 4, 2024
2 parents c075446 + b00c218 commit 717c621
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_ENVIRONMENT_PASS_LINUX: ONNXSIM_CI
CIBW_BEFORE_ALL_LINUX: WD=`pwd` && /opt/python/cp38-cp38/bin/python -m pip install --target tmp_cmake cmake && cp tmp_cmake/bin/cmake /usr/local/bin/cmake && rm -rf tmp_cmake && /opt/python/cp38-cp38/bin/python -m pip install cmake && cmake --version && whereis cmake
CIBW_BEFORE_ALL_MACOS: WD=`pwd` && pip install cmake
CIBW_BEFORE_ALL_MACOS: WD=`pwd` && python3 -m pip install cmake
CIBW_TEST_REQUIRES_LINUX: pytest flake8 onnxruntime
CIBW_TEST_REQUIRES_MACOS: pytest onnxruntime
CIBW_TEST_REQUIRES_WINDOWS: pytest onnxruntime
Expand All @@ -38,12 +38,12 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Build onnxsim wheels
uses: pypa/cibuildwheel@v2.11.4
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ENVIRONMENT: CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnxsim
CIBW_ENVIRONMENT_WINDOWS: USE_MSVC_STATIC_RUNTIME=0 CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnxsim
- name: Build onnx-simplifier wheels
uses: pypa/cibuildwheel@v2.11.4
uses: pypa/cibuildwheel@v2.16.5
env:
# set ONNXSIM_PKG_NAME to onnx-simplifier
CIBW_ENVIRONMENT: CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF -DProtobuf_USE_STATIC_LIBS=ON" ONNXSIM_PKG_NAME=onnx-simplifier
Expand Down
4 changes: 3 additions & 1 deletion tests/test_python_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ def test_unset_optional_input():
value_info=fmap,
initializer=initializers
)

opset_imports = [onnx.helper.make_opsetid("", 14)]

model = onnx.helper.make_model(graph_def)
model = onnx.helper.make_model(graph_def, opset_imports=opset_imports)
sim_model, check_ok = onnxsim.simplify(model, check_n=3)
assert check_ok
assert len(model.graph.node) == 1
Expand Down

0 comments on commit 717c621

Please sign in to comment.