Skip to content

[libc++] Add a CI job for the LLDB data formatters #65174

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions libcxx/utils/ci/buildkite-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,22 @@ steps:
limit: 2
timeout_in_minutes: 120

- label: "LLDB Data Formatters"
command: "libcxx/utils/ci/run-buildbot check-lldb-data-formatters"
artifact_paths:
- "**/test-results.xml"
env:
CC: "clang-${LLVM_HEAD_VERSION}"
CXX: "clang++-${LLVM_HEAD_VERSION}"
agents:
queue: "libcxx-builders"
os: "linux"
retry:
automatic:
- exit_status: -1 # Agent was lost
limit: 2
timeout_in_minutes: 120

# Other non-testing CI jobs
- label: "Benchmarks"
command: "libcxx/utils/ci/run-buildbot benchmarks"
Expand Down
18 changes: 18 additions & 0 deletions libcxx/utils/ci/run-buildbot
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ bootstrapping-build)
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_LIT_ARGS="-v --show-unsupported --xunit-xml-output test-results.xml --timeout=1500 --time-tests"

${NINJA} -vC "${BUILD_DIR}" install-clang install-clang-resource-headers
tar -cJvf install.tar.xz ${INSTALL_DIR}
buildkite-agent artifact upload --debug install.tar.xz

echo "+++ Running the libc++ and libc++abi tests"
${NINJA} -vC "${BUILD_DIR}" check-runtimes

Expand Down Expand Up @@ -580,6 +584,20 @@ benchmarks)
generate-cmake
check-cxx-benchmarks
;;
check-lldb-data-formatters)
clean
${CMAKE} \
-S "${MONOREPO_ROOT}/llvm" \
-B "${BUILD_DIR}" \
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLDB_ENABLE_PYTHON=ON \
-DLLVM_ENABLE_PROJECTS='llvm;clang;lldb' \
-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi'

${NINJA} -C "${BUILD_DIR}" check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this require building Clang?

If so, I don't think we can add this as a pre-commit check.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already build clang in the bootstrap build I think it makes sense to test it in that CI job. Or at least share the build artifacts of the bootstrap build and reuse it. This is similar what the clang CI does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that would build clang. Agree with @mordante , re-using the already built clang on the machine is what we do for our LLDB CI too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link to what you folks do there? Do you simply avoid adding clang to LLVM_ENABLE_PROJECTS? It's easy for me to upload the just-built Clang artifacts to Buildkite but I am not sure what I should do to reuse them from the LLDB build.

Copy link
Member

@Michael137 Michael137 Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using a "standalone" build of LLDB would make sense here? Correct me if I'm wrong @adrian-prantl @JDevlieghere
Here is how we configure it for the standalone bot: https://github.com/llvm/llvm-zorg/blob/3ecc17d4b9a6fc6e81d5d2265a4e4088267bd800/zorg/jenkins/monorepo_build.py#L632-L692

So if we have a clang build already, we can just point the LLDB build to those artifacts as follows:

                 '-DLLVM_DIR={}'.format(llvm_dir),
                 '-DClang_DIR={}'.format(clang_dir),

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant was to reuse the build of clang in our bootstrapping build.

;;
documentation)
clean
generate-cmake -DLLVM_ENABLE_SPHINX=ON
Expand Down