diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 9499b23..d2addab 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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 @@ -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 diff --git a/tests/test_python_api.py b/tests/test_python_api.py index 0a631c4..5e490b1 100644 --- a/tests/test_python_api.py +++ b/tests/test_python_api.py @@ -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