[llvm] [CI] Run Linux premerge CI on libc++ changes. (PR #155188)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 25 10:46:46 PDT 2025
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/155188
>From 272d0319c0e34e7d82b263b12a70f175e5090307 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sun, 24 Aug 2025 19:25:32 +0000
Subject: [PATCH] [CI] Run Linux premerge CI on libc++ changes.
This is intended to catch failures like
https://lab.llvm.org/staging/#/builders/192/builds/1671 (LLDB formatter
related) before they end up landing in tree.
---
.ci/compute_projects.py | 20 +++++++++++---------
.ci/compute_projects_test.py | 32 ++++++++++++++++++++++----------
2 files changed, 33 insertions(+), 19 deletions(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 8567552fa25a6..179e6885b2b4b 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -31,6 +31,7 @@
"lld": {"llvm"},
"mlir": {"llvm"},
"polly": {"llvm"},
+ "libcxx": {"clang"},
}
# This mapping describes the additional projects that should be tested when a
@@ -66,6 +67,7 @@
"libclc",
"openmp",
},
+ "libcxx": {"lldb"},
}
# This mapping describes runtimes that should be enabled for a specific project,
@@ -86,6 +88,7 @@
"llvm": {"libcxx", "libcxxabi", "libunwind"},
"clang": {"libcxx", "libcxxabi", "libunwind"},
".ci": {"libcxx", "libcxxabi", "libunwind"},
+ "libcxx": {"libcxx"},
}
EXCLUDE_LINUX = {
@@ -197,20 +200,19 @@ def _exclude_projects(current_projects: Set[str], platform: str) -> Set[str]:
def _compute_projects_to_test(modified_projects: Set[str], platform: str) -> Set[str]:
projects_to_test = set()
for modified_project in modified_projects:
+ if modified_project in DEPENDENTS_TO_TEST:
+ for dependent_project in DEPENDENTS_TO_TEST[modified_project]:
+ if (
+ platform == "Windows"
+ and dependent_project in EXCLUDE_DEPENDENTS_WINDOWS
+ ):
+ continue
+ projects_to_test.add(dependent_project)
if modified_project in RUNTIMES:
continue
# Skip all projects where we cannot run tests.
if modified_project in PROJECT_CHECK_TARGETS:
projects_to_test.add(modified_project)
- if modified_project not in DEPENDENTS_TO_TEST:
- continue
- for dependent_project in DEPENDENTS_TO_TEST[modified_project]:
- if (
- platform == "Windows"
- and dependent_project in EXCLUDE_DEPENDENTS_WINDOWS
- ):
- continue
- projects_to_test.add(dependent_project)
projects_to_test = _exclude_projects(projects_to_test, platform)
return projects_to_test
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 7d780b51ca5d1..1f1620c16de96 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -239,16 +239,6 @@ def test_top_level_file(self):
self.assertEqual(env_variables["runtimes_check_targets"], "")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
- def test_exclude_libcxx_in_projects(self):
- env_variables = compute_projects.get_env_variables(
- ["libcxx/CMakeLists.txt"], "Linux"
- )
- self.assertEqual(env_variables["projects_to_build"], "")
- self.assertEqual(env_variables["project_check_targets"], "")
- self.assertEqual(env_variables["runtimes_to_build"], "")
- self.assertEqual(env_variables["runtimes_check_targets"], "")
- self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
-
def test_include_libc_in_runtimes(self):
env_variables = compute_projects.get_env_variables(
["libc/CMakeLists.txt"], "Linux"
@@ -413,6 +403,28 @@ def test_third_party_benchmark(self):
"check-cxx check-cxxabi check-unwind",
)
+ def test_libcxx_linux(self):
+ env_variables = compute_projects.get_env_variables(
+ ["libcxx/CMakeLists.txt"], "Linux"
+ )
+ self.assertEqual(env_variables["projects_to_build"], "clang;lldb;llvm")
+ self.assertEqual(env_variables["project_check_targets"], "check-lldb")
+ self.assertEqual(env_variables["runtimes_to_build"], "libcxx")
+ self.assertEqual(env_variables["runtimes_check_targets"], "")
+ self.assertEqual(
+ env_variables["runtimes_check_targets_needs_reconfig"], "check-cxx"
+ )
+
+ def test_libxx_windows(self):
+ env_variables = compute_projects.get_env_variables(
+ ["libcxx/CMakeLists.txt"], "Windows"
+ )
+ self.assertEqual(env_variables["projects_to_build"], "")
+ self.assertEqual(env_variables["project_check_targets"], "")
+ self.assertEqual(env_variables["runtimes_to_build"], "")
+ self.assertEqual(env_variables["runtimes_check_targets"], "")
+ self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
+
if __name__ == "__main__":
unittest.main()
More information about the llvm-commits
mailing list