build_artifacts.bat 1.62 KB
Newer Older
1
REM Move scripts to root
2 3
set REPO_DIR_STAGE=%cd%\github\protobuf-stage
xcopy /S  github\protobuf "%REPO_DIR_STAGE%\"
4 5 6 7 8
cd github\protobuf
copy kokoro\release\python\windows\build_single_artifact.bat build_single_artifact.bat

REM Set environment variables
set PACKAGE_NAME=protobuf
9
set REPO_DIR=protobuf
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
set BUILD_DLL=OFF
set UNICODE=ON
set PB_TEST_DEP="six==1.9"
set OTHER_TEST_DEP="setuptools==38.5.1"
set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%

REM Fetch multibuild
git clone https://github.com/matthew-brett/multibuild.git

REM 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

REM Create directory for artifacts
SET ARTIFACT_DIR=%cd%\artifacts
mkdir %ARTIFACT_DIR%

REM Build wheel

SET PYTHON=C:\python35_32bit
SET PYTHON_VERSION=3.5
SET PYTHON_ARCH=32
38
CALL build_single_artifact.bat || goto :error
39 40 41 42

SET PYTHON=C:\python35
SET PYTHON_VERSION=3.5
SET PYTHON_ARCH=64
43
CALL build_single_artifact.bat || goto :error
44 45 46 47

SET PYTHON=C:\python36_32bit
SET PYTHON_VERSION=3.6
SET PYTHON_ARCH=32
48
CALL build_single_artifact.bat || goto :error
49 50 51 52

SET PYTHON=C:\python36
SET PYTHON_VERSION=3.6
SET PYTHON_ARCH=64
53
CALL build_single_artifact.bat || goto :error
54 55 56 57

SET PYTHON=C:\python37_32bit
SET PYTHON_VERSION=3.7
SET PYTHON_ARCH=32
58
CALL build_single_artifact.bat || goto :error
59 60 61 62

SET PYTHON=C:\python37
SET PYTHON_VERSION=3.7
SET PYTHON_ARCH=64
63 64 65 66 67 68
CALL build_single_artifact.bat || goto :error

goto :EOF

:error
exit /b %errorlevel%