Skip to content

libheif 1.17.1 support (#156) #135

libheif 1.17.1 support (#156)

libheif 1.17.1 support (#156) #135

name: From source(Windows)
on:
workflow_dispatch:
workflow_call:
pull_request:
paths:
- '.github/workflows/test-src-build-windows.yml'
- 'libheif/windows/**'
- 'libheif/heif.h'
- 'setup.*'
- 'pyproject.toml'
- 'pi-heif/libheif/windows/**'
- 'pi-heif/setup.cfg'
- 'pillow_heif/_pillow_heif.c'
push:
branches: [master]
paths:
- '.github/workflows/test-src-build-windows.yml'
- 'libheif/windows/**'
- 'libheif/heif.h'
- 'setup.*'
- 'pyproject.toml'
- 'pi-heif/libheif/windows/**'
- 'pi-heif/setup.cfg'
- 'pillow_heif/_pillow_heif.c'
concurrency:
group: src_windows-${{ github.ref }}
cancel-in-progress: true
jobs:
full_windows_2019:
name: Windows:2019-x86_64
runs-on: windows-2019
env:
MSYS2_PREFIX: "C:/temp/msys64/mingw64"
PH_FULL_ACTION: 1
EXP_PH_LIBHEIF_VERSION: ""
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: msys2/setup-msys2@v2
with:
location: C:/temp
install: >-
mingw-w64-x86_64-binutils
- name: Build libheif and dependencies
shell: msys2 {0}
run: |
cd libheif/windows/mingw-w64-libheif
makepkg-mingw --syncdeps --noconfirm -f
pacman -U mingw-w64-x86_64-libheif-*-any.pkg.tar.zst --noconfirm
- name: Installing Pillow-Heif
run: python -m pip -v install ".[dev]"
- name: Copy DLLs from MSYS2
run: |
$site_packages=(python -c 'import sysconfig; print(sysconfig.get_paths()[\"platlib\"])')
cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libx265.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libaom.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/
- name: LibHeif info
run: python -c "import pillow_heif; print(pillow_heif.libheif_info())"
- name: Perform tests
run: python -m pytest
lite_windows_2019:
name: Windows:2019-x86_64(Pi-Heif)
runs-on: windows-2019
env:
MSYS2_PREFIX: "C:/temp/msys64/mingw64"
PH_LIGHT_ACTION: 1
EXP_PH_LIBHEIF_VERSION: ""
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Transform to Pi-Heif
run: |
cp -r -v -force ./pi-heif/* .
python3 .github/transform_to-pi_heif.py
- uses: msys2/setup-msys2@v2
with:
location: C:/temp
install: >-
mingw-w64-x86_64-binutils
- name: Build libheif and dependencies
shell: msys2 {0}
run: |
cd libheif/windows/mingw-w64-libheif
makepkg-mingw --syncdeps --noconfirm -f
pacman -U mingw-w64-x86_64-libheif-*-any.pkg.tar.zst --noconfirm
- name: Installing Pi-Heif
run: python -m pip -v install ".[tests]"
- name: Copy DLLs from MSYS2
run: |
$site_packages=(python -c 'import sysconfig; print(sysconfig.get_paths()[\"platlib\"])')
cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/
cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/
- name: LibHeif info
run: python -c "import pi_heif; print(pi_heif.libheif_info())"
- name: Perform tests
run: python -m pytest