Add Kokoro presubmit scripts
This commit is contained in:
19
kokoro/windows/msvc-14.14-x64/cmake/presubmit.cfg
Normal file
19
kokoro/windows/msvc-14.14-x64/cmake/presubmit.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
# Location of the continuous bash script in Git.
|
||||
build_file: "cppdap/kokoro/windows/presubmit.bat"
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_SYSTEM"
|
||||
value: "cmake"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_GENERATOR"
|
||||
value: "Visual Studio 15 2017 Win64"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_TARGET_ARCH"
|
||||
value: "x64"
|
||||
}
|
||||
19
kokoro/windows/msvc-14.14-x86/cmake/presubmit.cfg
Normal file
19
kokoro/windows/msvc-14.14-x86/cmake/presubmit.cfg
Normal file
@@ -0,0 +1,19 @@
|
||||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
# Location of the continuous bash script in Git.
|
||||
build_file: "cppdap/kokoro/windows/presubmit.bat"
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_SYSTEM"
|
||||
value: "cmake"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_GENERATOR"
|
||||
value: "Visual Studio 15 2017"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_TARGET_ARCH"
|
||||
value: "x86"
|
||||
}
|
||||
32
kokoro/windows/presubmit.bat
Normal file
32
kokoro/windows/presubmit.bat
Normal file
@@ -0,0 +1,32 @@
|
||||
@echo on
|
||||
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
SET BUILD_ROOT=%cd%
|
||||
SET PATH=C:\python36;C:\Program Files\cmake\bin;%PATH%
|
||||
SET SRC=%cd%\github\cppdap
|
||||
|
||||
cd %SRC%
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
|
||||
git submodule update --init
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
|
||||
SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild"
|
||||
SET CONFIG=Release
|
||||
|
||||
mkdir %SRC%\build
|
||||
cd %SRC%\build
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
|
||||
IF /I "%BUILD_SYSTEM%"=="cmake" (
|
||||
cmake .. -G "%BUILD_GENERATOR%" "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1"
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
%MSBUILD% /p:Configuration=%CONFIG% cppdap.sln
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
Release\cppdap-unittests.exe
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
) ELSE (
|
||||
echo "Unknown build system: %BUILD_SYSTEM%"
|
||||
exit /b 1
|
||||
)
|
||||
Reference in New Issue
Block a user