Skip to content

Merge pull request #49 from breezy-team/02b6dependabot/github_actions… #75

Merge pull request #49 from breezy-team/02b6dependabot/github_actions…

Merge pull request #49 from breezy-team/02b6dependabot/github_actions… #75

Workflow file for this run

---
name: Build Python Wheels
"on":
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip "cython>=0.29"
pip install setuptools wheel cibuildwheel
- name: Run test suite
run: python -m unittest patiencediff.test_patiencediff
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: "matrix.os == 'ubuntu-latest'"
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
CIBW_ARCHS_WINDOWS: AMD64 x86
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/setup-python@v5
- name: Install twine
run: |
python -m pip install --upgrade pip
pip install twine
- name: Download wheels
uses: actions/download-artifact@v2
- name: Publish wheels
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload artifact/*.whl