This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
Update setup.py with classifiers #44
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
# vim:ts=2:sw=2:et:ai:sts=2 | ||
name: 'Build and test wheels for release' | ||
on: | ||
release: | ||
types: [created] | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'force_ci/all/**' # For development, forcing all workflows to run. | ||
- 'force_ci/debian/**' # For debugging and/or only forcing this workflow. | ||
jobs: | ||
build_wheels: | ||
name: 'Build and test wheels' | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-11] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: 'Checkout source repository' | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up QEMU | ||
if: runner.os == 'Linux' and github.event_name == 'release' && github.event.action == 'created' | ||
Check failure on line 29 in .github/workflows/dist.yml GitHub Actions / Build and test wheels for releaseInvalid workflow file
|
||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
- uses: actions/setup-python@v4 | ||
name: 'Set up Python 3.11' | ||
with: | ||
python-version: '3.11' | ||
- name: 'Install cibuildwheel' | ||
run: | | ||
python3 -m pip install cibuildwheel | ||
- name: 'Build and test wheels' | ||
env: | ||
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" | ||
CIBW_ARCHS_LINUX: auto aarch64 | ||
run: | | ||
python3 -m cibuildwheel --output-dir dist | ||
- uses: actions/upload-artifact@v2 | ||
name: 'Upload build artifacts' | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
with: | ||
path: 'dist/*.whl' | ||
build_sdist: | ||
name: 'Build source distribution' | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: 'Checkout source repository' | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v4 | ||
name: 'Set up Python 3.10' | ||
with: | ||
python-version: '3.10' | ||
- name: 'Build sdist' | ||
run: > | ||
pip3 install pkgconfig cython --upgrade && | ||
python3 setup.py sdist | ||
- uses: actions/upload-artifact@v2 | ||
name: 'Upload build artifacts' | ||
with: | ||
path: 'dist/*.tar.gz' | ||
upload_pypi: | ||
name: 'Upload packages' | ||
needs: ['build_wheels', 'build_sdist'] | ||
runs-on: 'ubuntu-latest' | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
name: 'Download artifacts' | ||
with: | ||
name: 'artifact' | ||
path: 'dist' | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
name: "Publish package to PyPI" | ||
with: | ||
user: '__token__' | ||
password: '${{ secrets.PYPI_API_TOKEN }}' |