perf(web): reuse incremental build and status caches
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-06 10:27:26 +08:00
parent 1184a51ddf
commit 6090995999
9 changed files with 131 additions and 11 deletions

View File

@@ -8,9 +8,18 @@ configure_variant() {
local name="$1"
local threads="$2"
local build_dir="${repo_root}/build_web-${name}"
emcmake cmake --fresh -S "${repo_root}/web/engine" -B "${build_dir}" -G Ninja \
-DCMAKE_BUILD_TYPE=Release -DWEB_ENGINE_THREADS="${threads}"
cmake --build "${build_dir}" --target web_engine
local configure_args=(
-S "${repo_root}/web/engine"
-B "${build_dir}"
-G Ninja
-DCMAKE_BUILD_TYPE=Release
-DWEB_ENGINE_THREADS="${threads}"
)
if [[ "${WEB_ENGINE_FORCE_RECONFIGURE:-0}" == "1" ]]; then
configure_args=(--fresh "${configure_args[@]}")
fi
emcmake cmake "${configure_args[@]}"
cmake --build "${build_dir}" --target web_engine --parallel "${WEB_BUILD_JOBS:-$(bash "${repo_root}/tools/web/compute-build-jobs.sh")}"
test -s "${build_dir}/web_engine.js"
test -s "${build_dir}/web_engine.wasm"
printf '%s variant ok: %s\n' "${name}" "${build_dir}"