From 6b7e1b97f4bbb6dd6fca04ee4caccbf54ec92f09 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 1 Jul 2025 16:15:27 -0700 Subject: [PATCH] [CI] Use Github Native Groups in monolithic-* scripts This patch updates monolithic-linux.sh and monolithic-windows.sh to emit expandable groups in the Github logs. The syntax this replaces originally worked to produce the same functionality on Buildkite, but Github uses a different syntax. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#grouping-log-lines Reviewers: cmtice, DavidSpickett, tstellar, lnihlen, Endilll Reviewed By: Endilll, DavidSpickett Pull Request: https://github.com/llvm/llvm-project/pull/143481 --- .ci/monolithic-linux.sh | 25 ++++++++++++++++++------- .ci/monolithic-windows.sh | 8 ++++++-- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index 89447963b852..8d1faab13986 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -56,7 +56,7 @@ runtime_targets_needs_reconfig="${5}" lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests" -echo "--- cmake" +echo "::group::cmake" export PIP_BREAK_SYSTEM_PACKAGES=1 pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt @@ -85,38 +85,49 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ -D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \ -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" -echo "--- ninja" +echo "::endgroup::" +echo "::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 "--- ninja runtimes" + echo "::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 "--- cmake runtimes C++26" + echo "::group::cmake runtimes C++26" cmake \ -D LIBCXX_TEST_PARAMS="std=c++26" \ -D LIBCXXABI_TEST_PARAMS="std=c++26" \ "${BUILD_DIR}" - echo "--- ninja runtimes C++26" + echo "::endgroup::" + echo "::group::ninja runtimes C++26" ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig} - echo "--- cmake runtimes clang modules" + echo "::endgroup::" + echo "::group::cmake runtimes clang modules" cmake \ -D LIBCXX_TEST_PARAMS="enable_modules=clang" \ -D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \ "${BUILD_DIR}" - echo "--- ninja runtimes clang modules" + echo "::endgroup::" + echo "::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 dc2913830e92..c27111bf5aa1 100755 --- a/.ci/monolithic-windows.sh +++ b/.ci/monolithic-windows.sh @@ -46,7 +46,7 @@ trap at-exit EXIT projects="${1}" targets="${2}" -echo "--- cmake" +echo "::group::cmake" pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt export CC=cl @@ -78,6 +78,10 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ -D LLVM_PARALLEL_COMPILE_JOBS=${MAX_PARALLEL_COMPILE_JOBS} \ -D LLVM_PARALLEL_LINK_JOBS=${MAX_PARALLEL_LINK_JOBS} -echo "--- ninja" +echo "::endgroup::" +echo "::group::ninja" + # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +echo "::endgroup"