ci: use goma for windows and linux builds (#21868)

* ci: use goma for windows and linux builds
This commit is contained in:
John Kleinschmidt 2020-01-23 09:47:38 -08:00 committed by GitHub
parent 7c0a9f29ca
commit dc2fcff01c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 11 deletions

11
script/start-goma.ps1 Executable file
View file

@ -0,0 +1,11 @@
param([string]$gomaDir=$PWD)
$cmdPath = Join-Path -Path $gomaDir -ChildPath "goma_ctl.py"
Start-Process -FilePath cmd -ArgumentList "/C", "python", "$cmdPath", "ensure_start"
$env:GLOG_logtostderr = "true"
$timedOut = $false; $waitTime = 0; $waitIncrement = 5; $timeout=120;
Do { sleep $waitIncrement; $timedOut = (($waitTime+=$waitIncrement) -gt $timeout); iex "$gomaDir\gomacc.exe port 2" > $null; } Until(($LASTEXITCODE -eq 0) -or $timedOut)
if ($timedOut) {
write-error 'Timed out waiting for goma to start'; exit 1;
} else {
Write-Output "Successfully started goma!"
}