Skip to content

Commit

Permalink
adding wheels tests and readme info for ARMv7(Debian, Alpine)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigcat88 committed Nov 20, 2022
1 parent e986b91 commit 67b924a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 23 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/test-wheels-pi_heif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
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" },
Expand All @@ -23,16 +24,19 @@ jobs:
{ "os": "fedora", "ver": "37", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "arm64" },
{ "os": "debian", "ver": "10.11", "arch": "amd64" },
{ "os": "debian", "ver": "10.11", "arch": "arm64" },
{ "os": "debian", "ver": "11.2", "arch": "amd64" },
{ "os": "debian", "ver": "11.2", "arch": "arm64" },
{ "os": "debian", "ver": "10", "arch": "amd64" },
{ "os": "debian", "ver": "10", "arch": "arm64" },
{ "os": "debian", "ver": "10", "arch": "arm/v7" },
{ "os": "debian", "ver": "11", "arch": "amd64" },
{ "os": "debian", "ver": "11", "arch": "arm64" },
{ "os": "alpine", "ver": "3.14", "arch": "amd64" },
{ "os": "alpine", "ver": "3.14", "arch": "arm64" },
{ "os": "alpine", "ver": "3.14", "arch": "arm/v7" },
{ "os": "alpine", "ver": "3.15", "arch": "amd64" },
{ "os": "alpine", "ver": "3.15", "arch": "arm64" },
{ "os": "alpine", "ver": "3.16", "arch": "amd64" },
{ "os": "alpine", "ver": "3.16", "arch": "arm64" },
{ "os": "alpine", "ver": "3.16", "arch": "arm/v7" },
]

steps:
Expand All @@ -42,16 +46,15 @@ jobs:

- uses: actions/checkout@v3
- name: Set up QEMU
if: matrix.i['arch'] == 'arm64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- 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" >> $GITHUB_ENV
echo INSTALL_CMD="apt install -y \
python3-minimal python3-distutils python3-pip python3-dev \
zlib1g-dev libjpeg62-turbo-dev liblcms2-dev libwebp-dev libfribidi-dev libharfbuzz-dev" >> $GITHUB_ENV
- name: Preparing musli
if: matrix.i['os'] == 'alpine'
Expand All @@ -66,12 +69,12 @@ jobs:
- name: Build image & Run tests
run: |
python3 .github/transform_to-pi_heif.py
docker buildx build --platform ${{ matrix.i.arch }} \
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" \
--build-arg EX_ARG="-i https://test.pypi.org/simple/" \
-f docker/test_wheels.Dockerfile .
windows-wheels:
Expand Down
32 changes: 22 additions & 10 deletions .github/workflows/test-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
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" },
Expand All @@ -23,16 +24,19 @@ jobs:
{ "os": "fedora", "ver": "37", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "amd64" },
{ "os": "centos", "ver": "7", "arch": "arm64" },
{ "os": "debian", "ver": "10.11", "arch": "amd64" },
{ "os": "debian", "ver": "10.11", "arch": "arm64" },
{ "os": "debian", "ver": "11.2", "arch": "amd64" },
{ "os": "debian", "ver": "11.2", "arch": "arm64" },
{ "os": "debian", "ver": "10", "arch": "amd64" },
{ "os": "debian", "ver": "10", "arch": "arm64" },
{ "os": "debian", "ver": "10", "arch": "arm/v7" },
{ "os": "debian", "ver": "11", "arch": "amd64" },
{ "os": "debian", "ver": "11", "arch": "arm64" },
{ "os": "alpine", "ver": "3.14", "arch": "amd64" },
{ "os": "alpine", "ver": "3.14", "arch": "arm64" },
{ "os": "alpine", "ver": "3.14", "arch": "arm/v7" },
{ "os": "alpine", "ver": "3.15", "arch": "amd64" },
{ "os": "alpine", "ver": "3.15", "arch": "arm64" },
{ "os": "alpine", "ver": "3.16", "arch": "amd64" },
{ "os": "alpine", "ver": "3.16", "arch": "arm64" },
{ "os": "alpine", "ver": "3.16", "arch": "arm/v7" },
]

steps:
Expand All @@ -42,16 +46,23 @@ jobs:

- uses: actions/checkout@v3
- name: Set up QEMU
if: matrix.i['arch'] == 'arm64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64

- name: Test type is Full
if: matrix.i['arch'] != 'arm/v7'
run: echo TEST_TYPE="export PH_FULL_ACTION=1" >> $GITHUB_ENV

- name: Test type is Light
if: matrix.i['arch'] == 'arm/v7'
run: echo TEST_TYPE="export PH_LIGHT_ACTION=1" >> $GITHUB_ENV

- 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" >> $GITHUB_ENV
echo INSTALL_CMD="apt install -y \
python3-minimal python3-distutils python3-pip python3-dev \
zlib1g-dev libjpeg62-turbo-dev liblcms2-dev libwebp-dev libfribidi-dev libharfbuzz-dev" >> $GITHUB_ENV
- name: Preparing musli
if: matrix.i['os'] == 'alpine'
Expand All @@ -65,11 +76,12 @@ jobs:
- name: Build image & Run tests
run: |
docker buildx build --platform ${{ matrix.i.arch }} \
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_FULL_ACTION=1" \
--build-arg TEST_TYPE="${{ env.TEST_TYPE }}" \
-f docker/test_wheels.Dockerfile .
windows-wheels:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)
![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)
![Alpine Linux](https://img.shields.io/badge/Alpine_Linux-0078D6.svg?style=for-the-badge&logo=alpine-linux&logoColor=white)
![Raspberry Pi](https://img.shields.io/badge/Rasberry_Pi-FCC624.svg?style=for-the-badge&logo=raspberry-pi&logoColor=red)

Python bindings to [libheif](https://github.com/strukturag/libheif) for working with HEIF images and an add-on for Pillow.

Expand Down Expand Up @@ -185,5 +186,5 @@ pillow_heif.register_avif_opener()

* **i686**, **x86_64**, **aarch64** wheels.

For `armv7l` there is a `pillow_heif-x.x.x-cp38-abi3-manylinux_2_31_armv7l.whl` wheel on `pypi` for Debian11+ systems.
It supports only decoding and builds without `x265` encoder.
For `ARMv7`(`armv7l`) wheels are present for Debian 10+(Ubuntu 20.04+) and Alpine 14+.
They supports only decoding and builds without `x265` encoder.
3 changes: 2 additions & 1 deletion pi-heif/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)
![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)
![Alpine Linux](https://img.shields.io/badge/Alpine_Linux-0078D6.svg?style=for-the-badge&logo=alpine-linux&logoColor=white)
![Raspberry Pi](https://img.shields.io/badge/Rasberry_Pi-FCC624.svg?style=for-the-badge&logo=raspberry-pi&logoColor=red)

This is a light version of [Pillow-Heif](https://github.com/bigcat88/pillow_heif) with more permissive license for binary wheels.

Expand Down Expand Up @@ -75,4 +76,4 @@ if pi_heif.is_supported("input.heic"):

* **i686**, **x86_64**, **aarch64** wheels.

For `ARMv7`(`armv7l`) there is a `pi_heif-x.x.x-cp38-abi3-manylinux_2_31_armv7l.whl` wheel on `pypi` for Debian11+ based systems.
For `ARMv7`(`armv7l`) wheels are present for Debian 10+(Ubuntu 20.04+) and Alpine 14+.

0 comments on commit 67b924a

Please sign in to comment.