-
Notifications
You must be signed in to change notification settings - Fork 17
71 lines (61 loc) · 2.02 KB
/
test-src-build-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build from source(Windows)
on:
workflow_dispatch:
workflow_call:
pull_request:
branches: [master]
types: [opened, reopened, edited]
paths:
- 'libheif/windows/**'
- 'libheif/build.py'
- 'libheif/heif.h'
- 'setup.*'
- 'pyproject.toml'
push:
branches: [master]
paths:
- 'libheif/windows/**'
- 'libheif/build.py'
- 'libheif/heif.h'
- 'setup.*'
- 'pyproject.toml'
concurrency:
group: src_windows-${{ github.ref }}
cancel-in-progress: true
jobs:
windows_2019:
name: Windows:2019-x86_64
runs-on: windows-2019
env:
MSYS2_PREFIX: "C:/temp/msys64/mingw64"
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
location: C:/temp
update: true
install: >-
patch
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-1.13.0-2-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 -rs