[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
This commit is contained in:
parent
b5c8795153
commit
08e7c17c7a
2 changed files with 36 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue