Use GCC extensions instead of appending compiler flags for hw implementations #90
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and release to PyPI | |
# Build on every branch push, tag push, and pull request change: | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{matrix.arch}} for ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, windows-2019, macos-12] | |
arch: [auto] | |
include: | |
- os: ubuntu-20.04 | |
arch: aarch64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: docker/setup-qemu-action@v2 | |
if: ${{ matrix.arch == 'aarch64' }} | |
name: Set up QEMU | |
- name: Run cibuildwheel | |
uses: pypa/cibuildwheel@v2.15.0 | |
env: | |
CIBW_ARCHS_LINUX: ${{matrix.arch}} | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_TEST_COMMAND: "python -u {project}/run-tests.py" | |
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" | |
CIBW_TEST_SKIP: '*macosx_arm64 *universal2:arm64' | |
CIBW_BUILD_VERBOSITY: 1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.7' | |
- name: Build sdist | |
run: python setup.py sdist | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-22.04 | |
# upload to PyPI on every tag starting with 'v' | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |