From d320e245bb071c4cb40e08bc889ebe4e39d86b97 Mon Sep 17 00:00:00 2001 From: Rintaro Kuroiwa Date: Mon, 17 Apr 2017 12:21:04 -0700 Subject: [PATCH] Move config files to match job configs - The env variables that change the build configs are now defined in the config file. Change-Id: Ia9428667bfd00f640a416ca2c31f155a9e9baef9 --- kokoro/windows/{x64 => }/build.bat | 18 +++++++++++------- kokoro/windows/x64/continuous.cfg | 1 - kokoro/windows/x64/debug.cfg | 11 +++++++++++ kokoro/windows/x64/presubmit.cfg | 1 - kokoro/windows/x64/release.cfg | 11 +++++++++++ kokoro/windows/x86/debug.cfg | 11 +++++++++++ kokoro/windows/x86/release.cfg | 11 +++++++++++ 7 files changed, 55 insertions(+), 9 deletions(-) rename kokoro/windows/{x64 => }/build.bat (67%) delete mode 100644 kokoro/windows/x64/continuous.cfg create mode 100644 kokoro/windows/x64/debug.cfg delete mode 100644 kokoro/windows/x64/presubmit.cfg create mode 100644 kokoro/windows/x64/release.cfg create mode 100644 kokoro/windows/x86/debug.cfg create mode 100644 kokoro/windows/x86/release.cfg diff --git a/kokoro/windows/x64/build.bat b/kokoro/windows/build.bat similarity index 67% rename from kokoro/windows/x64/build.bat rename to kokoro/windows/build.bat index 6ed3a2e226..02c26d9600 100644 --- a/kokoro/windows/x64/build.bat +++ b/kokoro/windows/build.bat @@ -1,10 +1,14 @@ :: Copyright 2017 Google Inc. All Rights Reserved. -set OUTPUT_DIRECTORY=Release_x64 -set GYP_DEFINES=target_arch=x64 - set ROOTDIR=%cd% set PACKAGERDIR=%ROOTDIR%\git\src +set GYP_DEFINES="target_arch=%PLATFORM%" +if "%PLATFORM%"=="x64" ( + set OUTPUT_DIRECTORY="out\%CONFIGURATION%_x64" +) else ( + set OUTPUT_DIRECTORY="out\%CONFIGURATION%" +) + :: TODO(rkuroiwa): Put this in a batch script and source it, so that this :: doesn't need to be copied for all configurations. git clone "https://chromium.googlesource.com/chromium/tools/depot_tools.git" depot_tools @@ -23,8 +27,8 @@ call %DEPOTTOOLSDIR%\gclient sync echo on cd src -%DEPOTTOOLSDIR%\ninja -C "out\%OUTPUT_DIRECTORY%" -k 100 +%DEPOTTOOLSDIR%\ninja -C "%OUTPUT_DIRECTORY%" -k 100 -copy "out\%OUTPUT_DIRECTORY%\packager.exe" packager-win.exe -for %%f in ("out\%OUTPUT_DIRECTORY%\*_*test.exe") do (%%f || exit /b 666) -python "out\%OUTPUT_DIRECTORY%\packager_test.py" -v +copy "%OUTPUT_DIRECTORY%\packager.exe" packager-win.exe +for %%f in ("%OUTPUT_DIRECTORY%\*_*test.exe") do (%%f || exit /b 666) +python "%OUTPUT_DIRECTORY%\packager_test.py" -v diff --git a/kokoro/windows/x64/continuous.cfg b/kokoro/windows/x64/continuous.cfg deleted file mode 100644 index 36b8c2beb6..0000000000 --- a/kokoro/windows/x64/continuous.cfg +++ /dev/null @@ -1 +0,0 @@ -build_file: "src/kokoro/windows/x64/build.bat" diff --git a/kokoro/windows/x64/debug.cfg b/kokoro/windows/x64/debug.cfg new file mode 100644 index 0000000000..beee9df83e --- /dev/null +++ b/kokoro/windows/x64/debug.cfg @@ -0,0 +1,11 @@ +build_file: "src/kokoro/windows/build.bat" + +env_vars { + key: "PLATFORM" + value: "x64" +} + +env_vars { + key: "CONFIGURATION" + value: "Debug" +} diff --git a/kokoro/windows/x64/presubmit.cfg b/kokoro/windows/x64/presubmit.cfg deleted file mode 100644 index 36b8c2beb6..0000000000 --- a/kokoro/windows/x64/presubmit.cfg +++ /dev/null @@ -1 +0,0 @@ -build_file: "src/kokoro/windows/x64/build.bat" diff --git a/kokoro/windows/x64/release.cfg b/kokoro/windows/x64/release.cfg new file mode 100644 index 0000000000..3ffd4ce7cf --- /dev/null +++ b/kokoro/windows/x64/release.cfg @@ -0,0 +1,11 @@ +build_file: "src/kokoro/windows/build.bat" + +env_vars { + key: "PLATFORM" + value: "x64" +} + +env_vars { + key: "CONFIGURATION" + value: "Release" +} diff --git a/kokoro/windows/x86/debug.cfg b/kokoro/windows/x86/debug.cfg new file mode 100644 index 0000000000..adc74547bb --- /dev/null +++ b/kokoro/windows/x86/debug.cfg @@ -0,0 +1,11 @@ +build_file: "src/kokoro/windows/build.bat" + +env_vars { + key: "PLATFORM" + value: "x86" +} + +env_vars { + key: "CONFIGURATION" + value: "Debug" +} diff --git a/kokoro/windows/x86/release.cfg b/kokoro/windows/x86/release.cfg new file mode 100644 index 0000000000..eaf691b252 --- /dev/null +++ b/kokoro/windows/x86/release.cfg @@ -0,0 +1,11 @@ +build_file: "src/kokoro/windows/build.bat" + +env_vars { + key: "PLATFORM" + value: "x86" +} + +env_vars { + key: "CONFIGURATION" + value: "Release" +}