mirror of https://github.com/grpc/grpc-node.git
Merge pull request #732 from murgatroid99/grpc-tools_build_fixes2
grpc-tools build script fixes part 2
This commit is contained in:
commit
027d01ae5e
|
|
@ -18,6 +18,9 @@ add_executable(grpc_node_plugin
|
|||
src/node_plugin.cc
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
add_definitions(/MTd)
|
||||
endif (MSVC)
|
||||
|
||||
target_include_directories(grpc_node_plugin
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force
|
||||
Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201
|
||||
Install-Module -Force -Name 7Zip4Powershell
|
||||
|
||||
$env:Path += ";C:\Program Files\CMake\bin"
|
||||
|
||||
function MkDir-p($Path) {
|
||||
$FullPath = "\\?\" + $Path
|
||||
if (-not (Test-Path -Path $FullPath)) {
|
||||
|
|
@ -28,16 +32,23 @@ foreach ($Arch in $ArchList) {
|
|||
} else {
|
||||
$Generator = "Visual Studio 14 2015"
|
||||
}
|
||||
Remove-Item ($Base + "/build/bin/protoc.exe")
|
||||
Remove-Item ($Base + "/build/bin/grpc_node_plugin.exe")
|
||||
Remove-Item ($Base + "CMakeCache.txt")
|
||||
|
||||
Invoke-Expression "cmake ."
|
||||
Invoke-Expression "cmake --build ."
|
||||
& cmake.exe .
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "cmake failed"
|
||||
}
|
||||
& cmake.exe --build .
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "cmake build failed"
|
||||
}
|
||||
|
||||
Copy-Item ($ProtobufBase + "/protoc.exe") -Destination ($Base + "/build/bin/protoc.exe")
|
||||
Copy-Item ($Base + "/grpc_node_plugin.exe") -Destination ($Base + "/build/bin/grpc_node_plugin.exe")
|
||||
Copy-Item ($ProtobufBase + "/Debug/protoc.exe") -Destination ($Base + "/build/bin/protoc.exe")
|
||||
Copy-Item ($Base + "/Debug/grpc_node_plugin.exe") -Destination ($Base + "/build/bin/grpc_node_plugin.exe")
|
||||
|
||||
Compress-7Zip -Path ($Base + "/build") -Format Tar -ArchiveFileName ($Base + "/Archive.tar")
|
||||
Compress-7Zip -Path ($Base + "/Archive.tar") -Format GZip -ArchiveFileName ($OutDir + "/windows-x64.tar.gz")
|
||||
|
||||
Remove-Item ($Base + "/build/bin/protoc.exe")
|
||||
Remove-Item ($Base + "/build/bin/grpc_node_plugin.exe")
|
||||
Remove-Item ($Base + "/CMakeCache.txt")
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
cd /d %~dp0
|
||||
cd ..
|
||||
|
||||
call ./tools/release/kokoro-nodejs.bat || goto :error
|
||||
call ./tools/release/kokoro-grpc-tools.bat || goto :error
|
||||
call ./tools/release/kokoro-nodejs.bat || goto :error
|
||||
|
||||
goto :EOF
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ cd ../..
|
|||
|
||||
git submodule update --init --recursive
|
||||
|
||||
@rem make sure msys binaries are preferred over cygwin binaries
|
||||
set PATH=C:\tools\msys64\usr\bin;%PATH%
|
||||
set ARTIFACTS_OUT=%cd%/artifacts
|
||||
powershell -File ./packages/grpc-tools/build_binaries.ps1 || goto :error
|
||||
goto :EOF
|
||||
|
|
|
|||
|
|
@ -30,12 +30,11 @@ cd ..\..
|
|||
git submodule update --init
|
||||
git submodule foreach --recursive git submodule update --init
|
||||
|
||||
set ARTIFACTS_OUT=artifacts
|
||||
set ARTIFACTS_OUT=%cd%\artifacts
|
||||
cd packages\grpc-native-core
|
||||
call tools\run_tests\artifacts\build_artifact_node.bat || goto :error
|
||||
cd ..\..
|
||||
|
||||
move packages\grpc-native-core\artifacts .
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
|
|
|
|||
Loading…
Reference in New Issue