1#!/bin/bash 2set -eux 3 4cd git/re2 5 6case "${KOKORO_JOB_NAME}" in 7 */windows-*) 8 export PATH+=':/cygdrive/c/Program Files/CMake/bin' 9 # Pin to Visual Studio 2015, which is the minimum that we support. 10 CMAKE_G_A_FLAGS=('-G' 'Visual Studio 14 2015' '-A' 'x64') 11 ;; 12 *) 13 CMAKE_G_A_FLAGS=() 14 # Work around a bug in older versions of bash. :/ 15 set +u 16 ;; 17esac 18 19cmake -D CMAKE_BUILD_TYPE=Debug "${CMAKE_G_A_FLAGS[@]}" . 20cmake --build . --config Debug --clean-first 21ctest -C Debug --output-on-failure -E 'dfa|exhaustive|random' 22 23cmake -D CMAKE_BUILD_TYPE=Release "${CMAKE_G_A_FLAGS[@]}" . 24cmake --build . --config Release --clean-first 25ctest -C Release --output-on-failure -E 'dfa|exhaustive|random' 26 27exit 0 28