[llvm] [CI] Move platform specific test report titles to python (PR #152198)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 07:27:21 PDT 2025
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/152198
>From 8b719fa69311d7a075c9f7a08f268586ada5c766 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Tue, 5 Aug 2025 20:33:51 +0000
Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?=
=?UTF-8?q?anges=20to=20main=20this=20commit=20is=20based=20on?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.6
[skip ci]
---
.ci/monolithic-linux.sh | 42 +++++++++++++++++++++------------------
.ci/monolithic-windows.sh | 27 +++++++++++++++++--------
2 files changed, 42 insertions(+), 27 deletions(-)
diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index 6db24d894eb73..fffd8fef21382 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -38,11 +38,25 @@ function at-exit {
# If building fails there will be no results files.
shopt -s nullglob
- python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":penguin: Linux x64 Test Results" \
- $retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
+ if [[ "$GITHUB_STEP_SUMMARY" != "" ]]; then
+ python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":penguin: Linux x64 Test Results" \
+ $retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
+ fi
}
trap at-exit EXIT
+function start-group {
+ groupname=$1
+ if [[ "$GITHUB_ACTIONS" != "" ]]; then
+ echo "::endgroup"
+ echo "::group::$groupname"
+ elif [[ "$POSTCOMMIT_CI" != "" ]]; then
+ echo "@@@$STEP@@@"
+ else
+ echo "Starting $groupname"
+ fi
+}
+
projects="${1}"
targets="${2}"
runtimes="${3}"
@@ -52,7 +66,7 @@ enable_cir="${6}"
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests"
-echo "::group::cmake"
+start-group "CMake"
export PIP_BREAK_SYSTEM_PACKAGES=1
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
@@ -83,49 +97,39 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-echo "::endgroup::"
-echo "::group::ninja"
+start-group "ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets}
-echo "::endgroup::"
-
if [[ "${runtime_targets}" != "" ]]; then
- echo "::group::ninja runtimes"
+ start-group "ninja Runtimes"
ninja -C "${BUILD_DIR}" ${runtime_targets}
-
- echo "::endgroup::"
fi
# Compiling runtimes with just-built Clang and running their tests
# as an additional testing for Clang.
if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then
- echo "::group::cmake runtimes C++26"
+ start-group "CMake Runtimes C++26"
cmake \
-D LIBCXX_TEST_PARAMS="std=c++26" \
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
"${BUILD_DIR}"
- echo "::endgroup::"
- echo "::group::ninja runtimes C++26"
+ start-group "ninja Runtimes C++26"
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
- echo "::endgroup::"
- echo "::group::cmake runtimes clang modules"
+ start-group "CMake Runtimes Clang Modules"
cmake \
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
"${BUILD_DIR}"
- echo "::endgroup::"
- echo "::group::ninja runtimes clang modules"
+ start-group "ninja Runtimes Clang Modules"
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
-
- echo "::endgroup::"
fi
diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh
index 50a741677d734..da150829783df 100755
--- a/.ci/monolithic-windows.sh
+++ b/.ci/monolithic-windows.sh
@@ -32,16 +32,30 @@ function at-exit {
# If building fails there will be no results files.
shopt -s nullglob
-
- python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":window: Windows x64 Test Results" \
- $retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
+
+ if [[ "$GITHUB_STEP_SUMMARY" != "" ]]; then
+ python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":window: Windows x64 Test Results" \
+ $retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
+ fi
}
trap at-exit EXIT
+function start-group {
+ groupname=$1
+ if [[ "$GITHUB_ACTIONS" != "" ]]; then
+ echo "::endgroup"
+ echo "::group::$groupname"
+ elif [[ "$POSTCOMMIT_CI" != "" ]]; then
+ echo "@@@$STEP@@@"
+ else
+ echo "Starting $groupname"
+ fi
+}
+
projects="${1}"
targets="${2}"
-echo "::group::cmake"
+start-group "CMake"
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
export CC=cl
@@ -71,10 +85,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D CMAKE_MODULE_LINKER_FLAGS="/MANIFEST:NO" \
-D CMAKE_SHARED_LINKER_FLAGS="/MANIFEST:NO"
-echo "::endgroup::"
-echo "::group::ninja"
+start-group "ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets}
-
-echo "::endgroup"
>From ba7bbd657eebd7d019dbefc899a197fbe178a6b9 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 6 Aug 2025 14:27:10 +0000
Subject: [PATCH 2/2] fix
Created using spr 1.3.6
---
.ci/generate_test_report_github.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.ci/generate_test_report_github.py b/.ci/generate_test_report_github.py
index e32f99264979b..4b7f3a2367d50 100644
--- a/.ci/generate_test_report_github.py
+++ b/.ci/generate_test_report_github.py
@@ -20,7 +20,7 @@
args = parser.parse_args()
report = generate_test_report_lib.generate_report_from_files(
- PLATFORM_TITLES[platform.system], args.return_code, args.junit_files
+ PLATFORM_TITLES[platform.system()], args.return_code, args.junit_files
)
print(report)
More information about the llvm-commits
mailing list