SERVER-76006 make compile half stream for smaller systems
This commit is contained in:
parent
7475268159
commit
e99d0a1749
35
SConstruct
35
SConstruct
@ -6405,6 +6405,41 @@ if env.get('UNITTESTS_COMPILE_CONCURRENCY'):
|
||||
source_file_regex=r"^.*_test\.cpp$",
|
||||
)
|
||||
|
||||
first_half_flag = False
|
||||
|
||||
|
||||
def half_source_emitter(target, source, env):
|
||||
global first_half_flag
|
||||
if first_half_flag:
|
||||
first_half_flag = False
|
||||
if not 'conftest' in str(target[0]) and not str(source[0]).endswith('_test.cpp'):
|
||||
env.Alias('compile_first_half_non_test_source', target)
|
||||
else:
|
||||
first_half_flag = True
|
||||
return target, source
|
||||
|
||||
|
||||
# Cribbed from Tool/cc.py and Tool/c++.py. It would be better if
|
||||
# we could obtain this from SCons.
|
||||
_CSuffixes = [".c"]
|
||||
if not SCons.Util.case_sensitive_suffixes(".c", ".C"):
|
||||
_CSuffixes.append(".C")
|
||||
|
||||
_CXXSuffixes = [".cpp", ".cc", ".cxx", ".c++", ".C++"]
|
||||
if SCons.Util.case_sensitive_suffixes(".c", ".C"):
|
||||
_CXXSuffixes.append(".C")
|
||||
|
||||
for object_builder in SCons.Tool.createObjBuilders(env):
|
||||
emitterdict = object_builder.builder.emitter
|
||||
for suffix in emitterdict.keys():
|
||||
if not suffix in _CSuffixes + _CXXSuffixes:
|
||||
continue
|
||||
base = emitterdict[suffix]
|
||||
emitterdict[suffix] = SCons.Builder.ListEmitter([
|
||||
base,
|
||||
half_source_emitter,
|
||||
])
|
||||
|
||||
# Keep this late in the game so that we can investigate attributes set by all the tools that have run.
|
||||
if has_option("cache"):
|
||||
if get_option("cache") == "nolinked":
|
||||
|
||||
@ -2434,6 +2434,21 @@ tasks:
|
||||
task_compile_flags: >-
|
||||
PREFIX=dist-test
|
||||
|
||||
## compile - build all scons targets except unittests ##
|
||||
- name: compile_dist_test_half
|
||||
tags: []
|
||||
depends_on:
|
||||
- name: version_expansions_gen
|
||||
variant: generate-tasks-for-version
|
||||
commands:
|
||||
- func: "scons compile"
|
||||
vars:
|
||||
targets: >-
|
||||
compile_first_half_non_test_source
|
||||
${additional_compile_targets|}
|
||||
task_compile_flags: >-
|
||||
PREFIX=dist-test
|
||||
|
||||
- name: compile_upload_benchmarks
|
||||
tags: []
|
||||
depends_on:
|
||||
@ -8262,6 +8277,29 @@ task_groups:
|
||||
- compile_all_but_not_unittests
|
||||
- package
|
||||
|
||||
# SERVER-76006
|
||||
# This is a compile stream meant for non-cached and/or underpowered systems.
|
||||
# It joins most of the compile tasks together under a single host spread out
|
||||
# across different tasks.
|
||||
- <<: *compile_task_group_template
|
||||
name: small_compile_test_and_package_serial_no_unittests_TG
|
||||
tasks:
|
||||
- compile_dist_test_half
|
||||
- compile_dist_test
|
||||
- archive_dist_test
|
||||
- archive_dist_test_debug
|
||||
- compile_integration_test
|
||||
- integration_tests_standalone
|
||||
- integration_tests_standalone_audit
|
||||
- integration_tests_replset
|
||||
- integration_tests_replset_ssl_auth
|
||||
- integration_tests_sharded
|
||||
- compile_dbtest
|
||||
- run_dbtest
|
||||
- archive_dbtest
|
||||
- compile_all_but_not_unittests
|
||||
- package
|
||||
|
||||
- <<: *compile_task_group_template
|
||||
name: compile_test_benchmark_and_package_serial_TG
|
||||
tasks:
|
||||
|
||||
@ -118,10 +118,7 @@ buildvariants:
|
||||
multiversion_edition: enterprise
|
||||
compile_variant: enterprise-rhel-72-s390x
|
||||
tasks:
|
||||
- name: compile_test_and_package_serial_no_unittests_TG
|
||||
distros:
|
||||
- rhel72-zseries-build
|
||||
- name: compile_integration_and_test_no_audit_parallel_stream_TG
|
||||
- name: small_compile_test_and_package_serial_no_unittests_TG
|
||||
distros:
|
||||
- rhel72-zseries-build
|
||||
- name: .aggregation .common
|
||||
|
||||
Loading…
Reference in New Issue
Block a user