[llvm] [CI] Tee Ninja Output to Log Files (PR #152331)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 09:17:04 PDT 2025
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/152331
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.
>From 284f8869e1186c96bbc1008c973ee3dccba6115d Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 6 Aug 2025 16:16:55 +0000
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.6
---
.ci/monolithic-linux.sh | 10 ++++++----
.ci/monolithic-windows.sh | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index da21e09809aee..4b36be065187c 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -100,12 +100,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
@@ -120,7 +120,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"
@@ -131,5 +132,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
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 71646ce047d4f..e9f8a8b056fc9 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -88,4 +88,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
More information about the llvm-commits
mailing list