Skip to content

Bump pillow from 10.0.1 to 10.1.0 #147

Bump pillow from 10.0.1 to 10.1.0

Bump pillow from 10.0.1 to 10.1.0 #147

# Builds on all branches & PRs
# Deploys to PyPi on "release".
name: Build, test and publish
on: [push, pull_request]
jobs:
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}'/" setup.py
- name: Note version
run: |
echo "PACKAGE_VERSION=$(python3 -- ./setup.py --version)" >> $GITHUB_ENV
- name: Build Python wheels
uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
pre-build-command: 'source ./build-manylinux.sh'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-linux
path: dist/*manylinux*.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.7', '3.8', '3.9', '3.10', '3.11' ]
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@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Install MacOS build deps
if: matrix.os == 'macos-11'
run: |
brew install coreutils gcc sdl2 meson glib
- name: Add msbuild to PATH
if: matrix.os == 'windows-2019'
uses: microsoft/[email protected]
- name: Upgrade pip
run: |
python -m pip install --upgrade pip wheel
- name: Build Python wheels
run: |
python setup.py bdist_wheel
env:
CC: gcc-10
CXX: g++-10
BUILD_32: "${{ matrix.arch == 'x86' && '1' || '' }}"
FASTBUILD: "1"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.arch }}
path: dist/*.whl
build_mingw:
runs-on: windows-2019
name: Msys Wheel
strategy:
fail-fast: false
matrix:
include: [
{ msystem: MINGW64, arch: x86_64, path: mingw64 },
{ msystem: MINGW32, arch: i686, path: mingw32 }
]
steps:
- name: Install MSys2 and dependencies
uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{ matrix.msystem }}
install: >-
git
unzip
mingw-w64-${{ matrix.arch }}-curl
mingw-w64-${{ matrix.arch }}-python
mingw-w64-${{ matrix.arch }}-python-pip
mingw-w64-${{ matrix.arch }}-python-pillow
mingw-w64-${{ matrix.arch }}-openssl
mingw-w64-${{ matrix.arch }}-toolchain
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Rewrite version for dev if not tag
if: "!startsWith(github.ref, 'refs/tags/')"
shell: msys2 {0}
run: |
perl -i -pe "s/__version__\s*=\s*'(.*?)(\.rc.*|\.a.*|\.post.*)?'/__version__='\1.dev0+${GITHUB_SHA::8}'/" setup.py
- name: Note version and add VS to path
shell: msys2 {0}
run: |
echo "PACKAGE_VERSION=$(python3 -- ./setup.py --version)" >> $GITHUB_ENV
- name: Upgrade pip
shell: msys2 {0}
run: |
python -m pip install --upgrade pip wheel
- name: Build Python wheels # microsoft/[email protected] doesn't work here
shell: msys2 {0}
run: |
PATH="$PATH:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/Bin" python setup.py bdist_wheel
env:
BUILD_32: "${{ matrix.arch == 'x86' && '1' || '' }}"
FASTBUILD: "1"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-msys2-py-${{ matrix.msystem }}
path: dist/*.whl
deploy:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build_linux
- build_macos_windows
runs-on: ubuntu-18.04
name: Deploy wheels to PyPI
steps:
- name: Download wheels
uses: actions/download-artifact@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
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-windows*/*.whl wheels-macos*/*.whl