mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-21 12:39:08 +01:00
SERVER-87594 Add compile variant that simulates a workstation build (#21010)
GitOrigin-RevId: 885acdd13d1f221aa3c3508ce2a12bc58fe8475a
This commit is contained in:
parent
e865478f40
commit
174003ce8e
@ -735,6 +735,28 @@ tasks:
|
||||
ninja_file: "fast.ninja"
|
||||
targets: "install-devcore compiledb"
|
||||
|
||||
- name: compile_ninja_fast_icecc
|
||||
tags: ["assigned_to_jira_team_devprod_build", "auxiliary", "bazel_check"]
|
||||
depends_on:
|
||||
- name: version_expansions_gen
|
||||
variant: generate-tasks-for-version
|
||||
commands:
|
||||
- func: "scons compile"
|
||||
vars:
|
||||
generating_for_ninja: true
|
||||
separate_debug: off
|
||||
task_compile_flags: >-
|
||||
--build-profile=fast
|
||||
BAZEL_BUILD_ENABLED=1
|
||||
BAZEL_INTEGRATION_DEBUG=1
|
||||
CCACHE=
|
||||
ICECC=icecc
|
||||
- func: "f_expansions_write"
|
||||
- func: "ninja compile"
|
||||
vars:
|
||||
ninja_file: "fast.ninja"
|
||||
targets: "install-devcore compiledb"
|
||||
|
||||
- name: compile_ninja_san_profile
|
||||
tags: ["assigned_to_jira_team_devprod_build", "auxiliary"]
|
||||
depends_on:
|
||||
@ -2743,6 +2765,12 @@ task_groups:
|
||||
tasks:
|
||||
- compile_ninja_fast_profile
|
||||
|
||||
- <<: *compile_task_group_template
|
||||
name: compile_ninja_fast_icecc_TG
|
||||
tags: []
|
||||
tasks:
|
||||
- compile_ninja_fast_icecc
|
||||
|
||||
- <<: *compile_task_group_template
|
||||
name: compile_ninja_compiledb_profile_TG
|
||||
tasks:
|
||||
|
@ -171,6 +171,24 @@ buildvariants:
|
||||
distros:
|
||||
- ubuntu1804-xlarge
|
||||
|
||||
# This variant simulates a developer workstation build by using both icecream and remote
|
||||
# execution. This is to track how the bazel conversion affects developer build times.
|
||||
- name: ubuntu2204-ninja-bazel-icecc
|
||||
display_name: "Ninja Bazel Icecc: Ubuntu 22.04"
|
||||
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
|
||||
run_on:
|
||||
- ubuntu2204-arm64-icecc
|
||||
stepback: false
|
||||
expansions:
|
||||
compile_flags: --ssl --ocsp-stapling=off MONGO_DISTMOD=ubuntu2204 -j$(grep -c ^processor /proc/cpuinfo)
|
||||
repo_edition: enterprise
|
||||
has_packages: false
|
||||
compile_variant: ubuntu2204-ninja-build-profiles
|
||||
ninja_jobs: 300
|
||||
ninja_retries: 3
|
||||
tasks:
|
||||
- name: compile_ninja_fast_icecc_TG
|
||||
|
||||
- name: enterprise-rhel-80-64-bit-dynamic-ninja
|
||||
display_name: "Ninja Build: Enterprise RHEL 8.0"
|
||||
tags: []
|
||||
|
@ -8,14 +8,27 @@ set -o verbose
|
||||
|
||||
activate_venv
|
||||
|
||||
if [[ -n "${ninja_jobs}" ]]; then
|
||||
JOBS_ARG="-j${ninja_jobs}"
|
||||
fi
|
||||
|
||||
if [ "Windows_NT" = "$OS" ]; then
|
||||
vcvars="$(vswhere -latest -property installationPath | tr '\\' '/' | dos2unix.exe)/VC/Auxiliary/Build/"
|
||||
echo "call \"$vcvars/vcvarsall.bat\" amd64" > msvc.bat
|
||||
for i in "${compile_env[@]}"; do
|
||||
echo "set $i" >> msvc.bat
|
||||
done
|
||||
echo "ninja -f ${ninja_file} ${targets}" >> msvc.bat
|
||||
cmd /C msvc.bat
|
||||
echo "ninja -f ${ninja_file} ${JOBS_ARG} ${targets}" >> msvc.bat
|
||||
for i in $(seq ${ninja_retries:=1}); do
|
||||
cmd /C msvc.bat && RET=0 && break || RET=$? && sleep 1
|
||||
done
|
||||
else
|
||||
eval ${compile_env} ninja -f ${ninja_file} ${targets}
|
||||
for i in $(seq ${ninja_retries:=1}); do
|
||||
eval ${compile_env} ninja -f ${ninja_file} ${JOBS_ARG} ${targets} && RET=0 && break || RET=$? && sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
echo "Ninja command failed"
|
||||
exit $RET
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user