mirror of https://github.com/grpc/grpc-node.git
Build Windows x86 and x64 separately using a matrix
This commit is contained in:
parent
9b82abae06
commit
4c6847fc9f
|
|
@ -40,6 +40,11 @@ jobs:
|
||||||
windows_build:
|
windows_build:
|
||||||
name: Windows grpc-tools Build
|
name: Windows grpc-tools Build
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [ia32, x64]
|
||||||
|
env:
|
||||||
|
ARCH: ${{matrix.arch}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -49,7 +54,7 @@ jobs:
|
||||||
shell: cmd
|
shell: cmd
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: grpc-tools_windows
|
name: grpc-tools_windows_${{matrix.arch}}
|
||||||
path: artifacts/
|
path: artifacts/
|
||||||
combine_artifacts:
|
combine_artifacts:
|
||||||
name: Combine grpc-tools artifacts
|
name: Combine grpc-tools artifacts
|
||||||
|
|
|
||||||
|
|
@ -49,29 +49,27 @@ cd $Base
|
||||||
|
|
||||||
Set-PSDebug -trace 2
|
Set-PSDebug -trace 2
|
||||||
|
|
||||||
$ArchList = "ia32","x64"
|
$Arch = $Env:ARCH
|
||||||
|
|
||||||
foreach ($Arch in $ArchList) {
|
if ($Arch -eq "x64") {
|
||||||
if ($Arch -eq "x64") {
|
$ArchName = "x64"
|
||||||
$ArchName = "x64"
|
} else {
|
||||||
} else {
|
$ArchName = "Win32"
|
||||||
$ArchName = "Win32"
|
}
|
||||||
}
|
|
||||||
|
|
||||||
& cmake.exe . -A $ArchName
|
& cmake.exe . -A $ArchName
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
throw "cmake failed"
|
throw "cmake failed"
|
||||||
}
|
}
|
||||||
& cmake.exe --build .
|
& cmake.exe --build .
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
throw "cmake build failed"
|
throw "cmake build failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
Copy-Item ($ProtobufBase + "/Debug/protoc.exe") -Destination ($Base + "/build/bin/protoc.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")
|
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 + "/build") -Format Tar -ArchiveFileName ($Base + "/Archive.tar")
|
||||||
Compress-7Zip -Path ($Base + "/Archive.tar") -Format GZip -ArchiveFileName ($OutDir + "/win32-" + $Arch + ".tar.gz")
|
Compress-7Zip -Path ($Base + "/Archive.tar") -Format GZip -ArchiveFileName ($OutDir + "/win32-" + $Arch + ".tar.gz")
|
||||||
|
|
||||||
& git clean -xdf .
|
& git clean -xdf .
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue