Skip to content

Commit

Permalink
support linux aarch64 pymnn release.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzhaode committed Nov 13, 2024
1 parent f830294 commit 492e770
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pymnn_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
matrix:
include:
- { os: ubuntu-latest, arch: x86_64, build: 'cp*-manylinux*' }
- { os: ubuntu-latest, arch: aarch64, build: 'cp*-manylinux*' }
- { os: windows-latest, arch: AMD64, build: 'cp*' }
- { os: macos-13, arch: x86_64, build: 'cp*' }
- { os: macos-14, arch: arm64, build: 'cp*' }
Expand All @@ -33,6 +34,12 @@ jobs:
with:
python-version: '3.12'

- name: set up qemu
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: install pipx
if: matrix.os == 'macos-14'
run: python -m pip install pipx
Expand Down
27 changes: 2 additions & 25 deletions pymnn/pip_package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@ requires = [

build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
test-skip = [
"cp36-*",
"*-macosx_arm64",
"*-macosx_x86_64"
]
test-requires = [
"opencv-python",
"numpy",
"torch"
]
test-command = [
"cd {project}/pymnn/test",
"ls",
"python unit_test.py",
"cd ../.."
]

[tool.cibuildwheel.macos]
archs = ["native"]
build = "cp*-macosx_*"
Expand All @@ -48,17 +30,12 @@ archs = ["native"]
repair-wheel-command = [
"export LD_LIBRARY_PATH=$(pwd)/pymnn_build/tools/converter/libtorch/lib:$LD_LIBRARY_PATH",
"echo $LD_LIBRARY_PATH",
"auditwheel repair --plat manylinux2014_x86_64 -w {dest_dir} {wheel}"
"auditwheel repair -w {dest_dir} {wheel}"
]

[tool.cibuildwheel.windows]
before-all = [
"cd pymnn/pip_package",
"python3 build_deps.py",
"cd ../.."
]
test-command = [
"cd /d {project}/pymnn/test",
"python unit_test.py",
"cd ../.."
]
]

0 comments on commit 492e770

Please sign in to comment.