[libc++] Add output groups to run-buildbot#75233
Closed
Conversation
Member
|
@llvm/pr-subscribers-libcxx Author: Eric (EricWF) Changes1 Files Affected:
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 445b1becee0c2..098a14eaab3e4 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -112,6 +112,27 @@ if [ -z "${CMAKE}" ]; then
fi
fi
+function start_output_group() {
+ end_output_group
+ export IN_GROUP=1
+
+ if [[ -v GITHUB_ACTIONS ]]; then
+ echo "::group::$1"
+ else
+ echo "--- $1"
+ fi
+}
+
+function end_output_group() {
+ if [[ ! -v GITHUB_ACTIONS ]]; then
+ return
+ fi
+ if [[ -v IN_GROUP ]]; then
+ echo "::endgroup::"
+ unset IN_GROUP
+ fi
+}
+
function clean() {
rm -rf "${BUILD_DIR}"
}
@@ -125,7 +146,7 @@ if [ -n "${ENABLE_STD_MODULES}" ]; then
fi
function generate-cmake-base() {
- echo "--- Generating CMake"
+ start_output_group "Generating CMake"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}" \
@@ -139,6 +160,7 @@ function generate-cmake-base() {
${ENABLE_STD_MODULES} \
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
"${@}"
+ end_output_group
}
function generate-cmake() {
@@ -164,13 +186,20 @@ function generate-cmake-android() {
}
function check-runtimes() {
- echo "+++ Running the libc++ tests"
+ start_output_group "Building libc++ & libc++abi"
+ ${NINJA} -vC "${BUILD_DIR}" cxx cxxabi
+
+ start_output_group "Building libc++ test deps"
+ ${NINJA} -vC "${BUILD_DIR}" cxx-test-deps
+
+
+ start_output_group "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
- echo "+++ Running the libc++abi tests"
+ start_output_group "Running the libc++abi tests"
${NINJA} -vC "${BUILD_DIR}" check-cxxabi
- echo "+++ Running the libunwind tests"
+ start_output_group "Running the libunwind tests"
${NINJA} -vC "${BUILD_DIR}" check-unwind
# TODO: On macOS 13.5, the linker seems to have an issue where it will pick up
@@ -183,23 +212,25 @@ function check-runtimes() {
# It should be possible to move this installation step back to the top once
# that issue has been resolved, but in the meantime it doesn't really hurt to
# have it here.
- echo "--- Installing libc++, libc++abi and libunwind to a fake location"
+ start_output_group "Installing libc++, libc++abi and libunwind to a fake location"
${NINJA} -vC "${BUILD_DIR}" install-cxx install-cxxabi install-unwind
+
+ end_output_group
}
# TODO: The goal is to test this against all configurations. We should also move
# this to the Lit test suite instead of being a separate CMake target.
function check-abi-list() {
- echo "+++ Running the libc++ ABI list test"
+ start_output_group "Running the libc++ ABI list test"
${NINJA} -vC "${BUILD_DIR}" check-cxx-abilist || (
- echo "+++ Generating the libc++ ABI list after failed check"
+ echo "::error::Generating the libc++ ABI list after failed check"
${NINJA} -vC "${BUILD_DIR}" generate-cxx-abilist
false
)
}
function check-cxx-benchmarks() {
- echo "--- Running the benchmarks"
+ start_output_group "Running the benchmarks"
${NINJA} -vC "${BUILD_DIR}" check-cxx-benchmarks
}
@@ -341,7 +372,7 @@ generic-ubsan)
bootstrapping-build)
clean
- echo "--- Generating CMake"
+ start_output_group "Generating CMake"
${CMAKE} \
-S "${MONOREPO_ROOT}/llvm" \
-B "${BUILD_DIR}" \
@@ -357,13 +388,15 @@ bootstrapping-build)
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
- echo "+++ Running the libc++ and libc++abi tests"
+ start_output_group "Running the libc++ and libc++abi tests"
${NINJA} -vC "${BUILD_DIR}" check-runtimes
- echo "--- Installing libc++ and libc++abi to a fake location"
+ start_output_group "Installing libc++ and libc++abi to a fake location"
${NINJA} -vC "${BUILD_DIR}" install-runtimes
ccache -s
+
+ end_output_group
;;
generic-static)
clean
@@ -500,11 +533,12 @@ apple-system-backdeployment-hardened-*)
clean
if [[ "${OSX_ROOTS}" == "" ]]; then
- echo "--- Downloading previous macOS dylibs"
+ start_output_group "Downloading previous macOS dylibs"
PREVIOUS_DYLIBS_URL="https://dl.dropboxusercontent.com/s/gmcfxwgl9f9n6pu/libcxx-roots.tar.gz"
OSX_ROOTS="${BUILD_DIR}/macos-roots"
mkdir -p "${OSX_ROOTS}"
curl "${PREVIOUS_DYLIBS_URL}" | tar -xz --strip-components=1 -C "${OSX_ROOTS}"
+ end_output_group
fi
DEPLOYMENT_TARGET="${BUILDER#apple-system-backdeployment-hardened-}"
@@ -538,11 +572,12 @@ apple-system-backdeployment-*)
clean
if [[ "${OSX_ROOTS}" == "" ]]; then
- echo "--- Downloading previous macOS dylibs"
+ start_output_group "Downloading previous macOS dylibs"
PREVIOUS_DYLIBS_URL="https://dl.dropboxusercontent.com/s/gmcfxwgl9f9n6pu/libcxx-roots.tar.gz"
OSX_ROOTS="${BUILD_DIR}/macos-roots"
mkdir -p "${OSX_ROOTS}"
curl "${PREVIOUS_DYLIBS_URL}" | tar -xz --strip-components=1 -C "${OSX_ROOTS}"
+ end_output_group
fi
DEPLOYMENT_TARGET="${BUILDER#apple-system-backdeployment-}"
@@ -621,7 +656,7 @@ armv7m-picolibc)
--install-dir "${INSTALL_DIR}" \
--target armv7m-none-eabi
- echo "--- Generating CMake"
+ start_output_group "Generating CMake"
flags="--sysroot=${INSTALL_DIR}"
${CMAKE} \
-S "${MONOREPO_ROOT}/compiler-rt" \
|
This should make log output easier to find.
Member
|
Can you explain what this does (perhaps in the commit message)? I imagine this improves the CI output? That would be nice! |
Member
|
I looked at the CI output and this seems really desirable. It looks like we could also avoid using |
Contributor
Member
|
Crap, I don't have permission to push to this branch to pick it up. I'll close this and reopen a PR. |
ldionne
pushed a commit
to ldionne/llvm-project
that referenced
this pull request
Oct 9, 2024
This improves the CI output by providing collapsable sections for sub-parts of our build. This was originally opened as llvm#75233.
ldionne
added a commit
that referenced
this pull request
Oct 11, 2024
This improves the CI output by providing collapsable sections for sub-parts of our build. This was originally opened as #75233. Co-authored-by: eric <[email protected]>
DanielCChen
pushed a commit
to DanielCChen/llvm-project
that referenced
this pull request
Oct 16, 2024
This improves the CI output by providing collapsable sections for sub-parts of our build. This was originally opened as llvm#75233. Co-authored-by: eric <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves the CI output by providing collapsable sections for sub-parts of our build.