Use more parallelism to windows portability tests (#28179)

* Use more parallelism to windows portability tests

* Added /MP

* Changed it to gRPC_BUILD_MSVC_MP_COUNT
pull/28203/head^2
Esun Kim 3 years ago committed by GitHub
parent 5088014987
commit 63d48ee8d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      CMakeLists.txt
  2. 7
      templates/CMakeLists.txt.template
  3. 2
      tools/internal_ci/windows/grpc_portability.cfg
  4. 2
      tools/internal_ci/windows/grpc_portability_build_only.cfg
  5. 6
      tools/run_tests/run_tests.py

7
CMakeLists.txt generated

@ -42,6 +42,7 @@ set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries
set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers")
set(gRPC_INSTALL_CMAKEDIR "lib/cmake/${PACKAGE_NAME}" CACHE STRING "Installation directory for cmake config files")
set(gRPC_INSTALL_SHAREDIR "share/grpc" CACHE STRING "Installation directory for root certificates")
set(gRPC_BUILD_MSVC_MP_COUNT 0 CACHE INTERNAL "The maximum number of processes for MSVC /MP option")
# Options
option(gRPC_BUILD_TESTS "Build tests" OFF)
@ -220,6 +221,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
if(MSVC)
include(cmake/msvc_static_runtime.cmake)
add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
# Set /MP option
if (gRPC_BUILD_MSVC_MP_COUNT GREATER 0)
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /MP${gRPC_BUILD_MSVC_MP_COUNT}")
elseif (gRPC_BUILD_MSVC_MP_COUNT LESS 0)
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /MP")
endif()
# needed to compile protobuf
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4065 /wd4506")
# TODO(jtattermusch): revisit warnings that were silenced as part of upgrade to protobuf3.6.0

@ -164,6 +164,7 @@
set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers")
set(gRPC_INSTALL_CMAKEDIR "lib/cmake/<%text>${PACKAGE_NAME}</%text>" CACHE STRING "Installation directory for cmake config files")
set(gRPC_INSTALL_SHAREDIR "share/grpc" CACHE STRING "Installation directory for root certificates")
set(gRPC_BUILD_MSVC_MP_COUNT 0 CACHE INTERNAL "The maximum number of processes for MSVC /MP option")
# Options
option(gRPC_BUILD_TESTS "Build tests" OFF)
@ -282,6 +283,12 @@
if(MSVC)
include(cmake/msvc_static_runtime.cmake)
add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)
# Set /MP option
if (gRPC_BUILD_MSVC_MP_COUNT GREATER 0)
set(_gRPC_C_CXX_FLAGS "<%text>${_gRPC_C_CXX_FLAGS} /MP${gRPC_BUILD_MSVC_MP_COUNT}</%text>")
elseif (gRPC_BUILD_MSVC_MP_COUNT LESS 0)
set(_gRPC_C_CXX_FLAGS "<%text>${_gRPC_C_CXX_FLAGS}</%text> /MP")
endif()
# needed to compile protobuf
set(_gRPC_C_CXX_FLAGS "<%text>${_gRPC_C_CXX_FLAGS}</%text> /wd4065 /wd4506")
# TODO(jtattermusch): revisit warnings that were silenced as part of upgrade to protobuf3.6.0

@ -26,5 +26,5 @@ action {
env_vars {
key: "RUN_TESTS_FLAGS"
value: "-f portability windows -j 1 --inner_jobs 8 --internal_ci --bq_result_table aggregate_results"
value: "-f portability windows -j 4 --inner_jobs 8 --internal_ci --bq_result_table aggregate_results"
}

@ -26,5 +26,5 @@ action {
env_vars {
key: "RUN_TESTS_FLAGS"
value: "-f portability windows --internal_ci --build_only"
value: "-f portability windows -j 4 --inner_jobs 8 --internal_ci --build_only"
}

@ -424,8 +424,10 @@ class CLanguage(object):
def pre_build_steps(self):
if self.platform == 'windows':
return [['tools\\run_tests\\helper_scripts\\pre_build_cmake.bat'] +
self._cmake_configure_extra_args]
return [[
'tools\\run_tests\\helper_scripts\\pre_build_cmake.bat',
'-DgRPC_BUILD_MSVC_MP_COUNT=%d' % args.jobs
] + self._cmake_configure_extra_args]
elif self._use_cmake:
return [['tools/run_tests/helper_scripts/pre_build_cmake.sh'] +
self._cmake_configure_extra_args]

Loading…
Cancel
Save