Skip to content

Bump types-pillow from 10.0.0.3 to 10.1.0.20240106 #175

Bump types-pillow from 10.0.0.3 to 10.1.0.20240106

Bump types-pillow from 10.0.0.3 to 10.1.0.20240106 #175

# Builds on all branches & PRs
# Deploys to PyPi on "release".
name: Build, test and publish
on: [push, pull_request]
jobs:
typechecks:
runs-on: ubuntu-latest
name: Type checks
strategy:
max-parallel: 5
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: theCapypara/mypy-check@rust-support
name: Run type checks
with:
python_version: '${{ matrix.python-version }}'
requirements: '-r mypy-requirements.txt'
code-formatting:
runs-on: ubuntu-latest
name: Code Format Check
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: psf/black@stable
with:
options: "--check -t py38"
src: tilequant
import-check:
runs-on: ubuntu-latest
name: Check unused imports
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pycln
pip install -e .
- name: Analysing the code with pycln
run: pycln tilequant -c -a
build_linux:
runs-on: ubuntu-latest
name: Wheel Linux
steps:
# For tags we assume the version in setup.py is correct!
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Rewrite version for dev if not tag
if: "!startsWith(github.ref, 'refs/tags/')"
run: |
perl -i -pe "s/version\s*=\s*'(.*?)(\.rc.*|\.a.*|\.post.*)?'/version='\1.dev0+${GITHUB_SHA::8}'/" pyproject.toml
- name: Note version
run: |
echo "PACKAGE_VERSION=$(python3 -- ./setup.py --version)" >> $GITHUB_ENV
- name: Build Python wheels
uses: RalfG/python-wheels-manylinux-build@v0.5.0-manylinux2014_x86_64
with:
python-versions: 'cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux
path: dist/*.whl
build_macos_windows:
runs-on: ${{ matrix.os }}
name: Mac/Win Wheel
strategy:
fail-fast: false
matrix:
os: [ macos-11, windows-2019 ]
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
arch: [ 'x64', 'x86' ]
exclude:
- os: macos-11
arch: 'x86'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Rewrite version for dev if not tag
if: "!startsWith(github.ref, 'refs/tags/')"
shell: bash
run: |
perl -i -pe "s/version\s*=\s*'(.*?)(\.rc.*|\.a.*|\.post.*)?'/version='\1.dev0+${GITHUB_SHA::8}'/" setup.py
- name: Note version
shell: bash
run: |
echo "PACKAGE_VERSION=$(python3 -- ./setup.py --version)" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip wheel
- name: Build Python wheels
run: pip wheel -w ./dist --no-deps .
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.arch }}
path: dist/*.whl
deploy:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build_linux
- build_macos_windows
runs-on: ubuntu-latest
name: Deploy wheels to PyPI
steps:
- name: Download wheels
uses: actions/download-artifact@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
pip install twine
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload wheels-linux/*manylinux*.whl wheels-macos*/*.whl wheels-windows*/*.whl