Skip to content

Commit dd8803d

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.6-beta.1 [skip ci]
2 parents 11de49f + 2b8cc65 commit dd8803d

File tree

6,162 files changed

+511218
-290555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,162 files changed

+511218
-290555
lines changed

.ci/compute-projects.sh

Lines changed: 0 additions & 194 deletions
This file was deleted.

.ci/compute_projects.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,17 @@ def _compute_runtime_check_targets(runtimes_to_test: Set[str]) -> Set[str]:
194194
def _get_modified_projects(modified_files: list[str]) -> Set[str]:
195195
modified_projects = set()
196196
for modified_file in modified_files:
197+
path_parts = pathlib.Path(modified_file).parts
198+
# Exclude files in the docs directory. They do not impact an test
199+
# targets and there is a separate workflow used for ensuring the
200+
# documentation builds.
201+
if len(path_parts) > 2 and path_parts[1] == "docs":
202+
continue
203+
# Exclude files for the gn build. We do not test it within premerge
204+
# and changes occur often enough that they otherwise take up
205+
# capacity.
206+
if len(path_parts) > 3 and path_parts[:3] == ("llvm", "utils", "gn"):
207+
continue
197208
modified_projects.add(pathlib.Path(modified_file).parts[0])
198209
return modified_projects
199210

.ci/compute_projects_test.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,24 @@ def test_exclude_runtiems_in_projects(self):
170170
self.assertEqual(env_variables["runtimes_to_build"], "")
171171
self.assertEqual(env_variables["runtimes_check_targets"], "")
172172

173+
def test_exclude_docs(self):
174+
env_variables = compute_projects.get_env_variables(
175+
["llvm/docs/CIBestPractices.rst"], "Linux"
176+
)
177+
self.assertEqual(env_variables["projects_to_build"], "")
178+
self.assertEqual(env_variables["project_check_targets"], "")
179+
self.assertEqual(env_variables["runtimes_to_build"], "")
180+
self.assertEqual(env_variables["runtimes_check_targets"], "")
181+
182+
def test_exclude_gn(self):
183+
env_variables = compute_projects.get_env_variables(
184+
["llvm/utils/gn/build/BUILD.gn"], "Linux"
185+
)
186+
self.assertEqual(env_variables["projects_to_build"], "")
187+
self.assertEqual(env_variables["project_check_targets"], "")
188+
self.assertEqual(env_variables["runtimes_to_build"], "")
189+
self.assertEqual(env_variables["runtimes_check_targets"], "")
190+
173191

174192
if __name__ == "__main__":
175193
unittest.main()

.ci/generate-buildkite-pipeline-premerge

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u)
5252
echo "Directories modified:" >&2
5353
echo "$modified_dirs" >&2
5454

55-
. ./.ci/compute-projects.sh
56-
5755
# Project specific pipelines.
5856

5957
# If libc++ or one of the runtimes directories changed.
@@ -73,20 +71,16 @@ fi
7371
# needs while letting them run on the infrastructure provided by LLVM.
7472

7573
# Figure out which projects need to be built on each platform
76-
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
77-
modified_projects="$(keep-modified-projects ${all_projects})"
78-
79-
linux_projects_to_test=$(exclude-linux $(compute-projects-to-test 0 ${modified_projects}))
80-
linux_check_targets=$(check-targets ${linux_projects_to_test} | sort | uniq)
81-
linux_projects=$(add-dependencies ${linux_projects_to_test} | sort | uniq)
74+
source <(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD | python3 .ci/compute_projects.py Linux)
75+
linux_projects=${projects_to_build}
76+
linux_check_targets=${project_check_targets}
77+
linux_runtimes=${runtimes_to_build}
78+
linux_runtime_check_targets=${runtimes_check_targets}
8279

83-
linux_runtimes_to_test=$(compute-runtimes-to-test ${linux_projects_to_test})
84-
linux_runtime_check_targets=$(check-targets ${linux_runtimes_to_test} | sort | uniq)
85-
linux_runtimes=$(echo ${linux_runtimes_to_test} | sort | uniq)
80+
source <(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD | python3 .ci/compute_projects.py Windows)
81+
windows_projects=${projects_to_build}
82+
windows_check_targets=${project_check_targets}
8683

87-
windows_projects_to_test=$(exclude-windows $(compute-projects-to-test 1 ${modified_projects}))
88-
windows_check_targets=$(check-targets ${windows_projects_to_test} | sort | uniq)
89-
windows_projects=$(add-dependencies ${windows_projects_to_test} | sort | uniq)
9084

9185
# Generate the appropriate pipeline
9286
if [[ "${linux_projects}" != "" ]]; then

0 commit comments

Comments
 (0)