summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2020-10-05 20:37:56 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-26 20:04:53 +0000
commit4e93e490d4de7c50871cfd80864817fe389ae718 (patch)
treec5ea20e20964a078f6c1d2a9f323b4016801bb20
parent91d6d5340979267ccb3c4fe6f68a403e0cdc9c62 (diff)
downloadmongo-4e93e490d4de7c50871cfd80864817fe389ae718.tar.gz
SERVER-51194 Added build-tools next evergreen tasks
-rw-r--r--etc/evergreen.yml84
-rw-r--r--site_scons/libdeps_next.py2
-rw-r--r--site_scons/site_tools/next/ninja.py11
3 files changed, 94 insertions, 3 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index a0ef4bf2f3b..d152e9712fb 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1891,6 +1891,11 @@ functions:
extra_args="$extra_args --release"
fi
+ if [ "Windows_NT" = "$OS" ]; then
+ vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/"
+ export PATH="$(echo "$(cd "$vcvars" && cmd /C "vcvarsall.bat amd64 && C:/cygwin/bin/bash -c 'echo \$PATH'")" | tail -n +6)":$PATH
+ fi
+
${activate_virtualenv}
chmod -R ugo-w ./src
@@ -3576,7 +3581,50 @@ tasks:
params:
working_dir: src
shell: bash
- script: ninja -f build.ninja
+ script: |
+ ${activate_virtualenv}
+ if [ "Windows_NT" = "$OS" ]; then
+ vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/"
+ cd "$vcvars" && cmd /K "vcvarsall.bat amd64 && cd ${workdir}\src"
+ fi
+ python -m pip install ninja
+ ninja install-core
+
+- name: compile_ninja_next
+ commands:
+ - func: "scons compile"
+ vars:
+ task_install_action:
+ default
+ task_compile_flags: >-
+ --build-tools=next
+ --ninja
+ targets:
+ generate-ninja
+ - command: shell.exec
+ params:
+ working_dir: src
+ shell: bash
+ script: |
+ ${activate_virtualenv}
+ if [ "Windows_NT" = "$OS" ]; then
+ vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/"
+ cd "$vcvars" && cmd /K "vcvarsall.bat amd64 && cd ${workdir}\src"
+ fi
+ python -m pip install ninja
+ ninja install-core
+
+
+- name: compile_build_tools_next
+ commands:
+ - func: "scons compile"
+ vars:
+ task_install_action:
+ default
+ task_compile_flags: >-
+ --build-tools=next
+ targets:
+ install-core
## compile_all - build all scons targets ##
- name: compile_all
@@ -8424,6 +8472,17 @@ task_groups:
- package
- <<: *compile_task_group_template
+ name: compile_ninja_next_TG
+ tasks:
+ - compile_build_tools_next
+ - compile_ninja_next
+
+- <<: *compile_task_group_template
+ name: compile_build_tools_next_TG
+ tasks:
+ - compile_build_tools_next
+
+- <<: *compile_task_group_template
name: compile_ninja_TG
tasks:
- compile_ninja
@@ -8826,6 +8885,9 @@ buildvariants:
- name: compile_all_run_unittests_TG
distros:
- ubuntu1804-build
+ - name: compile_ninja_next_TG
+ distros:
+ - ubuntu1804-build
- name: compile_ninja_TG
- name: .aggfuzzer .common
- name: audit
@@ -9280,6 +9342,9 @@ buildvariants:
- name: compile_all_run_unittests_TG
distros:
- ubuntu2004-large
+ - name: compile_ninja_next_TG
+ distros:
+ - ubuntu2004-large
- name: compile_ninja_TG
- name: .aggfuzzer .common !.multiversion
- name: audit
@@ -9643,6 +9708,9 @@ buildvariants:
- name: compile_all_run_unittests_TG
distros:
- windows-64-vs2019-large
+ - name: compile_build_tools_next_TG
+ distros:
+ - windows-64-vs2019-large
- name: .aggregation !.auth !.encrypt
- name: aggregation_expression_multiversion_fuzzer_gen
- name: aggregation_expression_optimization_fuzzer_gen
@@ -9716,6 +9784,9 @@ buildvariants:
- name: compile_TG
distros:
- windows-64-vs2019-large
+ - name: compile_build_tools_next_TG
+ distros:
+ - windows-64-vs2019-large
# - name: burn_in_tests_gen
# - name: buildscripts_test
- name: noPassthrough_gen
@@ -9941,6 +10012,9 @@ buildvariants:
- name: compile_TG
distros:
- windows-64-vs2019-large
+ - name: compile_ninja_next_TG
+ distros:
+ - windows-64-vs2019-large
- name: audit
# Do not add more tasks to this list.
@@ -10007,6 +10081,7 @@ buildvariants:
num_scons_link_jobs_available: 0.99
tasks:
- name: compile_all_run_unittests_TG
+ - name: compile_build_tools_next_TG
- name: aggregation
- name: auth_gen
- name: causally_consistent_jscore_txns_passthrough
@@ -10038,6 +10113,7 @@ buildvariants:
resmoke_jobs_max: 6
tasks:
- name: compile_all_run_unittests_TG
+ - name: compile_ninja_next_TG
- name: audit
- name: auth_audit_gen
- name: causally_consistent_jscore_txns_passthrough
@@ -11000,6 +11076,9 @@ buildvariants:
- name: compile_all_run_unittests_TG
distros:
- rhel70
+ - name: compile_build_tools_next_TG
+ distros:
+ - rhel70
- name: .aggfuzzer
- name: audit
- name: auth_audit_gen
@@ -11246,6 +11325,9 @@ buildvariants:
- name: compile_TG
distros:
- ubuntu1604-build
+ - name: compile_build_tools_next_TG
+ distros:
+ - ubuntu1604-build
- name: jsCore
- name: .read_write_concern !.write !.aggregation
- name: replica_sets_jscore_passthrough
diff --git a/site_scons/libdeps_next.py b/site_scons/libdeps_next.py
index 51a8376ab3c..5206eb83b8a 100644
--- a/site_scons/libdeps_next.py
+++ b/site_scons/libdeps_next.py
@@ -1099,7 +1099,7 @@ def setup_environment(env, emitting_shared=False, linting='on', sanitize_typeinf
)
env.Prepend(_LIBFLAGS="$_LIBDEPS_TAGS $_LIBDEPS $_SYSLIBDEPS ")
- env.Prepend(ARFLAGS="$_LIBDEPS_TAGS ")
+ env.Prepend(ARFLAGS="$_LIBDEPS_TAGS")
for builder_name in ("Program", "SharedLibrary", "LoadableModule", "SharedArchive"):
try:
update_scanner(env["BUILDERS"][builder_name])
diff --git a/site_scons/site_tools/next/ninja.py b/site_scons/site_tools/next/ninja.py
index 17254013914..46a80d3369a 100644
--- a/site_scons/site_tools/next/ninja.py
+++ b/site_scons/site_tools/next/ninja.py
@@ -1102,9 +1102,18 @@ def get_command(env, node, action): # pylint: disable=too-many-branches
implicit.append(provider_dep)
continue
+ # in some case the tool could be in the local directory and be suppled without the ext
+ # such as in windows, so append the executable suffix and check.
+ prog_suffix = sub_env.get('PROGSUFFIX', '')
+ provider_dep_ext = provider_dep if provider_dep.endswith(prog_suffix) else provider_dep + prog_suffix
+ if os.path.exists(provider_dep_ext):
+ implicit.append(provider_dep_ext)
+ continue
+
# Many commands will assume the binary is in the path, so
# we accept this as a possible input from a given command.
- provider_dep_abspath = sub_env.WhereIs(provider_dep)
+
+ provider_dep_abspath = sub_env.WhereIs(provider_dep) or sub_env.WhereIs(provider_dep, path=os.environ["PATH"])
if provider_dep_abspath:
implicit.append(provider_dep_abspath)
continue