fix compilation for Python3.12 #69
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 & test | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
CIBW_SKIP: "*p36-*" | |
CIBW_ARCHS: auto64 | |
CIBW_ARCHS_MACOS: "x86_64 arm64" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: cache built taglib on windows (very slow) | |
uses: actions/cache@v3 | |
if: ${{ runner.os == 'Windows' }} | |
with: | |
path: build/taglib | |
key: taglib-windows-${{ hashFiles('build_taglib.py') }} | |
- name: Install TagLib (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
run: sudo apt-get install -y libtag1-dev | |
- name: install pip dependencies (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools pytest Cython wheel | |
- name: sdist (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
run: python setup.py sdist | |
- name: upload sdist (Linux) | |
uses: actions/upload-artifact@v3 | |
if: ${{ runner.os == 'Linux' }} | |
with: | |
name: sdist | |
path: dist | |
retention-days: 5 | |
- name: build binary wheels | |
uses: pypa/[email protected] | |
- name: upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bdist | |
path: ./wheelhouse/*.whl | |
retention-days: 5 | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: download source wheel | |
uses: actions/download-artifact@v3 | |
with: | |
name: sdist | |
path: wheels | |
- name: download binary wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: bdist | |
path: wheels | |
- name: publish package pypi.org | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
skip_existing: true | |
packages-dir: wheels |