mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-11 17:56:18 +03:00
test-windows.yml build_dep others, codecov
This commit is contained in:
parent
339e3838a1
commit
a26a6e5028
100
.github/workflows/test-windows.yml
vendored
100
.github/workflows/test-windows.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
||||||
python.exe $env:GITHUB_WORKSPACE\winbuild\build_dep.py
|
python.exe $env:GITHUB_WORKSPACE\winbuild\build_dep.py
|
||||||
# .\build_deps.cmd
|
# .\build_deps.cmd
|
||||||
env:
|
env:
|
||||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||||
EXECUTABLE: bin\python.exe
|
EXECUTABLE: bin\python.exe
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
|
@ -87,7 +87,78 @@ jobs:
|
||||||
mkdir %INCLIB%\webp
|
mkdir %INCLIB%\webp
|
||||||
copy /Y /B src\webp\*.h %INCLIB%\webp
|
copy /Y /B src\webp\*.h %INCLIB%\webp
|
||||||
copy /Y /B output\release-static\x86\lib\* %INCLIB%
|
copy /Y /B output\release-static\x86\lib\* %INCLIB%
|
||||||
|
|
||||||
|
- name: Build dependencies / freetype
|
||||||
|
run: |
|
||||||
|
REM Toolkit v100 not available; missing VCTargetsPath; Clean fails
|
||||||
|
|
||||||
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include
|
||||||
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||||
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||||
|
cd /D %BUILD%\freetype-2.10.1
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
||||||
|
echo on
|
||||||
|
rmdir /S /Q objs
|
||||||
|
set DefaultPlatformToolset=v140
|
||||||
|
set VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets
|
||||||
|
set MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
|
||||||
|
%MSBUILD% builds\windows\vc2010\freetype.sln /t:Build /p:Configuration="Release" /p:Platform=Win32 /m
|
||||||
|
xcopy /Y /E /Q include %INCLIB%
|
||||||
|
copy /Y /B objs\Win32\Release\freetype.dll %INCLIB%
|
||||||
|
copy /Y /B objs\Win32\Release\freetype.lib %INCLIB%
|
||||||
|
|
||||||
|
- name: Build dependencies / lcms2
|
||||||
|
if: false
|
||||||
|
run: |
|
||||||
|
REM Projects\VC2015\lcms2.sln is not available in lcms2-2.7
|
||||||
|
|
||||||
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include
|
||||||
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||||
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||||
|
cd /D %BUILD%\lcms2-2.7
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
||||||
|
echo on
|
||||||
|
rmdir /S /Q Lib
|
||||||
|
rmdir /S /Q Projects\VC2015\Release
|
||||||
|
set VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets
|
||||||
|
set MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
|
||||||
|
%MSBUILD% Projects\VC2015\lcms2.sln /t:Clean;lcms2_static /p:Configuration="Release" /p:Platform=Win32 /m
|
||||||
|
xcopy /Y /E /Q include %INCLIB%
|
||||||
|
copy /Y /B Lib\MS\*.lib %INCLIB%
|
||||||
|
|
||||||
|
- name: Build dependencies / openjpeg
|
||||||
|
run: |
|
||||||
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include
|
||||||
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||||
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||||
|
cd /D %BUILD%\openjpeg-2.3.1msvcr10-x32
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
||||||
|
echo on
|
||||||
|
cmake.exe -DBUILD_THIRDPARTY:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" .
|
||||||
|
nmake -nologo -f Makefile clean
|
||||||
|
nmake -nologo -f Makefile
|
||||||
|
mkdir %INCLIB%\openjpeg-2.3.1
|
||||||
|
copy /Y /B src\lib\openjp2\*.h %INCLIB%\openjpeg-2.3.1
|
||||||
|
copy /Y /B bin\*.lib %INCLIB%
|
||||||
|
|
||||||
|
- name: Build dependencies / ghostscript
|
||||||
|
if: false
|
||||||
|
run: |
|
||||||
|
REM only used for Python 2.7 in AppVeyor?
|
||||||
|
|
||||||
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include
|
||||||
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||||
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||||
|
cd /D %BUILD%\ghostscript-9.27
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
||||||
|
echo on
|
||||||
|
set MSVC_VERSION=14
|
||||||
|
set RCOMP="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\RC.Exe"
|
||||||
|
nmake -nologo -f psi\msvc.mak
|
||||||
|
copy /Y /B bin\ %PYTHON%
|
||||||
|
env:
|
||||||
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||||
|
|
||||||
- name: Build Pillow
|
- name: Build Pillow
|
||||||
run: |
|
run: |
|
||||||
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include
|
||||||
|
@ -100,15 +171,16 @@ jobs:
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
||||||
set BLDOPT=install
|
set BLDOPT=install
|
||||||
%PYTHON%\%EXECUTABLE% setup.py build_ext --add-imaging-libs=msvcrt install
|
%PYTHON%\%EXECUTABLE% setup.py build_ext --add-imaging-libs=msvcrt install
|
||||||
|
%PYTHON%\%EXECUTABLE% -c "from PIL import _webp;import os, shutil;shutil.copy(r'%INCLIB%\freetype.dll', os.path.dirname(_webp.__file__));"
|
||||||
%PYTHON%\%EXECUTABLE% selftest.py --installed
|
%PYTHON%\%EXECUTABLE% selftest.py --installed
|
||||||
env:
|
env:
|
||||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||||
EXECUTABLE: python.exe
|
EXECUTABLE: python.exe
|
||||||
|
|
||||||
- name: Install PyTest
|
- name: pip install pytest pytest-cov codecov
|
||||||
run: '%PYTHON%\%PIP% install pytest pytest-cov'
|
run: '%PYTHON%\%PIP% install pytest pytest-cov codecov'
|
||||||
env:
|
env:
|
||||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||||
PIP: Scripts\pip.exe
|
PIP: Scripts\pip.exe
|
||||||
|
|
||||||
- name: Test Pillow
|
- name: Test Pillow
|
||||||
|
@ -116,22 +188,14 @@ jobs:
|
||||||
cd /D %GITHUB_WORKSPACE%
|
cd /D %GITHUB_WORKSPACE%
|
||||||
%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests
|
%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests
|
||||||
env:
|
env:
|
||||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||||
EXECUTABLE: python.exe
|
EXECUTABLE: python.exe
|
||||||
|
|
||||||
- name: Install Codecov
|
|
||||||
run: '%PYTHON%\%PIP% install codecov'
|
|
||||||
env:
|
|
||||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
|
||||||
PIP: Scripts\pip.exe
|
|
||||||
|
|
||||||
- name: Upload coverage
|
- name: Upload coverage
|
||||||
run: |
|
run: |
|
||||||
cd /D %GITHUB_WORKSPACE%
|
cd /D %GITHUB_WORKSPACE%
|
||||||
codecov --file coverage.xml --name %PYTHON%
|
%PYTHON%\%CODECOV% --file coverage.xml --name %PYTHON%
|
||||||
echo TODO upload coverage
|
|
||||||
exit /B 1
|
|
||||||
env:
|
env:
|
||||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||||
EXECUTABLE: python.exe
|
CODECOV: Scripts\codecov.exe
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ set INCLUDE=%%INCLUDE%%;%%INCLIB%%\%(inc_dir)s;%%INCLIB%%\tcl%(tcl_ver)s\include
|
||||||
setlocal
|
setlocal
|
||||||
set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl%(vc_setup)s
|
set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl%(vc_setup)s
|
||||||
call %(python_path)s\%(executable)s setup.py %(imaging_libs)s %%BLDOPT%%
|
call %(python_path)s\%(executable)s setup.py %(imaging_libs)s %%BLDOPT%%
|
||||||
call %(python_path)s\%(executable)s -c "from PIL import _webp;import os, shutil;shutil.copy('%%INCLIB%%\\freetype.dll', os.path.dirname(_webp.__file__));"
|
call %(python_path)s\%(executable)s -c "from PIL import _webp;import os, shutil;shutil.copy(r'%%INCLIB%%\freetype.dll', os.path.dirname(_webp.__file__));"
|
||||||
endlocal
|
endlocal
|
||||||
|
|
||||||
endlocal
|
endlocal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user