[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: Committed as 681fc40d68936f145963207236d62886e5a34e5d https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -1,82 +0,0 @@ -#===--===## ldionne wrote: I did check and it can be removed. I wrote that script so hopefully I’m not mistaken! I will also go and clean up (remove the clang-ci pipeline on Buildkite, since it’s not used anymore). I will wait a week begore doing so to avoid breaking any ongoing PR that might trigger it. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -1,82 +0,0 @@ -#===--===## Endilll wrote: I decided to keep it intact out of caution, and asked on Discord instead whether this file is still needed. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -1,82 +0,0 @@ -#===--===## ldionne wrote: `clang/utils/ci/run-buildbot` can be removed too, I think. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + ldionne wrote: It seems that we disagree on the approach taken here. I won't block you from merging the patch even though I think it's not the right approach, but I had to explain my thoughts on it. > If you're willing to do the work in a reasonable time (remember we're > reducing CI pressure here), you can take over this PR or I can abandon it. I > personally had enough of bash scripting to iterate on this immediately. I can't commit to that, I'm already overcommitted for libc++ work. Like I said, while I think this is not a great approach, I won't block you from going forward with it. It does achieve better overall throughput for the CI pipeline, so it's not like this approach has no benefits at all. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/17] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + Endilll wrote: > 1. It's not parallelized anymore Performance that we get from parallelization only helps when there's low amount of PRs to test to begin with (so we have idle agents). This is not the case we need to focus on at the moment > 2. If one job fails, you don't get signal from whether the other jobs would > fail too Sure, but I consider it minor. Nothing stop us from iterating on this later. > 3. The reporting on Github is going to be confusing because everything will > be under the same job Entirety of the reporting for Clang PRs has been single `buildkite/github-pull-requests` entry, and even with the very recent change that enabled per-job reporting, libc++ jobs haven't been reported. So this patch doesn't regress anything for Clang contributors. We still have the primary piece of information whether the CI passed or not. Again, we can iterate on this later. > 4. This doesn't scale if we want to add more testing to be done against the > just-built Clang Additional Clang testing has scaling problems either way, because as I mentioned earlier, splitting jobs only helps when there are free agents to begin with. > Instead, I would suggest changing generate-buildkite-pipeline so that it adds > additional steps to the pipeline when we're testing Clang. These steps can > communicate via artifacts uploading/downloading like they used to. If you're willing to do the work in a reasonable time (remember we're reducing CI pressure here), you can take over this PR or I can abandon it. I personally had enough of bash scripting to iterate on this immediately. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" Endilll wrote: Fixed. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ Endilll wrote: Thank you! This should be fixed now. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/16] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ ldionne wrote: We should install Clang in a directory above, and then use `/bin/clang++` here. That way stuff like the compiler-rt headers would be installed properly. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" ldionne wrote: ```suggestion -D LIBCXX_CXX_ABI=libcxxabi \ -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ -D LIBCXX_TEST_PARAMS="std=c++03" \ -D LIBCXXABI_TEST_PARAMS="std=c++03" ``` etc.. for consistency with above. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/ldionne requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + ldionne wrote: I don't think it makes sense to serialize all these different jobs and put them in the same script. Doing this has several downsides: 1. It's not parallelized anymore 2. If one job fails, you don't get signal from whether the other jobs would fail too 3. The reporting on Github is going to be confusing because everything will be under the same job 4. This doesn't scale if we want to add more testing to be done against the just-built Clang Instead, I would suggest changing `generate-buildkite-pipeline` so that it adds additional steps to the pipeline when we're testing Clang. These steps can communicate via artifacts uploading/downloading like they used to. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
llvmbot wrote: @llvm/pr-subscribers-libcxx @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes Following the discussion in https://github.com/llvm/llvm-project/pull/93233#issuecomment-2127920882, this patch merges `clang-ci` pipeline into main `GitHub Pull Requests` pipeline. `clang-ci` enables additional test coverage for Clang by compiling it, and then using it to compile and tests libc++, libc++abi, and libunwind in C++03, C++26, and Clang Modules modes. Additional work we skip and total time savings we should see: 1. Checking out the repo to generate the clang-ci pipeline (2 minutes) 2. Building Clang (3.5 minutes) 3. Uploading the artifacts once, then downloading them 3 times and unpacking 3 times (0.5 minutes) Note that because previously-split jobs for each mode are now under a single Linux job, it now takes around 8 minutes more see the Linux CI results despite total time savings. The primary goal of this patch is to reduce the load of CI by removing duplicated work. I consider this goal achieved. I could keep the job parallelism we had (3 libc++ jobs depending on a main Linux job), but I don't consider it worth the effort and opportunity cost, because parallelism is not helping once the pool of builders is fully subscribed. --- Full diff: https://github.com/llvm/llvm-project/pull/93318.diff 3 Files Affected: - (modified) .ci/generate-buildkite-pipeline-premerge (+30-12) - (modified) .ci/monolithic-linux.sh (+65) - (removed) clang/utils/ci/buildkite-pipeline.yml (-82) ``diff diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..3ed5eb96eceb5 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +;; +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -207,17 +232,6 @@ if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cma EOF fi -# If clang changed. -if echo "$modified_dirs" | grep -q -E "^(clang)$"; then - cat
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
Endilll wrote: > You may want to have someone double-checkout those new libcxx jobs. Sure. libc++ jobs are not really new: I basically copied them over from https://github.com/llvm/llvm-project/blob/b9d40a7ae4b3e5b9829eca8a497637c9fab6dd3e/clang/utils/ci/run-buildbot#L94-L147 https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/tstellar approved this pull request. This seems OK to me at first glance. You may want to have someone double-checkout those new libcxx jobs. I'm not really familiar with those. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" tstellar wrote: OK, makes sense. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
Endilll wrote: > Can we also delete > https://github.com/llvm/llvm-project/blob/main/clang/utils/ci/buildkite-pipeline.yml Done. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/13] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll ready_for_review https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" Endilll wrote: No, because they are not on the list of all projects. You can check for yourself in the build I linked above. It says `./.ci/monolithic-linux.sh "clang;clang;lld;clang-tools-extra;compiler-rt;llvm" "check-all check-clang check-clang-tools" "libcxx;libcxxabi;libunwind" "check-cxx check-cxxabi check-unwind"` There are definitely other approaches to implementing what I do here, but I tried to stick to the ways script has been structured. https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/tstellar commented: Can we also delete https://github.com/llvm/llvm-project/blob/main/clang/utils/ci/buildkite-pipeline.yml https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
@@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" tstellar wrote: Won't this also add these check targets to the main build? Do we need that if we have separate steps now for building and testing the runtimes? https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/tstellar edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/12] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
Endilll wrote: https://buildkite.com/llvm-project/github-pull-requests/builds/67044#018fab83-257d-446a-9ec2-3faab776dfa8 has both new additions and `clang-ci` run at the same time. `clang-ci` took 15 minutes, Linux run of GitHub Pull requests pipeline that does what `clang-ci` does on top of what it has been doing took 22.5 minutes. It used to take anywhere between 8 and 12 minutes based on a recently completed builds I see. Based on the steps that we don't need to do anymore, we should be saving 4-6 minutes per build: 1) Checking out the repo to generate the pipeline (2 minutes) 2) Build Clang (3.5 minutes) 3) Upload the artifacts, download them 3 times and unpack 3 times (0.5 minutes) https://github.com/llvm/llvm-project/pull/93318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 01/10] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/9] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/8] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/7] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/6] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/5] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/4] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +
[clang] [llvm] [clang][ci] Move libc++ testing into the main PR pipeline (PR #93318)
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/93318 >From 16ec4c725d86020831541a64bada8f4629a0972c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 24 May 2024 19:15:54 +0300 Subject: [PATCH 1/3] [clang][ci] Move libc++ testing into the main PR pipeline --- .ci/generate-buildkite-pipeline-premerge | 31 ++- .ci/monolithic-linux.sh | 65 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/.ci/generate-buildkite-pipeline-premerge b/.ci/generate-buildkite-pipeline-premerge index e1c66ac18e7ac..d563fa6a01120 100755 --- a/.ci/generate-buildkite-pipeline-premerge +++ b/.ci/generate-buildkite-pipeline-premerge @@ -85,6 +85,22 @@ function compute-projects-to-test() { done } +function compute-runtimes-to-test() { + projects=${@} + for project in ${projects}; do +echo "${project}" +case ${project} in +clang) + for p in libcxx libcxxabi libunwind; do +echo $p + done +*) + # Nothing to do +;; +esac + done +} + function add-dependencies() { projects=${@} for project in ${projects}; do @@ -178,6 +194,15 @@ function check-targets() { cross-project-tests) echo "check-cross-project" ;; +libcxx) + echo "check-cxx" +;; +libcxxabi) + echo "check-cxxabi" +;; +libunwind) + echo "check-unwind" +;; lldb) echo "check-all" # TODO: check-lldb may not include all the LLDB tests? ;; @@ -231,6 +256,10 @@ linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_pro linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq) linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq) +linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test}) +linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq) +linux_runtimes=$(${linux_runtimes_to_test} | sort | uniq) + windows_projects_to_test=$(exclude-windows $(compute-projects-to-test ${modified_projects})) windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq) windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq) @@ -255,7 +284,7 @@ if [[ "${linux_projects}" != "" ]]; then CC: 'clang' CXX: 'clang++' commands: - - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})"' + - './.ci/monolithic-linux.sh "$(echo ${linux_projects} | tr ' ' ';')" "$(echo ${linux_check_targets})" "$(echo ${linux_runtimes} | tr ' ' ';')" "$(echo ${linux_runtime_check_targets})"' EOF fi diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh index b00a4b984a1d2..bbd90f7d496b1 100755 --- a/.ci/monolithic-linux.sh +++ b/.ci/monolithic-linux.sh @@ -54,3 +54,68 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ echo "--- ninja" # Targets are not escaped as they are passed as separate arguments. ninja -C "${BUILD_DIR}" -k 0 ${targets} + +runtimes="${3}" +runtime_targets="${4}" + +# Compiling runtimes with just-built Clang and running their tests +# as an additional testing for Clang. +if [[ "${runtimes}" != "" ]]; then + if [[ "${runtime_targets}" == "" ]]; then +echo "Runtimes to build are specified, but targets are not." + fi + + RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes" + INSTALL_DIR="${RUNTIMES_BUILD_DIR}/install" + mkdir -p ${RUNTIMES_BUILD_DIR} + + echo "--- cmake runtimes C++03" + + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++03" \ + -DLIBCXXABI_TEST_PARAMS="std=c++03" + + echo "--- ninja runtimes C++03" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes C++26" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ + -DLLVM_ENABLE_RUNTIMES="${runtimes}" \ + -DLIBCXX_CXX_ABI=libcxxabi \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ + -DLIBCXX_TEST_PARAMS="std=c++26" \ + -DLIBCXXABI_TEST_PARAMS="std=c++26" + + echo "--- ninja runtimes C++26" + + ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets} + + echo "--- cmake runtimes clang modules" + + rm -rf "${RUNTIMES_BUILD_DIR}" + cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \ + -DCMAKE_C_COMPILER="${BUILD_DIR}/bin/clang" \ + -DCMAKE_CXX_COMPILER="${BUILD_DIR}/bin/clang++" \ +