From 2b6db26534a690f8f3f1ac88b3b886c06be2ff73 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Wed, 15 Oct 2025 01:34:04 +0000 Subject: [PATCH 1/2] [CI] Save All .ninja_log Files We currently only save the .ninja_log from the last ninja invocation because ninja overwrites any existing .ninja_log file. This prevents us from easily doing performance introspection of earlier ninja invocations (which take the bulk of the time) using the .ninja_log file. --- .ci/monolithic-linux.sh | 4 ++++ .ci/monolithic-windows.sh | 2 ++ .ci/utils.sh | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index c8f331204bd49..6460d9bf44e1b 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -66,11 +66,13 @@ start-group "ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log +cp .ninja_log ninja.ninja_log if [[ "${runtime_targets}" != "" ]]; then start-group "ninja Runtimes" ninja -C "${BUILD_DIR}" ${runtime_targets} |& tee ninja_runtimes.log + cp .ninja_log ninja_runtimes.ninja_log fi # Compiling runtimes with just-built Clang and running their tests @@ -87,6 +89,7 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \ |& tee ninja_runtimes_needs_reconfig1.log + cp .ninja_log ninja_runtimes_needs_reconig.ninja_log start-group "CMake Runtimes Clang Modules" @@ -99,4 +102,5 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \ |& tee ninja_runtimes_needs_reconfig2.log + cp .ninja_log ninja_runtimes_needs_reconfig2.ninja_log fi diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh index f85d6e3d51b57..0f9783dc09d8f 100755 --- a/.ci/monolithic-windows.sh +++ b/.ci/monolithic-windows.sh @@ -55,9 +55,11 @@ start-group "ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log +cp .ninja_log ninja.ninja_log if [[ "${runtime_targets}" != "" ]]; then start-group "ninja runtimes" ninja -C "${BUILD_DIR}" -k 0 ${runtimes_targets} |& tee ninja_runtimes.log + cp .ninja_log ninja_runtimes.ninja_log fi diff --git a/.ci/utils.sh b/.ci/utils.sh index 5d32968babb39..1ac3e53017966 100644 --- a/.ci/utils.sh +++ b/.ci/utils.sh @@ -26,7 +26,7 @@ function at-exit { mkdir -p artifacts sccache --show-stats sccache --show-stats >> artifacts/sccache_stats.txt - cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log + cp "${BUILD_DIR}"/*.ninja_log artifacts/ || : cp "${MONOREPO_ROOT}"/*.log artifacts/ || : cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || : From 32d46f03fbae014f54a225f191438e6bdd68e76c Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 16 Oct 2025 14:28:42 +0000 Subject: [PATCH 2/2] fix --- .ci/monolithic-linux.sh | 8 ++++---- .ci/monolithic-windows.sh | 4 ++-- .ci/utils.sh | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 6460d9bf44e1b..4a8418d7baa8c 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -66,13 +66,13 @@ start-group "ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log -cp .ninja_log ninja.ninja_log +cp ${BUILD_DIR}/.ninja_log ninja.ninja_log if [[ "${runtime_targets}" != "" ]]; then start-group "ninja Runtimes" ninja -C "${BUILD_DIR}" ${runtime_targets} |& tee ninja_runtimes.log - cp .ninja_log ninja_runtimes.ninja_log + cp ${BUILD_DIR}/.ninja_log ninja_runtimes.ninja_log fi # Compiling runtimes with just-built Clang and running their tests @@ -89,7 +89,7 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \ |& tee ninja_runtimes_needs_reconfig1.log - cp .ninja_log ninja_runtimes_needs_reconig.ninja_log + cp ${BUILD_DIR}/.ninja_log ninja_runtimes_needs_reconig.ninja_log start-group "CMake Runtimes Clang Modules" @@ -102,5 +102,5 @@ if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} \ |& tee ninja_runtimes_needs_reconfig2.log - cp .ninja_log ninja_runtimes_needs_reconfig2.ninja_log + cp ${BUILD_DIR}/.ninja_log ninja_runtimes_needs_reconfig2.ninja_log fi diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh index 0f9783dc09d8f..219979dd3e36e 100755 --- a/.ci/monolithic-windows.sh +++ b/.ci/monolithic-windows.sh @@ -55,11 +55,11 @@ start-group "ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log -cp .ninja_log ninja.ninja_log +cp ${BUILD_DIR}/.ninja_log ninja.ninja_log if [[ "${runtime_targets}" != "" ]]; then start-group "ninja runtimes" ninja -C "${BUILD_DIR}" -k 0 ${runtimes_targets} |& tee ninja_runtimes.log - cp .ninja_log ninja_runtimes.ninja_log + cp ${BUILD_DIR}/.ninja_log ninja_runtimes.ninja_log fi diff --git a/.ci/utils.sh b/.ci/utils.sh index 1ac3e53017966..c8b615ca5f267 100644 --- a/.ci/utils.sh +++ b/.ci/utils.sh @@ -26,7 +26,7 @@ function at-exit { mkdir -p artifacts sccache --show-stats sccache --show-stats >> artifacts/sccache_stats.txt - cp "${BUILD_DIR}"/*.ninja_log artifacts/ || : + cp "${MONOREPO_ROOT}"/*.ninja_log artifacts/ || : cp "${MONOREPO_ROOT}"/*.log artifacts/ || : cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :