From dda8f547e73087670396bd7fcaf19f23034c35fd Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Mon, 19 Jun 2017 10:47:23 -0700 Subject: [PATCH] Add Windows build and config files for Kokoro (#3096) --- buildscripts/kokoro/windows.bat | 42 +++++++++++++++++++++++++++++++++ buildscripts/kokoro/windows.cfg | 11 +++++++++ 2 files changed, 53 insertions(+) create mode 100644 buildscripts/kokoro/windows.bat create mode 100644 buildscripts/kokoro/windows.cfg diff --git a/buildscripts/kokoro/windows.bat b/buildscripts/kokoro/windows.bat new file mode 100644 index 0000000000..6c50818e7f --- /dev/null +++ b/buildscripts/kokoro/windows.bat @@ -0,0 +1,42 @@ +@rem ########################################################################## +@rem +@rem Script to set up Kokoro worker and run Windows tests +@rem +@rem ########################################################################## + +@rem Enter repo root +cd /d %~dp0\..\.. + +set WORKSPACE=T:\src\github\grpc-java +set ESCWORKSPACE=%WORKSPACE:\=\\% + +mkdir grpc-java-helper + +@rem Install 7za +@rem TODO(mattkwong): After Windows tests are no longer running on Jenkins, 7za +@rem doesn't need to be installed and make_dependencies.bat can use unzip instead +wget http://www.7-zip.org/a/7za920.zip +unzip 7za920.zip +mv 7za.exe grpc-java-helper + +cd grpc-java-helper + +call "%VS120COMNTOOLS%\vsvars32.bat" +call "%WORKSPACE%\buildscripts\make_dependencies.bat" + +cd "%WORKSPACE%" + +echo targetArch=x86_32> gradle.properties +echo failOnWarnings=true>> gradle.properties +echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-%PROTOBUF_VER%\\cmake\\build\\Release>> gradle.properties +echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-%PROTOBUF_VER%\\cmake\\build\\include>> gradle.properties + +cmd.exe /C "%WORKSPACE%\gradlew.bat build" + +@rem Rename test results .xml files to format parsable by Kokoro +for /r %%F in (TEST-*.xml) do ( + mkdir "%%~dpnF" + move "%%F" "%%~dpnF\sponge_log.xml" +) + +exit %%ERRORLEVEL%% diff --git a/buildscripts/kokoro/windows.cfg b/buildscripts/kokoro/windows.cfg new file mode 100644 index 0000000000..d800ac0799 --- /dev/null +++ b/buildscripts/kokoro/windows.cfg @@ -0,0 +1,11 @@ +# Config file for internal CI + +# Location of the continuous shell script in repository. +build_file: "grpc-java/buildscripts/kokoro/windows.bat" +timeout_mins: 45 +action { + define_artifacts { + regex: "github/grpc-java/all/build/docs/javadoc/**", + regex: "**/build/test-results/**/*.xml" + } +}