-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++] Add output groups to run-buildbot #111739
Merged
Merged
Conversation
This file contains 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
llvmbot
added
the
libc++
libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
label
Oct 9, 2024
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesThis improves the CI output by providing collapsable sections for sub-parts of our build. This was originally opened as #75233. Full diff: https://github.com/llvm/llvm-project/pull/111739.diff 1 Files Affected:
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index e040f15acc3dae..dc7512e9d202f7 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -104,12 +104,37 @@ if [ -z "${CMAKE}" ]; then
fi
fi
+function step() {
+ endstep
+ set +x
+ if [[ -v GITHUB_ACTIONS ]]; then
+ echo "::group::$1"
+ export IN_GROUP=1
+ else
+ echo "--- $1"
+ fi
+ set -x
+}
+
+function endstep() {
+ set +x
+ if [[ -v GITHUB_ACTIONS ]] && [[ -v IN_GROUP ]]; then
+ echo "::endgroup::"
+ unset IN_GROUP
+ fi
+ set -x
+}
+
+function error() {
+ echo "::error::$1"
+}
+
function clean() {
rm -rf "${BUILD_DIR}"
}
function generate-cmake-base() {
- echo "--- Generating CMake"
+ step "Generating CMake"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}" \
@@ -146,29 +171,32 @@ function generate-cmake-android() {
}
function check-runtimes() {
- echo "+++ Running the libc++ tests"
+ step "Building libc++ test dependencies"
+ ${NINJA} -vC "${BUILD_DIR}" cxx-test-depends
+
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
- echo "+++ Running the libc++abi tests"
+ step "Running the libc++abi tests"
${NINJA} -vC "${BUILD_DIR}" check-cxxabi
- echo "+++ Running the libunwind tests"
+ step "Running the libunwind tests"
${NINJA} -vC "${BUILD_DIR}" check-unwind
}
# 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"
+ step "Running the libc++ ABI list test"
${NINJA} -vC "${BUILD_DIR}" check-cxx-abilist || (
- echo "+++ Generating the libc++ ABI list after failed check"
+ 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"
+ step "Running the benchmarks"
${NINJA} -vC "${BUILD_DIR}" check-cxx-benchmarks
}
@@ -178,12 +206,13 @@ function test-armv7m-picolibc() {
# To make it easier to get this builder up and running, build picolibc
# from scratch. Anecdotally, the build-picolibc script takes about 16 seconds.
# This could be optimised by building picolibc into the Docker container.
+ step "Building picolibc from source"
${MONOREPO_ROOT}/libcxx/utils/ci/build-picolibc.sh \
--build-dir "${BUILD_DIR}" \
--install-dir "${INSTALL_DIR}" \
--target armv7m-none-eabi
- echo "--- Generating CMake"
+ step "Generating CMake for compiler-rt"
flags="--sysroot=${INSTALL_DIR}"
${CMAKE} \
-S "${MONOREPO_ROOT}/compiler-rt" \
@@ -195,6 +224,8 @@ function test-armv7m-picolibc() {
-DCMAKE_CXX_FLAGS="${flags}" \
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \
"${@}"
+
+ step "Generating CMake for libc++"
generate-cmake \
-DLIBCXX_TEST_CONFIG="armv7m-picolibc-libc++.cfg.in" \
-DLIBCXXABI_TEST_CONFIG="armv7m-picolibc-libc++abi.cfg.in" \
@@ -203,6 +234,7 @@ function test-armv7m-picolibc() {
-DCMAKE_CXX_FLAGS="${flags}" \
"${@}"
+ step "Installing compiler-rt"
${NINJA} -vC "${BUILD_DIR}/compiler-rt" install
# Prior to clang 19, armv7m-none-eabi normalised to armv7m-none-unknown-eabi.
@@ -228,10 +260,9 @@ check-generated-output)
clean
generate-cmake
- set +x # Printing all the commands below just creates extremely confusing output
-
# Reject patches that forgot to re-run the generator scripts.
- echo "+++ Making sure the generator scripts were run"
+ step "Making sure the generator scripts were run"
+ set +x # Printing all the commands below just creates extremely confusing output
${NINJA} -vC "${BUILD_DIR}" libcxx-generate-files
git diff | tee ${BUILD_DIR}/generated_output.patch
git ls-files -o --exclude-standard | tee ${BUILD_DIR}/generated_output.status
@@ -243,9 +274,8 @@ check-generated-output)
false
fi
- # Reject patches that introduce non-ASCII characters or hard tabs.
- # Depends on LC_COLLATE set at the top of this script.
- set -x
+ # This depends on LC_COLLATE set at the top of this script.
+ step "Reject patches that introduce non-ASCII characters or hard tabs."
! grep -rn '[^ -~]' libcxx/include libcxx/src libcxx/test libcxx/benchmarks \
--exclude '*.dat' \
--exclude '*unicode*.cpp' \
@@ -353,7 +383,7 @@ generic-ubsan)
bootstrapping-build)
clean
- echo "--- Generating CMake"
+ step "Generating CMake"
${CMAKE} \
-S "${MONOREPO_ROOT}/llvm" \
-B "${BUILD_DIR}" \
@@ -370,14 +400,14 @@ bootstrapping-build)
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
- echo "+++ Running the LLDB libc++ data formatter tests"
+ step "Running the LLDB libc++ data formatter tests"
${NINJA} -vC "${BUILD_DIR}" lldb-api-test-deps
${BUILD_DIR}/bin/llvm-lit -sv --param dotest-args='--category libc++' "${MONOREPO_ROOT}/lldb/test/API"
- echo "--- Running the libc++ and libc++abi tests"
+ step "Running the libc++ and libc++abi tests"
${NINJA} -vC "${BUILD_DIR}" check-runtimes
- echo "+++ Installing libc++ and libc++abi to a fake location"
+ step "Installing libc++ and libc++abi to a fake location"
${NINJA} -vC "${BUILD_DIR}" install-runtimes
ccache -s
@@ -510,6 +540,7 @@ generic-optimized-speed)
apple-configuration)
clean
+ step "Installing libc++ with the Apple system configuration"
arch="$(uname -m)"
xcrun --sdk macosx \
${MONOREPO_ROOT}/libcxx/utils/ci/apple-install-libcxx.sh \
@@ -520,6 +551,7 @@ apple-configuration)
--architectures "${arch}" \
--version "999.99"
+ step "Running tests against Apple-configured libc++"
# TODO: It would be better to run the tests against the fake-installed version of libc++ instead
xcrun --sdk macosx ninja -vC "${BUILD_DIR}/${arch}" check-cxx check-cxxabi check-cxx-abilist
;;
@@ -532,6 +564,7 @@ apple-system-hardened)
params+=";hardening_mode=fast"
# In the Apple system configuration, we build libc++ and libunwind separately.
+ step "Installing libc++ and libc++abi in Apple-system configuration"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}/cxx" \
@@ -547,6 +580,7 @@ apple-system-hardened)
-DLIBCXX_TEST_PARAMS="${params}" \
-DLIBCXXABI_TEST_PARAMS="${params}"
+ step "Installing libunwind in Apple-system configuration"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}/unwind" \
@@ -559,13 +593,13 @@ apple-system-hardened)
-DLIBUNWIND_TEST_PARAMS="${params}" \
-DCMAKE_INSTALL_NAME_DIR="/usr/lib/system"
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxx
- echo "+++ Running the libc++abi tests"
+ step "Running the libc++abi tests"
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxxabi
- echo "+++ Running the libunwind tests"
+ step "Running the libunwind tests"
${NINJA} -vC "${BUILD_DIR}/unwind" check-unwind
;;
apple-system)
@@ -576,6 +610,7 @@ apple-system)
params="target_triple=${arch}-apple-macosx${version}"
# In the Apple system configuration, we build libc++ and libunwind separately.
+ step "Installing libc++ and libc++abi in Apple-system configuration"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}/cxx" \
@@ -591,6 +626,7 @@ apple-system)
-DLIBCXX_TEST_PARAMS="${params}" \
-DLIBCXXABI_TEST_PARAMS="${params}"
+ step "Installing libunwind in Apple-system configuration"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}/unwind" \
@@ -603,13 +639,13 @@ apple-system)
-DLIBUNWIND_TEST_PARAMS="${params}" \
-DCMAKE_INSTALL_NAME_DIR="/usr/lib/system"
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxx
- echo "+++ Running the libc++abi tests"
+ step "Running the libc++abi tests"
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxxabi
- echo "+++ Running the libunwind tests"
+ step "Running the libunwind tests"
${NINJA} -vC "${BUILD_DIR}/unwind" check-unwind
;;
benchmarks)
@@ -672,13 +708,13 @@ clang-cl-dll)
# anyway), thus just disable the experimental library. Remove this
# setting when cmake and the test driver does the right thing automatically.
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False"
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
;;
clang-cl-static)
clean
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
;;
clang-cl-no-vcruntime)
@@ -689,14 +725,14 @@ clang-cl-no-vcruntime)
# exceptions enabled.
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False" \
-DLIBCXX_TEST_CONFIG="llvm-libc++-shared-no-vcruntime-clangcl.cfg.in"
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
;;
clang-cl-debug)
clean
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False" \
-DCMAKE_BUILD_TYPE=Debug
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
;;
clang-cl-static-crt)
@@ -705,7 +741,7 @@ clang-cl-static-crt)
# the static CRT, as opposed to "MultiThreadedDLL" which is the default).
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF \
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
;;
mingw-dll)
@@ -751,6 +787,7 @@ mingw-incomplete-sysroot)
-C "${MONOREPO_ROOT}/libcxx/cmake/caches/MinGW.cmake"
# Only test that building succeeds; there's not much extra value in running
# the tests here, as it would be equivalent to the mingw-dll config above.
+ step "Building the runtimes"
${NINJA} -vC "${BUILD_DIR}"
;;
aix)
@@ -768,7 +805,7 @@ android-ndk-*)
ANDROID_EMU_IMG="${BUILDER#android-ndk-}"
. "${MONOREPO_ROOT}/libcxx/utils/ci/vendor/android/emulator-functions.sh"
if ! validate_emu_img "${ANDROID_EMU_IMG}"; then
- echo "error: android-ndk suffix must be a valid emulator image (${ANDROID_EMU_IMG})" >&2
+ error "android-ndk suffix must be a valid emulator image (${ANDROID_EMU_IMG})" >&2
exit 1
fi
ARCH=$(arch_of_emu_img ${ANDROID_EMU_IMG})
@@ -800,9 +837,9 @@ android-ndk-*)
# directories.
adb shell mkdir -p /data/local/tmp/adb_run
adb push "${BUILD_DIR}/lib/libc++_shared.so" /data/local/tmp/libc++/libc++_shared.so
- echo "+++ Running the libc++ tests"
+ step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}" check-cxx
- echo "+++ Running the libc++abi tests"
+ step "Running the libc++abi tests"
${NINJA} -vC "${BUILD_DIR}" check-cxxabi
;;
#################################################################
@@ -818,3 +855,5 @@ android-ndk-*)
exit 1
;;
esac
+
+endstep # Make sure we close any still-open output group
|
ldionne
force-pushed
the
review/add-output-groups
branch
from
October 9, 2024 19:04
34515ef
to
4f53f1e
Compare
This improves the CI output by providing collapsable sections for sub-parts of our build.
ldionne
force-pushed
the
review/add-output-groups
branch
from
October 10, 2024 12:23
4f53f1e
to
613076b
Compare
ichaer
added a commit
to splunk/ichaer-llvm-project
that referenced
this pull request
Oct 11, 2024
…ent-indentonly * llvm-trunk/main: (6379 commits) [gn build] Port 1c94388 [RISCV] Introduce VLOptimizer pass (llvm#108640) [mlir][vector] Add more tests for ConvertVectorToLLVM (7/n) (llvm#111895) [libc++] Add output groups to run-buildbot (llvm#111739) [libc++abi] Remove unused LIBCXXABI_LIBCXX_INCLUDES CMake option (llvm#111824) [clang] Ignore inline namespace for `hasName` (llvm#109147) [AArch64] Disable consecutive store merging when Neon is unavailable (llvm#111519) [lldb] Fix finding make tool for tests (llvm#111980) Turn `-Wdeprecated-literal-operator` on by default (llvm#111027) [AMDGPU] Rewrite RegSeqNames using !foreach. NFC. (llvm#111994) Revert "Reland: [clang] Finish implementation of P0522 (llvm#111711)" Revert "[clang] CWG2398: improve overload resolution backwards compat (llvm#107350)" Revert "[clang] Implement TTP P0522 pack matching for deduced function template calls. (llvm#111457)" [Clang] Replace Intrinsic::getDeclaration with getOrInsertDeclaration (llvm#111990) Revert "[NVPTX] Prefer prmt.b32 over bfi.b32 (llvm#110766)" [RISCV] Add DAG combine to turn (sub (shl X, 8-Y), (shr X, Y)) into orc.b (llvm#111828) [libc] Fix compilation of new trig functions (llvm#111987) [NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (llvm#111752) [NFC][CodingStandard] Add additional example for if-else brace rule (llvm#111733) CodeGen: Remove redundant REQUIRES registered-target from tests (llvm#111982) ...
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 <eric@efcs.ca>
bricknerb
pushed a commit
to bricknerb/llvm-project
that referenced
this pull request
Oct 17, 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 <eric@efcs.ca>
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.
This was originally opened as #75233.