Skip to content

Ft p12

Ft p12 #30

name: build full and pypi upload
on:
push:
branches: ["main"]
pull_request:
jobs:
macos_wheel:
runs-on: macos-latest
strategy:
matrix:
arch: [x86_64, arm64]
cw_build: ["pp*", "cp*"]
exclude:
- arch: arm64
cw_build: "pp*"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.cw_build }}
CIBW_TEST_SKIP: "*-macosx_arm64"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
linux_wheel:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64]
cw_build: ["cp*manylinux*", "pp*manylinux*", "*musllinux*"]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.cw_build }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
linux_wheel_qemu:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [aarch64, ppc64le]
cw_build: ["cp36*many*", "cp37*many*", "cp38*many*", "cp39*many*", "cp310*many*", "cp311*many*", "cp312*many*", "pp37*many*", "pp38*many*", "pp39*many*"]
exclude:
- arch: ppc64le
cw_build: "pp37*many*"
- arch: ppc64le
cw_build: "pp38*many*"
- arch: ppc64le
cw_build: "pp39*many*"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64, ppc64le
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.cw_build }}
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x}"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
windows_wheel:
runs-on: windows-latest
strategy:
matrix:
arch: [x86, AMD64, ARM64]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
source_dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: ./dist/*
upload_pypi:
needs: [macos_wheel, linux_wheel, windows_wheel, source_dist]
runs-on: ubuntu-latest
# try to publish only if this is a push to stable branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_TOKEN }}