aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Grossman <aidengrossman@google.com>2025-07-24 06:33:37 -0700
committerGitHub <noreply@github.com>2025-07-24 06:33:37 -0700
commit08e7c17c7aa923f057d3769457eaa267da37bb96 (patch)
tree9898b0d593ff19f9d54e741b66bd264f56e0272e
parentb5c879515350a2cfac3567839f471182333ab4be (diff)
downloadllvm-08e7c17c7aa923f057d3769457eaa267da37bb96.zip
llvm-08e7c17c7aa923f057d3769457eaa267da37bb96.tar.gz
llvm-08e7c17c7aa923f057d3769457eaa267da37bb96.tar.bz2
[CI] Test All Projects On Workflow Changes
This patch makes it so that we actually run all the tests when we touch the workflow file in .github/workflows/premerge.yaml. Before this we would not run any tests and it was annoying to have to manually touch a file to get something to trigger. Reviewers: Keenuts, lnihlen, cmtice, dschuff, gburgessiv Reviewed By: gburgessiv Pull Request: https://github.com/llvm/llvm-project/pull/150250
-rw-r--r--.ci/compute_projects.py1
-rw-r--r--.ci/compute_projects_test.py35
2 files changed, 36 insertions, 0 deletions
diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py
index 873aefc..be3d8f4 100644
--- a/.ci/compute_projects.py
+++ b/.ci/compute_projects.py
@@ -154,6 +154,7 @@ META_PROJECTS = {
("clang", "include", "clang", "CIR"): "CIR",
("*", "docs"): "docs",
("llvm", "utils", "gn"): "gn",
+ (".github", "workflows", "premerge.yaml"): ".ci",
}
# Projects that should not run any tests. These need to be metaprojects.
diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py
index 1bbcd8a..b401fb2 100644
--- a/.ci/compute_projects_test.py
+++ b/.ci/compute_projects_test.py
@@ -308,6 +308,41 @@ class TestComputeProjects(unittest.TestCase):
self.assertEqual(env_variables["runtimes_check_targets"], "check-libc")
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
+ def test_premerge_workflow(self):
+ env_variables = compute_projects.get_env_variables(
+ [".github/workflows/premerge.yaml"], "Linux"
+ )
+ self.assertEqual(
+ env_variables["projects_to_build"],
+ "bolt;clang;clang-tools-extra;flang;libclc;lld;lldb;llvm;mlir;polly",
+ )
+ self.assertEqual(
+ env_variables["project_check_targets"],
+ "check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly",
+ )
+ self.assertEqual(
+ env_variables["runtimes_to_build"],
+ "compiler-rt;libc;libcxx;libcxxabi;libunwind",
+ )
+ self.assertEqual(
+ env_variables["runtimes_check_targets"],
+ "check-compiler-rt check-libc",
+ )
+ self.assertEqual(
+ env_variables["runtimes_check_targets_needs_reconfig"],
+ "check-cxx check-cxxabi check-unwind",
+ )
+
+ def test_other_github_workflow(self):
+ env_variables = compute_projects.get_env_variables(
+ [".github/workflows/docs.yml"], "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"], "")
+
if __name__ == "__main__":
unittest.main()