Skip to content

v0.17.0

v0.17.0 #36

name: Wheels test • Pi-Heif
on:
release:
types: [ published ]
workflow_dispatch:
jobs:
docker-tests:
name: ${{ matrix.i['os'] }} • ${{ matrix.i['ver'] }} • ${{ matrix.i['arch'] }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
i: [
{ "os": "amazonlinux", "ver": "latest", "arch": "amd64" },
{ "os": "amazonlinux", "ver": "latest", "arch": "arm64" },
{ "os": "oraclelinux", "ver": "9", "arch": "amd64" },
{ "os": "oraclelinux", "ver": "9", "arch": "arm64" },
{ "os": "fedora", "ver": "37", "arch": "amd64" },
{ "os": "debian", "ver": "11", "arch": "amd64" },
{ "os": "debian", "ver": "11", "arch": "arm64" },
{ "os": "debian", "ver": "11", "arch": "arm/v7" },
{ "os": "debian", "ver": "12", "arch": "amd64" },
{ "os": "debian", "ver": "12", "arch": "arm64" },
{ "os": "debian", "ver": "12", "arch": "arm/v7" },
{ "os": "alpine", "ver": "3.19", "arch": "amd64" },
{ "os": "alpine", "ver": "3.19", "arch": "arm64" },
{ "os": "alpine", "ver": "3.19", "arch": "arm/v7" },
{ "os": "alpine", "ver": "3.20", "arch": "amd64" },
{ "os": "alpine", "ver": "3.20", "arch": "arm64" },
{ "os": "alpine", "ver": "3.20", "arch": "arm/v7" },
]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Preparing debian
if: matrix.i['os'] == 'debian' || matrix.i['os'] == 'ubuntu'
run: |
echo PREPARE_CMD="apt update" >> $GITHUB_ENV
echo INSTALL_CMD="apt install -y \
python3-minimal python3-distutils python3-pip python3-dev python3-venv \
zlib1g-dev libjpeg62-turbo-dev liblcms2-dev libwebp-dev libfribidi-dev libharfbuzz-dev" >> $GITHUB_ENV
- name: Preparing musli
if: matrix.i['os'] == 'alpine'
run: echo INSTALL_CMD="apk add --no-cache python3 py3-pip py3-pillow py3-numpy" >> $GITHUB_ENV
- name: Preparing centos
if: matrix.i['os'] != 'debian' && matrix.i['os'] != 'ubuntu' && matrix.i['os'] != 'alpine'
run: |
echo PREPARE_CMD="yum makecache" >> $GITHUB_ENV
echo INSTALL_CMD="yum install -y python3 python3-pip" >> $GITHUB_ENV
- name: Build image & Run tests
run: |
python3 .github/transform_to-pi_heif.py
docker buildx build \
--platform linux/${{ matrix.i.arch }} \
--build-arg BASE_IMAGE="${{ matrix.i['os'] }}:${{ matrix.i['ver'] }}" \
--build-arg PREPARE_CMD="${{ env.PREPARE_CMD }}" \
--build-arg INSTALL_CMD="${{ env.INSTALL_CMD }}" \
--build-arg TEST_TYPE="export PH_LIGHT_ACTION=1" \
-f docker/test_wheels.Dockerfile .
windows-wheels:
name: Windows • 2019 • ${{ matrix.python-version }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12"]
env:
PH_LIGHT_ACTION: 1
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: Start-Sleep -s 480
shell: powershell
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
run: |
python3 .github/transform_to-pi_heif.py
cd .. && python3 -m pytest pillow_heif
macos-wheels:
name: macOS • 12 • ${{ matrix.python-version }}
runs-on: macos-12
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
run: |
export TEST_DECODE_THREADS=0
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif
manylinux-wheels:
name: Ubuntu-Focal • ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.9", "pypy-3.10", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheel
run: |
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif
macos-projects-together:
name: macOS • Together • ${{ matrix.python-version }}
runs-on: macos-12
strategy:
matrix:
python-version: ["pypy-3.9", "3.9"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
brew install libjpeg little-cms2
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pillow-heif
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheels
run: |
export TEST_DECODE_THREADS=0
export PH_FULL_ACTION=1
cd .. && python3 -m pytest pillow_heif
export PH_FULL_ACTION=0 && cd pillow_heif
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif
linux-projects-together:
name: Linux • Together • ${{ matrix.python-version }}
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["pypy-3.10", "3.10"]
steps:
- name: Delay, waiting Pypi to update.
if: ${{ github.event_name != 'workflow_dispatch' }}
run: sleep 480
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Preparations
run: |
sudo apt update && sudo apt install libjpeg-dev liblcms2-dev
python3 -m pip install --prefer-binary pillow
python3 -m pip install pytest packaging defusedxml
python3 -m pip install --only-binary=:all: pillow-heif
python3 -m pip install --only-binary=:all: pi-heif
- name: Test wheels
run: |
export PH_FULL_ACTION=1
cd .. && python3 -m pytest pillow_heif
export PH_FULL_ACTION=0 && cd pillow_heif
python3 .github/transform_to-pi_heif.py
export PH_LIGHT_ACTION=1
cd .. && python3 -m pytest pillow_heif