Skip to content

ci: add support to aarch64 python wheels #7

ci: add support to aarch64 python wheels

ci: add support to aarch64 python wheels #7

Workflow file for this run

name: Publish nostr-protocol to PyPI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# We use manylinux2014 because older CentOS versions used by 2010 and 1 have a very old glibc version, which
# makes it very hard to use GitHub's javascript actions (checkout, upload-artifact, etc).
# They mount their own nodejs interpreter inside your container, but since that's not statically linked it
# tries to load glibc and fails because it requires a more recent version.
jobs:
build-manylinux2014-x86_64-wheels:
name: "Build Manylinux 2014 x86_64 wheel"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bindings/nostr-ffi/bindings-python
container:
image: quay.io/pypa/manylinux2014_x86_64
env:
PLAT: manylinux2014_x86_64
PYBIN: "/opt/python/${{ matrix.python }}/bin"
strategy:
matrix:
python: # Update this list whenever the docker image is updated (check /opt/python/)
- cp38-cp38
- cp39-cp39
- cp310-cp310
steps:
- name: "Checkout"
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: "Generate nostr.py and binaries"
run: bash ./scripts/generate-linux.sh
- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: ${PYBIN}/python setup.py bdist_wheel --plat-name manylinux_2_17_x86_64 --verbose
- uses: actions/upload-artifact@v3
with:
name: nostr_protocol-manylinux2014-x86_64-${{ matrix.python }}
path: /home/runner/work/nostr/nostr/bindings/nostr-ffi/bindings-python/dist/*.whl
build-manylinux2014-aarch64-wheels:
name: "Build Manylinux 2014 aarch64 wheel"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bindings/nostr-ffi/bindings-python
container:
image: quay.io/pypa/manylinux2014_x86_64
env:
PLAT: manylinux2014_aarch64
PYBIN: "/opt/python/${{ matrix.python }}/bin"
strategy:
matrix:
python: # Update this list whenever the docker image is updated (check /opt/python/)
- cp38-cp38
- cp39-cp39
- cp310-cp310
steps:
- name: "Checkout"
uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: "Install aarch64 cross compiling deps"
run: |
sudo apt-get update -y

Check failure on line 80 in .github/workflows/publish-python.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-python.yaml

Invalid workflow file

You have an error in your yaml syntax on line 80
sudo apt-get install -y gcc-x86-64-linux-gnu g++-x86-64-linux-gnu
- name: "Generate nostr.py and binaries"
run: bash ./scripts/generate-linux-aarch64.sh
- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: ${PYBIN}/python setup.py bdist_wheel --plat-name manylinux_2_17_aarch64 --verbose
- uses: actions/upload-artifact@v3
with:
name: nostr_protocol-manylinux2014-aarch64-${{ matrix.python }}
path: /home/runner/work/nostr/nostr/bindings/nostr-ffi/bindings-python/dist/*.whl