[llvm] [ci] add all projects as dependencies of ci (PR #136153)
Matheus Izvekov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 18 11:59:04 PDT 2025
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/136153
>From 964471ed63451e80fb755604ac8292df6b663e50 Mon Sep 17 00:00:00 2001
From: Matheus Izvekov <mizvekov at gmail.com>
Date: Thu, 17 Apr 2025 13:04:05 -0300
Subject: [PATCH] [ci] add all projects as dependencies of ci
Add all projects as dependencies of .ci, to make sure everything is
tested when it changes.
---
.ci/compute_projects.py | 10 ++++++----
.ci/compute_projects_test.py | 17 +++++++++++++++++
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index ff43547c9bbe5..17a2136a270d5 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -52,6 +52,9 @@
"clang": {"clang-tools-extra", "compiler-rt", "cross-project-tests"},
"clang-tools-extra": {"libc"},
"mlir": {"flang"},
+ # Test everything if ci scripts are changed.
+ # FIXME: Figure out what is missing and add here.
+ ".ci": {"llvm", "clang", "lld", "lldb"},
}
DEPENDENT_RUNTIMES_TO_TEST = {"clang": {"libcxx", "libcxxabi", "libunwind"}}
@@ -130,12 +133,11 @@ def _add_dependencies(projects: Set[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:
- # Skip all projects where we cannot run tests.
- if modified_project not in PROJECT_CHECK_TARGETS:
- continue
if modified_project in RUNTIMES:
continue
- projects_to_test.add(modified_project)
+ # 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]:
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index e787fd8133c86..f71b56d2525ba 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -188,6 +188,23 @@ def test_exclude_gn(self):
self.assertEqual(env_variables["runtimes_to_build"], "")
self.assertEqual(env_variables["runtimes_check_targets"], "")
+ def test_ci(self):
+ env_variables = compute_projects.get_env_variables(
+ [".ci/compute_projects.py"], "Linux"
+ )
+ self.assertEqual(env_variables["projects_to_build"], "clang;lld;llvm;lldb")
+ self.assertEqual(
+ env_variables["project_check_targets"],
+ "check-clang check-lld check-llvm check-lldb",
+ )
+ self.assertEqual(
+ env_variables["runtimes_to_build"], "libcxx;libcxxabi;libunwind"
+ )
+ self.assertEqual(
+ env_variables["runtimes_check_targets"],
+ "check-cxx check-cxxabi check-unwind",
+ )
+
if __name__ == "__main__":
unittest.main()
More information about the llvm-commits
mailing list