Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for pre-built aarch64 #328

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 8 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ jobs:
# Only build universal2 package
# Related issue: https://github.com/pypa/cibuildwheel/issues/1190
CIBW_ARCHS_MACOS: universal2
CIBW_ARCHS_LINUX: "auto aarch64"
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` && python3 -m pip install cmake
CIBW_TEST_REQUIRES_LINUX: pytest flake8 onnxruntime
CIBW_TEST_REQUIRES_MACOS: pytest onnxruntime
CIBW_TEST_REQUIRES_WINDOWS: pytest onnxruntime
CIBW_TEST_REQUIRES_LINUX: pytest flake8 onnxruntime
CIBW_TEST_REQUIRES_MACOS: pytest onnxruntime
CIBW_TEST_REQUIRES_WINDOWS: pytest onnxruntime
CIBW_BEFORE_TEST_LINUX: pip install torch==1.13.1+cpu torchvision==0.14.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
CIBW_BEFORE_TEST_MACOS: pip install torch torchvision
CIBW_BEFORE_TEST_WINDOWS: pip install torch torchvision
Expand All @@ -37,6 +38,9 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
- name: install qemu
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
- name: Build onnxsim wheels
uses: pypa/[email protected]
env:
Expand Down Expand Up @@ -148,7 +152,7 @@ jobs:
echo "endpoint=oss-cn-beijing.aliyuncs.com" >> ~/.ossutilconfig
echo "accessKeyID=${{ secrets.OSS_ACCESS_KEY }}" >> ~/.ossutilconfig
echo "accessKeySecret=${{ secrets.OSS_SECRET_KEY }}" >> ~/.ossutilconfig

gzip -c -9 build-wasm-node-OFF/onnxsim.wasm > onnxsim_gz.wasm
./ossutil64 --config-file ~/.ossutilconfig cp -u onnxsim_gz.wasm oss://converter-web/onnxsim.wasm --meta=Content-Type:application/wasm#Content-Encoding:gzip
./ossutil64 --config-file ~/.ossutilconfig cp -u build-wasm-node-OFF/onnxsim.js oss://converter-web/
Expand Down