2018-11-05 05:24:46 +08:00
|
|
|
@echo on
|
|
|
|
SET "SRCROOT=%cd%"
|
|
|
|
SET "PREVPATH=%PATH%"
|
|
|
|
SET "PREVMSYSEM=%MSYSTEM%"
|
|
|
|
|
|
|
|
set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
|
|
|
|
SET "MSYSTEM=MINGW64"
|
|
|
|
bash -lc "cd ${SRCROOT} && ci/azure/windows_install" || exit /b
|
|
|
|
SET "PATH=%PREVPATH%"
|
|
|
|
SET "MSYSTEM=%PREVMSYSTEM%"
|
|
|
|
|
|
|
|
SET "ZIGBUILDDIR=%SRCROOT%\build"
|
2019-09-23 07:47:07 +08:00
|
|
|
SET "ZIGINSTALLDIR=%ZIGBUILDDIR%\dist"
|
2019-10-17 07:08:41 +08:00
|
|
|
SET "ZIGPREFIXPATH=%SRCROOT%\llvm+clang-9.0.0-win64-msvc-mt"
|
2018-11-05 05:24:46 +08:00
|
|
|
|
2019-09-23 03:32:52 +08:00
|
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
2018-11-05 05:24:46 +08:00
|
|
|
|
2019-11-04 07:58:54 +08:00
|
|
|
REM Make the `zig version` number consistent.
|
|
|
|
REM This will affect the cmake command below.
|
|
|
|
git.exe config core.abbrev 9
|
|
|
|
|
2018-11-05 05:24:46 +08:00
|
|
|
mkdir %ZIGBUILDDIR%
|
|
|
|
cd %ZIGBUILDDIR%
|
2019-10-17 09:16:06 +08:00
|
|
|
cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b
|
2019-10-17 07:08:41 +08:00
|
|
|
msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b
|
2018-11-05 05:24:46 +08:00
|
|
|
|
2019-09-22 11:55:56 +08:00
|
|
|
"%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b
|
2018-11-05 05:24:46 +08:00
|
|
|
|
|
|
|
set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
|
|
|
|
SET "MSYSTEM=MINGW64"
|
|
|
|
bash -lc "cd ${SRCROOT} && ci/azure/windows_upload" || exit /b
|