From 5c77fbb29f8df09993461c91c153feb636d9766b Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Tue, 19 Sep 2017 12:45:09 +0000 Subject: [PATCH] test mingw --- appveyor.yml | 42 ++++++++++++++++++++----- winbuild/appveyor_build_msys2.sh | 3 ++ winbuild/appveyor_install_msys2_deps.sh | 11 +++++++ 3 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 winbuild/appveyor_build_msys2.sh create mode 100644 winbuild/appveyor_install_msys2_deps.sh diff --git a/appveyor.yml b/appveyor.yml index 18c179983..c37b6b613 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,8 @@ environment: EXECUTABLE: python.exe PIP_DIR: Scripts VENV: NO + TEST_OPTIONS: + DEPLOY: YES matrix: - PYTHON: C:/vp/pypy2 EXECUTABLE: bin/pypy.exe @@ -21,6 +23,11 @@ environment: - PYTHON: C:/Python34-x64 - PYTHON: C:/Python33 - PYTHON: C:/Python33-x64 + - PYTHON: C:/msys64/mingw32 + EXECUTABLE: bin/python3 + PIP_DIR: bin + TEST_OPTIONS: --processes=0 + DEPLOY: NO install: @@ -36,19 +43,38 @@ install: { c:\pillow\winbuild\appveyor_install_pypy.cmd } -- c:\python34\python.exe c:\pillow\winbuild\build_dep.py -- c:\pillow\winbuild\build_deps.cmd - +- ps: | + if ($env:PYTHON -eq "c:/msys64/mingw32") + { + c:\msys64\usr\bin\bash -l -c c:\\pillow\\winbuild\\appveyor_install_msys2_deps.sh + } + else + { + c:\python34\python.exe c:\pillow\winbuild\build_dep.py + c:\pillow\winbuild\build_deps.cmd + $host.SetShouldExit(0) + } + build_script: -- '%PYTHON%\%EXECUTABLE% c:\pillow\winbuild\build.py' +- ps: | + if ($env:PYTHON -eq "c:/msys64/mingw32") + { + c:\msys64\usr\bin\bash -l -c c:\\pillow\\winbuild\\appveyor_build_msys2.sh + Write-Host "through install" + $host.SetShouldExit(0) + } + else + { + & $env:PYTHON/$env:EXECUTABLE c:\pillow\winbuild\build.py + $host.SetShouldExit(0) + } - cd c:\pillow -- dir dist\*.egg - '%PYTHON%\%EXECUTABLE% selftest.py --installed' test_script: - cd c:\pillow - '%PYTHON%\%PIP_DIR%\pip.exe install nose' -- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s' +- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' matrix: fast_finish: true @@ -59,7 +85,7 @@ artifacts: - path: pillow\dist\*.wheel name: wheel -after_test: +before_deploy: - '%PYTHON%\%PIP_DIR%\pip.exe install wheel' - cd c:\pillow\winbuild\ - '%PYTHON%\%EXECUTABLE% c:\pillow\winbuild\build.py --wheel' @@ -77,6 +103,8 @@ deploy: artifact: /.*egg|wheel/ on: branch: master + deploy: YES + # Uncomment the following line to get RDP access after the build/test and block for # up to the timeout limit (~1hr) diff --git a/winbuild/appveyor_build_msys2.sh b/winbuild/appveyor_build_msys2.sh new file mode 100644 index 000000000..489f9411e --- /dev/null +++ b/winbuild/appveyor_build_msys2.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cd /c/pillow && /mingw32/$EXECUTABLE setup.py install diff --git a/winbuild/appveyor_install_msys2_deps.sh b/winbuild/appveyor_install_msys2_deps.sh new file mode 100644 index 000000000..52b814433 --- /dev/null +++ b/winbuild/appveyor_install_msys2_deps.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +pacman -S --noconfirm mingw32/mingw-w64-i686-python3 \ + mingw32/mingw-w64-i686-python3-pip \ + mingw32/mingw-w64-i686-python3-setuptools \ + mingw32/mingw-w64-i686-python2-pip \ + mingw32/mingw-w64-i686-python2-setuptools \ + mingw-w64-i686-libjpeg-turbo + +/mingw32/bin/pip install nose olefile +/mingw32/bin/pip3 install nose olefile