|
| 1 | +SETLOCAL ENABLEDELAYEDEXPANSION |
| 2 | + |
| 3 | +SET BAZEL_EXE=%KOKORO_GFILE_DIR%\bazel-5.1.1-windows-x86_64.exe |
| 4 | + |
| 5 | +SET PATH=C:\Python37;%PATH% |
| 6 | +SET BAZEL_PYTHON=C:\python37\python.exe |
| 7 | +SET BAZEL_SH=C:\tools\msys64\usr\bin\bash.exe |
| 8 | +SET CMAKE_BIN="C:\Program Files\CMake\bin\cmake.exe" |
| 9 | +SET CTEST_BIN="C:\Program Files\CMake\bin\ctest.exe" |
| 10 | +SET CTEST_OUTPUT_ON_FAILURE=1 |
| 11 | + |
| 12 | +IF EXIST git\googletest ( |
| 13 | + CD git\googletest |
| 14 | +) ELSE IF EXIST github\googletest ( |
| 15 | + CD github\googletest |
| 16 | +) |
| 17 | + |
| 18 | +IF %errorlevel% neq 0 EXIT /B 1 |
| 19 | + |
| 20 | +:: ---------------------------------------------------------------------------- |
| 21 | +:: CMake Visual Studio 15 2017 Win64 |
| 22 | +MKDIR cmake_msvc2017 |
| 23 | +CD cmake_msvc2017 |
| 24 | + |
| 25 | +%CMAKE_BIN% .. ^ |
| 26 | + -G "Visual Studio 15 2017 Win64" ^ |
| 27 | + -DPYTHON_EXECUTABLE:FILEPATH=c:\python37\python.exe ^ |
| 28 | + -DPYTHON_INCLUDE_DIR:PATH=c:\python37\include ^ |
| 29 | + -DPYTHON_LIBRARY:FILEPATH=c:\python37\lib\site-packages\pip ^ |
| 30 | + -Dgtest_build_samples=ON ^ |
| 31 | + -Dgtest_build_tests=ON ^ |
| 32 | + -Dgmock_build_tests=ON |
| 33 | +IF %errorlevel% neq 0 EXIT /B 1 |
| 34 | + |
| 35 | +%CMAKE_BIN% --build . --target ALL_BUILD --config Debug -- -maxcpucount |
| 36 | +IF %errorlevel% neq 0 EXIT /B 1 |
| 37 | + |
| 38 | +%CTEST_BIN% -C Debug --timeout 600 |
| 39 | +IF %errorlevel% neq 0 EXIT /B 1 |
| 40 | + |
| 41 | +CD .. |
| 42 | +RMDIR /S /Q cmake_msvc2017 |
| 43 | + |
| 44 | +:: ---------------------------------------------------------------------------- |
| 45 | +:: Bazel Visual Studio 15 2017 Win64 |
| 46 | + |
| 47 | +SET BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC |
| 48 | +%BAZEL_EXE% test ... ^ |
| 49 | + --compilation_mode=dbg ^ |
| 50 | + --copt=/std:c++14 ^ |
| 51 | + --copt=/WX ^ |
| 52 | + --features=external_include_paths ^ |
| 53 | + --keep_going ^ |
| 54 | + --test_output=errors ^ |
| 55 | + --test_tag_filters=-no_test_msvc2017 |
| 56 | +IF %errorlevel% neq 0 EXIT /B 1 |
0 commit comments