build_artifacts.bat 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. REM Move scripts to root
  2. set REPO_DIR_STAGE=%cd%\github\protobuf-stage
  3. xcopy /S github\protobuf "%REPO_DIR_STAGE%\"
  4. cd github\protobuf
  5. copy kokoro\release\python\windows\build_single_artifact.bat build_single_artifact.bat
  6. REM Set environment variables
  7. set PACKAGE_NAME=protobuf
  8. set REPO_DIR=protobuf
  9. set BUILD_DLL=OFF
  10. set UNICODE=ON
  11. set PB_TEST_DEP="six==1.9"
  12. set OTHER_TEST_DEP="setuptools==38.5.1"
  13. set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
  14. REM Fetch multibuild
  15. git clone https://github.com/matthew-brett/multibuild.git
  16. REM Install zlib
  17. mkdir zlib
  18. curl -L -o zlib.zip http://www.winimage.com/zLibDll/zlib123dll.zip
  19. curl -L -o zlib-src.zip http://www.winimage.com/zLibDll/zlib123.zip
  20. 7z x zlib.zip -ozlib
  21. 7z x zlib-src.zip -ozlib\include
  22. SET ZLIB_ROOT=%cd%\zlib
  23. del /Q zlib.zip
  24. del /Q zlib-src.zip
  25. REM Create directory for artifacts
  26. SET ARTIFACT_DIR=%cd%\artifacts
  27. mkdir %ARTIFACT_DIR%
  28. REM Build wheel
  29. SET PYTHON=C:\python35_32bit
  30. SET PYTHON_VERSION=3.5
  31. SET PYTHON_ARCH=32
  32. CALL build_single_artifact.bat || goto :error
  33. SET PYTHON=C:\python35
  34. SET PYTHON_VERSION=3.5
  35. SET PYTHON_ARCH=64
  36. CALL build_single_artifact.bat || goto :error
  37. SET PYTHON=C:\python36_32bit
  38. SET PYTHON_VERSION=3.6
  39. SET PYTHON_ARCH=32
  40. CALL build_single_artifact.bat || goto :error
  41. SET PYTHON=C:\python36
  42. SET PYTHON_VERSION=3.6
  43. SET PYTHON_ARCH=64
  44. CALL build_single_artifact.bat || goto :error
  45. SET PYTHON=C:\python37_32bit
  46. SET PYTHON_VERSION=3.7
  47. SET PYTHON_ARCH=32
  48. CALL build_single_artifact.bat || goto :error
  49. SET PYTHON=C:\python37
  50. SET PYTHON_VERSION=3.7
  51. SET PYTHON_ARCH=64
  52. CALL build_single_artifact.bat || goto :error
  53. SET PYTHON=C:\python38_32bit
  54. SET PYTHON_VERSION=3.8
  55. SET PYTHON_ARCH=32
  56. CALL build_single_artifact.bat || goto :error
  57. SET PYTHON=C:\python38
  58. SET PYTHON_VERSION=3.8
  59. SET PYTHON_ARCH=64
  60. CALL build_single_artifact.bat || goto :error
  61. goto :EOF
  62. :error
  63. exit /b %errorlevel%