build_artifacts.bat 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 OTHER_TEST_DEP="setuptools==38.5.1"
  12. set OLD_PATH=C:\Program Files (x86)\MSBuild\14.0\bin\;%PATH%
  13. REM Fetch multibuild
  14. git clone https://github.com/matthew-brett/multibuild.git
  15. REM Install zlib
  16. mkdir zlib
  17. curl -L -o zlib.zip http://www.winimage.com/zLibDll/zlib123dll.zip
  18. curl -L -o zlib-src.zip http://www.winimage.com/zLibDll/zlib123.zip
  19. 7z x zlib.zip -ozlib
  20. 7z x zlib-src.zip -ozlib\include
  21. SET ZLIB_ROOT=%cd%\zlib
  22. del /Q zlib.zip
  23. del /Q zlib-src.zip
  24. REM Create directory for artifacts
  25. SET ARTIFACT_DIR=%cd%\artifacts
  26. mkdir %ARTIFACT_DIR%
  27. REM Build wheel
  28. SET PYTHON=C:\python36_32bit
  29. SET PYTHON_VERSION=3.6
  30. SET PYTHON_ARCH=32
  31. CALL build_single_artifact.bat || goto :error
  32. SET PYTHON=C:\python36
  33. SET PYTHON_VERSION=3.6
  34. SET PYTHON_ARCH=64
  35. CALL build_single_artifact.bat || goto :error
  36. SET PYTHON=C:\python37_32bit
  37. SET PYTHON_VERSION=3.7
  38. SET PYTHON_ARCH=32
  39. CALL build_single_artifact.bat || goto :error
  40. SET PYTHON=C:\python37
  41. SET PYTHON_VERSION=3.7
  42. SET PYTHON_ARCH=64
  43. CALL build_single_artifact.bat || goto :error
  44. powershell -File kokoro/release/python/windows/install_python_interpreters.ps1
  45. SET PYTHON=C:\python38_32bit
  46. SET PYTHON_VERSION=3.8
  47. SET PYTHON_ARCH=32
  48. CALL build_single_artifact.bat || goto :error
  49. SET PYTHON=C:\python38
  50. SET PYTHON_VERSION=3.8
  51. SET PYTHON_ARCH=64
  52. CALL build_single_artifact.bat || goto :error
  53. SET PYTHON=C:\python39_32bit
  54. SET PYTHON_VERSION=3.9
  55. SET PYTHON_ARCH=32
  56. CALL build_single_artifact.bat || goto :error
  57. SET PYTHON=C:\python39
  58. SET PYTHON_VERSION=3.9
  59. SET PYTHON_ARCH=64
  60. CALL build_single_artifact.bat || goto :error
  61. SET PYTHON=C:\python310_32bit
  62. SET PYTHON_VERSION=3.10
  63. SET PYTHON_ARCH=32
  64. CALL build_single_artifact.bat || goto :error
  65. SET PYTHON=C:\python310
  66. SET PYTHON_VERSION=3.10
  67. SET PYTHON_ARCH=64
  68. CALL build_single_artifact.bat || goto :error
  69. goto :EOF
  70. :error
  71. exit /b %errorlevel%