mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
106 lines
4.0 KiB
YAML
106 lines
4.0 KiB
YAML
name: Test Windows
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: windows-2016
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.6.8"]
|
|
|
|
name: Python ${{ matrix.python-version }} x86
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Fetch dependencies
|
|
run: |
|
|
curl -fsSL -o pillow-depends.zip https://github.com/python-pillow/pillow-depends/archive/master.zip
|
|
7z x pillow-depends.zip -oc:\
|
|
mv c:\pillow-depends-master c:\pillow-depends
|
|
xcopy c:\pillow-depends\*.zip $env:GITHUB_WORKSPACE\winbuild\
|
|
xcopy c:\pillow-depends\*.tar.gz $env:GITHUB_WORKSPACE\winbuild\
|
|
xcopy /s c:\pillow-depends\test_images\* $env:GITHUB_WORKSPACE\tests\images\
|
|
cd $env:GITHUB_WORKSPACE/winbuild/
|
|
python.exe $env:GITHUB_WORKSPACE\winbuild\build_dep.py
|
|
# .\build_deps.cmd
|
|
env:
|
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
|
EXECUTABLE: bin\python.exe
|
|
shell: pwsh
|
|
|
|
- name: Build dependencies / libjpeg
|
|
run: |
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
|
echo on
|
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include;%INCLUDE%
|
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
|
cd /D %BUILD%\jpeg-9c
|
|
nmake -nologo -f makefile.vc setup-vc6
|
|
nmake -nologo -f makefile.vc clean
|
|
nmake -nologo -f makefile.vc nodebug=1 libjpeg.lib
|
|
copy /Y /B j*.h %INCLIB%
|
|
copy /Y /B *.lib %INCLIB%
|
|
|
|
- name: Build dependencies / zlib
|
|
run: |
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
|
echo on
|
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include;%INCLUDE%
|
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
|
cd /D %BUILD%\zlib-1.2.11
|
|
nmake -nologo -f win32\Makefile.msc clean
|
|
nmake -nologo -f win32\Makefile.msc zlib.lib
|
|
copy /Y /B z*.h %INCLIB%
|
|
copy /Y /B *.lib %INCLIB%
|
|
copy /Y /B zlib.lib %INCLIB%\z.lib
|
|
|
|
- name: Build dependencies / libtiff
|
|
run: |
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
|
echo on
|
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include;%INCLUDE%
|
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
|
cd /D %BUILD%\tiff-4.0.10
|
|
copy %GITHUB_WORKSPACE%\winbuild\nmake.opt nmake.opt
|
|
nmake -nologo -f makefile.vc clean
|
|
nmake -nologo -f makefile.vc lib
|
|
copy /Y /B libtiff\tiff*.h %INCLIB%
|
|
copy /Y /B libtiff\*.dll %INCLIB%
|
|
copy /Y /B libtiff\*.lib %INCLIB%
|
|
|
|
- name: Build dependencies / webp
|
|
run: |
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 8.1
|
|
echo on
|
|
set INCLUDE=C:\Program Files (x86)\Microsoft SDKs\Windows\V7.1A\Include;%INCLUDE%
|
|
set INCLIB=%GITHUB_WORKSPACE%\winbuild\depends\msvcr10-x32
|
|
set BUILD=%GITHUB_WORKSPACE%\winbuild\build
|
|
cd /D %BUILD%\libwebp-1.0.3
|
|
rmdir /S /Q output\release-static
|
|
nmake -nologo -f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output ARCH=x86 all
|
|
mkdir %INCLIB%\webp
|
|
copy /Y /B src\webp\*.h %INCLIB%\webp
|
|
copy /Y /B output\release-static\x86\lib\* %INCLIB%
|
|
|
|
- name: Build
|
|
run: '%PYTHON%\%EXECUTABLE% %GITHUB_WORKSPACE%\winbuild\build.py'
|
|
env:
|
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
|
EXECUTABLE: python.exe
|
|
|
|
- name: Test
|
|
run: '%PYTHON%\%EXECUTABLE% %GITHUB_WORKSPACE%\selftest.py --installed'
|
|
env:
|
|
PYTHON: C:\hostedtoolcache\windows\Python\${{ matrix.python-version }}\x86\
|
|
EXECUTABLE: python.exe
|
|
|
|
- name: After success
|
|
run: echo TODO 1>&2
|
|
|