diff --git a/.ci/compute_projects.py b/.ci/compute_projects.py index 7445e92eba1b..ff43547c9bbe 100644 --- a/.ci/compute_projects.py +++ b/.ci/compute_projects.py @@ -200,6 +200,11 @@ def _get_modified_projects(modified_files: list[str]) -> Set[str]: # documentation builds. if len(path_parts) > 2 and path_parts[1] == "docs": continue + # Exclude files for the gn build. We do not test it within premerge + # and changes occur often enough that they otherwise take up + # capacity. + if len(path_parts) > 3 and path_parts[:3] == ("llvm", "utils", "gn"): + continue modified_projects.add(pathlib.Path(modified_file).parts[0]) return modified_projects diff --git a/.ci/compute_projects_test.py b/.ci/compute_projects_test.py index 1807337aefed..e787fd8133c8 100644 --- a/.ci/compute_projects_test.py +++ b/.ci/compute_projects_test.py @@ -179,6 +179,15 @@ class TestComputeProjects(unittest.TestCase): self.assertEqual(env_variables["runtimes_to_build"], "") self.assertEqual(env_variables["runtimes_check_targets"], "") + def test_exclude_gn(self): + env_variables = compute_projects.get_env_variables( + ["llvm/utils/gn/build/BUILD.gn"], "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"], "") + if __name__ == "__main__": unittest.main()