3535 run : sudo apt -y install libheif-dev
3636
3737 - name : Install from source
38- run : python -m pip -v install ".[dev]"
38+ run : python3 -m pip -v install ".[dev]"
3939
4040 - name : Pylint Analysis
4141 run : pylint pillow_heif
@@ -50,15 +50,18 @@ jobs:
5050
5151 - uses : actions/setup-python@v4
5252 with :
53- python-version : ' 3.10 '
53+ python-version : ' 3.8 '
5454
5555 - name : Prepare system
5656 run : |
5757 sudo apt -y install libheif-dev
58- python -m pip install pytest coverage numpy pillow==8.3.0
58+ python3 -m pip install pytest coverage numpy pillow==8.3.0
5959
6060 - name : Install from source
61- run : python -m pip -v install .
61+ run : python3 -m pip -v install .
62+
63+ - name : LibHeif info
64+ run : python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
6265
6366 - name : Generate coverage report
6467 run : coverage run -m pytest -s && coverage xml && coverage html
99102 python3 -m pip install opencv-python coverage
100103 python3 -m pip -v install ".[tests]"
101104
105+ - name : LibHeif info
106+ run : python3 -c "import pillow_heif; print(pillow_heif.libheif_info())"
107+
102108 - name : Generate coverage report
103109 run : coverage run -m pytest -s && coverage xml && coverage html
104110
@@ -115,3 +121,64 @@ jobs:
115121 file : ./coverage.xml
116122 fail_ci_if_error : true
117123 verbose : true
124+
125+ coverage-windows :
126+ needs : [analysis]
127+ runs-on : windows-2022
128+ name : Coverage(Windows)
129+ env :
130+ MSYS2_PREFIX : " C:/temp/msys64/mingw64"
131+
132+ steps :
133+ - uses : actions/checkout@v3
134+
135+ - uses : actions/setup-python@v4
136+ with :
137+ python-version : ' 3.9'
138+
139+ - uses : msys2/setup-msys2@v2
140+ with :
141+ location : C:/temp
142+ install : >-
143+ mingw-w64-x86_64-libheif
144+
145+ # In release or building from source we do not build `dav1d` or `rav1e` libraries.
146+ # Here we just test working with original package from MSYS.
147+ - name : Copy DLLs from MSYS2
148+ run : |
149+ python -c 'import sysconfig; print(sysconfig.get_paths()[\"platlib\"])'
150+ $site_packages=(python -c 'import sysconfig; print(sysconfig.get_paths()[\"platlib\"])')
151+ cp ${{ env.MSYS2_PREFIX }}/bin/libheif.dll $site_packages/
152+ cp ${{ env.MSYS2_PREFIX }}/bin/libde265-0.dll $site_packages/
153+ cp ${{ env.MSYS2_PREFIX }}/bin/libx265.dll $site_packages/
154+ cp ${{ env.MSYS2_PREFIX }}/bin/libaom.dll $site_packages/
155+ cp ${{ env.MSYS2_PREFIX }}/bin/libwinpthread-1.dll $site_packages/
156+ cp ${{ env.MSYS2_PREFIX }}/bin/libgcc_s_seh-1.dll $site_packages/
157+ cp ${{ env.MSYS2_PREFIX }}/bin/libstdc++-6.dll $site_packages/
158+ cp ${{ env.MSYS2_PREFIX }}/bin/libdav1d.dll $site_packages/
159+ cp ${{ env.MSYS2_PREFIX }}/bin/rav1e.dll $site_packages/
160+
161+ - name : Install from source
162+ run : |
163+ python -m pip install opencv-python coverage pillow==8.1.0
164+ python -m pip -v install ".[tests]"
165+
166+ - name : LibHeif info
167+ run : python -c "import pillow_heif; print(pillow_heif.libheif_info())"
168+
169+ - name : Generate coverage report
170+ run : coverage run -m pytest -s && coverage xml && coverage html
171+
172+ - name : HTML coverage to artifacts
173+ uses : actions/upload-artifact@v3
174+ with :
175+ name : coverage_windows
176+ path : ./htmlcov
177+ if-no-files-found : error
178+
179+ - name : Upload report to Codecov
180+ uses : codecov/codecov-action@v3
181+ with :
182+ file : ./coverage.xml
183+ fail_ci_if_error : true
184+ verbose : true
0 commit comments