Skip to content

Deploy

Deploy #9

Workflow file for this run

name: Deploy
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-22.04
- macos-12
- windows-2019
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
cibuildwheel:
- "cp38"
- "cp39"
- "cp310"
- "cp311"
- "cp312"
exclude:
- python-version: "3.8"
cibuildwheel: "cp39"
- python-version: "3.8"
cibuildwheel: "cp310"
- python-version: "3.8"
cibuildwheel: "cp311"
- python-version: "3.8"
cibuildwheel: "cp312"
- python-version: "3.9"
cibuildwheel: "cp38"
- python-version: "3.9"
cibuildwheel: "cp310"
- python-version: "3.9"
cibuildwheel: "cp311"
- python-version: "3.9"
cibuildwheel: "cp312"
- python-version: "3.10"
cibuildwheel: "cp38"
- python-version: "3.10"
cibuildwheel: "cp39"
- python-version: "3.10"
cibuildwheel: "cp311"
- python-version: "3.10"
cibuildwheel: "cp312"
- python-version: "3.11"
cibuildwheel: "cp38"
- python-version: "3.11"
cibuildwheel: "cp39"
- python-version: "3.11"
cibuildwheel: "cp310"
- python-version: "3.11"
cibuildwheel: "cp312"
- python-version: "3.12"
cibuildwheel: "cp38"
- python-version: "3.12"
cibuildwheel: "cp39"
- python-version: "3.12"
cibuildwheel: "cp310"
- python-version: "3.12"
cibuildwheel: "cp311"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make develop
python -m pip install -U wheel twine setuptools
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5
- name: Python Wheel Steps (Linux - cibuildwheel)
run: python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*"
CIBW_BUILD_VERBOSITY: 3
if: ${{ runner.os == 'Linux' }}
- name: Python Build Steps (Macos x86)
run: python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*"
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BUILD_VERBOSITY: 3
if: ${{ matrix.os == 'macos-12' }}
- name: Python Build Steps (Windows 2019)
run: python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64"
if: ${{ matrix.os == 'windows-2019' }}
- name: Check Wheels
run: twine check dist/*
- name: Upload Wheel
uses: actions/upload-artifact@v4
with:
name: wheel-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}
path: dist/*.whl
# - name: Publish distribution 📦 to PyPI
# if: ${{ startsWith(github.ref, 'refs/tags') && matrix.os != 'ubuntu-latest' }}
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_UN }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PW }}
# run: make upload
build_sdist:
strategy:
matrix:
os:
- ubuntu-22.04
python-version:
- 3.9
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
make develop
python -m pip install -U wheel twine setuptools
- name: Python SDist Steps
run: python setup.py sdist
- name: Check sdist
run: twine check dist/*.tar.gz
- name: Upload SDist
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz