blob: 9c185e803e008497c7c3582e698d53e02ad4ac6d (
plain) (
tree)
|
|
# vim ft=yaml
# CI on Windows via appveyor
environment:
global:
REPO_DIR: protobuf
PACKAGE_NAME: protobuf
BUILD_COMMIT: v3.5.2
BUILD_VERSION: 3.5.2
MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
BUILD_DLL: OFF
UNICODE: ON
PB_TEST_DEP: "six==1.9"
OTHER_TEST_DEP: "setuptools==38.5.1"
WHEELHOUSE_UPLOADER_USERNAME: travis-worker
matrix:
- PYTHON: C:\Python27
PYTHON_VERSION: 2.7
PYTHON_ARCH: 32
- PYTHON: C:\Python27-x64
PYTHON_VERSION: 2.7
PYTHON_ARCH: 64
- PYTHON: C:\Python34
PYTHON_VERSION: 3.4
PYTHON_ARCH: 32
- PYTHON: C:\Python34-x64
PYTHON_VERSION: 3.4
PYTHON_ARCH: 64
- PYTHON: C:\Python35
PYTHON_VERSION: 3.5
PYTHON_ARCH: 32
- PYTHON: C:\Python35-x64
PYTHON_VERSION: 3.5
PYTHON_ARCH: 64
- PYTHON: C:\Python36
PYTHON_VERSION: 3.6
PYTHON_ARCH: 32
- PYTHON: C:\Python36-x64
PYTHON_VERSION: 3.6
PYTHON_ARCH: 64
matrix:
fast_finish: true
install:
# Fetch submodules
- git submodule update --init --recursive
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- python -m pip install -U pip
- pip install wheel
# # Fix MSVC builds for 64-bit Python. See:
# # http://stackoverflow.com/questions/32091593/cannot-install-windows-sdk-7-1-on-windows-10
# - echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64/vcvars64.bat"
# Check that we have the expected version and architecture for Python
- python --version
- python -c "import struct; print(struct.calcsize('P') * 8)"
# Install zlib
- mkdir zlib
- curl -L -o zlib.zip http://www.winimage.com/zLibDll/zlib123dll.zip
- curl -L -o zlib-src.zip http://www.winimage.com/zLibDll/zlib123.zip
- 7z x zlib.zip -ozlib
- 7z x zlib-src.zip -ozlib\include
- SET ZLIB_ROOT=%cd%\zlib
- del /Q zlib.zip
- del /Q zlib-src.zip
before_build:
- if %PYTHON%==C:\Python35 set generator=Visual Studio 14
- if %PYTHON%==C:\Python35 set vcplatform=Win32
- if %PYTHON%==C:\Python35-x64 set generator=Visual Studio 14 Win64
- if %PYTHON%==C:\Python35-x64 set vcplatform=x64
- if %PYTHON%==C:\Python36 set generator=Visual Studio 14
- if %PYTHON%==C:\Python36 set vcplatform=Win32
- if %PYTHON%==C:\Python36-x64 set generator=Visual Studio 14 Win64
- if %PYTHON%==C:\Python36-x64 set vcplatform=x64
- if %PYTHON%==C:\Python27 set MINGW=%MINGW_32%
- if %PYTHON%==C:\Python27-x64 set MINGW=%MINGW_64%
- if %PYTHON%==C:\Python34 set MINGW=%MINGW_32%
- if %PYTHON%==C:\Python34-x64 set MINGW=%MINGW_64%
- if %PYTHON_VERSION%==2.7 set generator=MSYS Makefiles
- if %PYTHON_VERSION%==2.7 set PATH=%MINGW%;%PATH%
- if %PYTHON_VERSION%==2.7 echo [build] > %PYTHON%\Lib\distutils\distutils.cfg
- if %PYTHON_VERSION%==2.7 echo.compiler = mingw32 >> %PYTHON%\Lib\distutils\distutils.cfg
- if %PYTHON_VERSION%==3.4 set generator=MSYS Makefiles
- if %PYTHON_VERSION%==3.4 set PATH=%MINGW%;%PATH%
- if %PYTHON_VERSION%==3.4 echo [build] > %PYTHON%\Lib\distutils\distutils.cfg
- if %PYTHON_VERSION%==3.4 echo.compiler = mingw32 >> %PYTHON%\Lib\distutils\distutils.cfg
build_script:
- CALL appveyor.bat
test_script:
# create test env
- virtualenv --python %PYTHON%\Python.exe test_env
- test_env\Scripts\activate.bat
- where python
- pip install %PB_TEST_DEP%
# install from wheel
- pip install --pre --no-index --find-links %REPO_DIR%\python\dist\ %PACKAGE_NAME%
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- python --version
- python -c "from google.protobuf.pyext import _message;"
- cd ..
artifacts:
- path: "%REPO_DIR%\\python\\dist\\*"
on_success:
# # Upload the generated wheel package to Rackspace
# # On Windows, Apache Libcloud cannot find a standard CA cert bundle so we
# # disable the ssl checks.
# - pip install wheelhouse-uploader
# - "python -m wheelhouse_uploader upload
# --no-ssl-check --local-folder=%REPO_DIR%\\dist --no-update-index wheels"
|