Skip to content

arm64 linux builds

arm64 linux builds #37

Workflow file for this run

name: Build and upload to PyPI
# Build on every branch push, tag push, and pull request change:
on: [push, pull_request]
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
# on:
# push:
# pull_request:
# release:
# types:
# - published
env:
CIBW_BUILD_VERBOSITY: 3
CIBW_TEST_COMMAND: python -m unittest discover {project}/tests
# Disable building PyPy wheels on all platforms
CIBW_SKIP: pp*
# The windows builds was reusing the found win32 dll instead of downloading the win64 one.
# Additionally, the build directory contained the prior win32 dll. Easier to delete it, too.
CIBW_BEFORE_BUILD_WINDOWS: del /q {project}\parasail\parasail.dll
# automake is not included in the stock macos runner, which triggers `setup.py` to install all deps (not just
# the missing ones). However, the newly installed m4 binary fails on macos with a SIGABRT (though the original
# `brew` installed one does not) as documented in:
# https://github.com/jeffdaily/parasail-python/issues/24.
CIBW_BEFORE_BUILD_MACOS: brew install automake
jobs:
build_wheels:
name: Build wheels for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
buildplat:
- [ubuntu-latest, manylinux_x86_64, auto]
- [ubuntu-latest, musllinux_i686, auto]
- [ubuntu-latest, manylinux_aarch64, auto]
- [ubuntu-latest, musllinux_aarch64, auto]
- [windows-latest, win_amd64, auto]
- [windows-latest, win32, auto]
- [macos-latest, macosx_x86_64, x86_64]
- [macos-latest, macosx_arm64, arm64]
# we only need to build for a single python version since the wheels are universal
python: ["cp310"]
steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.buildplat[2] }}
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/