mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 00:46:16 +03:00
test-windows.yml matrix platform
This commit is contained in:
parent
df1e290d88
commit
74a7fd5985
57
.github/workflows/test-windows.yml
vendored
57
.github/workflows/test-windows.yml
vendored
|
@ -8,9 +8,19 @@ jobs:
|
|||
runs-on: windows-2016
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.5.4", "3.6.8", "3.7.4"]
|
||||
python-version:
|
||||
- "3.5.4"
|
||||
- "3.6.8"
|
||||
- "3.7.4"
|
||||
platform:
|
||||
- name: "x86"
|
||||
vars: "x86"
|
||||
msbuild: "Win32"
|
||||
- name: "x64"
|
||||
vars: "x86_amd64"
|
||||
msbuild: "x64"
|
||||
|
||||
name: Python ${{ matrix.python-version }} x86
|
||||
name: Python ${{ matrix.python-version }} ${{ matrix.platform.name }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
@ -27,7 +37,7 @@ jobs:
|
|||
python.exe $env:GITHUB_WORKSPACE\winbuild\build_dep.py
|
||||
# .\build_deps.cmd
|
||||
env:
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\${{ matrix.platform.name }}
|
||||
EXECUTABLE: bin\python.exe
|
||||
shell: pwsh
|
||||
|
||||
|
@ -37,7 +47,7 @@ jobs:
|
|||
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||
cd /D %BUILD%\jpeg-9c
|
||||
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" ${{ matrix.platform.vars }} 8.1
|
||||
echo on
|
||||
nmake -nologo -f makefile.vc setup-vc6
|
||||
nmake -nologo -f makefile.vc clean
|
||||
|
@ -51,7 +61,7 @@ jobs:
|
|||
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||
cd /D %BUILD%\zlib-1.2.11
|
||||
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" ${{ matrix.platform.vars }} 8.1
|
||||
echo on
|
||||
nmake -nologo -f win32\Makefile.msc clean
|
||||
nmake -nologo -f win32\Makefile.msc zlib.lib
|
||||
|
@ -65,7 +75,7 @@ jobs:
|
|||
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||
cd /D %BUILD%\tiff-4.0.10
|
||||
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" ${{ matrix.platform.vars }} 8.1
|
||||
echo on
|
||||
copy %GITHUB_WORKSPACE%\winbuild\nmake.opt nmake.opt
|
||||
nmake -nologo -f makefile.vc clean
|
||||
|
@ -80,13 +90,13 @@ jobs:
|
|||
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
||||
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
||||
cd /D %BUILD%\libwebp-1.0.3
|
||||
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" ${{ matrix.platform.vars }} 8.1
|
||||
echo on
|
||||
rmdir /S /Q output\release-static
|
||||
nmake -nologo -f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output ARCH=x86 all
|
||||
nmake -nologo -f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output ARCH=${{ matrix.platform.name }} all
|
||||
mkdir %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\${{ matrix.platform.name }}\lib\* %INCLIB%
|
||||
|
||||
- name: Build dependencies / freetype
|
||||
run: |
|
||||
|
@ -96,16 +106,16 @@ jobs:
|
|||
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
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ${{ matrix.platform.vars }} 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
|
||||
%MSBUILD% builds\windows\vc2010\freetype.sln /t:Build /p:Configuration="Release" /p:Platform=${{ matrix.platform.msbuild }} /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%
|
||||
copy /Y /B objs\${{ matrix.platform.msbuild }}\Release\freetype.dll %INCLIB%
|
||||
copy /Y /B objs\${{ matrix.platform.msbuild }}\Release\freetype.lib %INCLIB%
|
||||
|
||||
- name: Build dependencies / lcms2
|
||||
if: false
|
||||
|
@ -116,13 +126,13 @@ jobs:
|
|||
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
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ${{ matrix.platform.vars }} 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
|
||||
%MSBUILD% Projects\VC2015\lcms2.sln /t:Clean;lcms2_static /p:Configuration="Release" /p:Platform=${{ matrix.platform.msbuild }} /m
|
||||
xcopy /Y /E /Q include %INCLIB%
|
||||
copy /Y /B Lib\MS\*.lib %INCLIB%
|
||||
|
||||
|
@ -132,7 +142,7 @@ jobs:
|
|||
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
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ${{ matrix.platform.vars }} 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
|
||||
|
@ -147,15 +157,14 @@ jobs:
|
|||
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
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" ${{ matrix.platform.vars }} 8.1
|
||||
echo on
|
||||
set MSVC_VERSION=14
|
||||
set RCOMP="C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\RC.Exe"
|
||||
if "${{ matrix.platform.name }}"=="x64" set WIN64=""
|
||||
nmake -nologo -f psi\msvc.mak
|
||||
rem Add bin to PATH variable: Copy to INCLIB, then add INCLIB to PATH in Test step.
|
||||
copy /Y /B bin\* %INCLIB%
|
||||
env:
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||
|
||||
- name: Build Pillow
|
||||
run: |
|
||||
|
@ -166,19 +175,19 @@ jobs:
|
|||
set DISTUTILS_USE_SDK=1
|
||||
set LIB=%INCLIB%;%PYTHON%\tcl
|
||||
set INCLUDE=%INCLIB%;%GITHUB_WORKSPACE%\depends\tcl86\include;%INCLUDE%
|
||||
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" ${{ matrix.platform.vars }} 8.1
|
||||
set BLDOPT=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
|
||||
env:
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\${{ matrix.platform.name }}
|
||||
EXECUTABLE: python.exe
|
||||
|
||||
- name: pip install pytest pytest-cov codecov
|
||||
run: '%PYTHON%\%PIP% install pytest pytest-cov codecov'
|
||||
env:
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\${{ matrix.platform.name }}
|
||||
PIP: Scripts\pip.exe
|
||||
|
||||
- name: Test Pillow
|
||||
|
@ -189,7 +198,7 @@ jobs:
|
|||
cd /D %GITHUB_WORKSPACE%
|
||||
%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov-report term --cov-report xml Tests
|
||||
env:
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\${{ matrix.platform.name }}
|
||||
EXECUTABLE: python.exe
|
||||
|
||||
- name: Upload coverage
|
||||
|
@ -197,6 +206,6 @@ jobs:
|
|||
cd /D %GITHUB_WORKSPACE%
|
||||
%PYTHON%\%CODECOV% --file coverage.xml --name %PYTHON%
|
||||
env:
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86
|
||||
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\${{ matrix.platform.name }}
|
||||
CODECOV: Scripts\codecov.exe
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user