[CI] Tee Ninja Output to Log Files

This patch makes all of the ninja commands in the monolithic-* scripts
write to log files in the current working directory. The plan is to use
this to feed the ninja log into generate_test_report_github.py so we can
surface compilation errors.

Related to #152246.

Reviewers: Keenuts, lnihlen, cmtice, dschuff, gburgessiv

Reviewed By: Keenuts, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/152331
This commit is contained in:
Aiden Grossman 2025-08-07 14:02:19 -07:00 committed by GitHub
parent 41b5880c95
commit 536e414b14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View File

@ -65,12 +65,12 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
start-group "ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets}
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
if [[ "${runtime_targets}" != "" ]]; then
start-group "ninja Runtimes"
ninja -C "${BUILD_DIR}" ${runtime_targets}
ninja -C "${BUILD_DIR}" ${runtime_targets} |& tee ninja_runtimes.log
fi
# Compiling runtimes with just-built Clang and running their tests
@ -85,7 +85,8 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then
start-group "ninja Runtimes C++26"
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
|& tee ninja_runtimes_needs_reconfig1.log
start-group "CMake Runtimes Clang Modules"
@ -96,5 +97,6 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then
start-group "ninja Runtimes Clang Modules"
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \
|& tee ninja_runtimes_needs_reconfig2.log
fi

View File

@ -51,4 +51,4 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
start-group "ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets}
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log