Skip to content

Commit

Permalink
Add arm64 for linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenlu committed Sep 28, 2023
1 parent ab9458f commit 4b14b81
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
46 changes: 45 additions & 1 deletion .github/workflows/publish_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,50 @@ jobs:
name: lightspark_crypto_python-manylinux2014-x86_64-${{ matrix.python }}
path: /home/runner/work/lightspark-crypto-uniffi/lightspark-crypto-uniffi/lightspark-crypto-python/dist/*.whl

build-manylinux2014-aarch64-wheels:
name: "Build Manylinux 2014 aarch64 wheel"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: lightspark-crypto-python
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: "Install Python"
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: "Generate py source and binaries"
run: bash ./scripts/generate-linux-arm64.sh

- name: "Build wheel"
run: ${PYBIN}/python setup.py bdist_wheel --plat-name linux_aarch64 --verbose

- name: "Upload artifacts"
uses: actions/upload-artifact@v3
with:
name: lightspark_crypto_python-linux-aarch64-${{ matrix.python }}
path: /home/runner/work/lightspark-crypto-uniffi/lightspark-crypto-python/dist/*.whl

build-macos-arm64-wheels:
name: "Build macOS arm64 wheel"
runs-on: macos-13
Expand Down Expand Up @@ -151,7 +195,7 @@ jobs:
defaults:
run:
working-directory: lightspark-crypto-python
needs: [build-manylinux2014-x86_64-wheels, build-macos-arm64-wheels, build-macos-x86_64-wheels, build-windows-wheels]
needs: [build-manylinux2014-x86_64-wheels, build-manylinux2014-aarch64-wheels, build-macos-arm64-wheels, build-macos-x86_64-wheels, build-windows-wheels]
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion lightspark-crypto-python/scripts/generate-linux-arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ echo "Generating native binaries..."
docker buildx build -f build.Dockerfile --platform linux/arm64 -o docker-out .

echo "Copying linux binary..."
cp target/release-smaller/liblightspark_crypto.so lightspark-crypto-python/src/lightspark_crypto/libuniffi_lightspark_crypto.so
cp docker-out/target/aarch64-unknown-linux-gnu/release-smaller/liblightspark_crypto.so lightspark-crypto-python/src/lightspark_crypto/libuniffi_lightspark_crypto.so

echo "All done!"
2 changes: 1 addition & 1 deletion lightspark-crypto-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="lightspark_crypto_python",
version="0.1.2",
version="0.1.3",
description="The Python language bindings for lightspark crypto operations",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 4b14b81

Please sign in to comment.