build: disable avx and sse #1
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 & Publish wheels | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
build_wheels: | |
strategy: | |
matrix: | |
# macos-13 is an intel runner, macos-14 is apple silicon | |
os: [ubuntu-latest, windows-latest, macos-13] | |
cp: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312", "cp313"] | |
name: Build ${{ matrix.cp }} wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Build wheels | |
uses: joerick/[email protected] | |
env: | |
CIBW_ARCHS_LINUX: auto aarch64 | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
CIBW_BUILD: | | |
${{ matrix.cp }}-manylinux_x86_64 | |
${{ matrix.cp }}-manylinux_aarch64 | |
${{ matrix.cp }}-win_amd64 | |
${{ matrix.cp }}-win32 | |
${{ matrix.cp }}-macosx_x86_64 | |
${{ matrix.cp }}-macosx_arm64 | |
CIBW_TEST_REQUIRES: setuptools pytest pillow imagehash texture2ddecoder | |
CIBW_TEST_COMMAND: pytest -v -s {package}/tests | |
CIBW_TEST_SKIP: "*-macosx* *-manylinux_i686 *-win32" | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
upload_pypi: | |
name: Publish to PyPI | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
skip_existing: true |