Skip to content

Commit ab46c8e

Browse files
Merged main:c9d90f15af0c into origin/amd-gfx:94d416280743
Local branch origin/amd-gfx 94d4162 Merged main:22138720020d into origin/amd-gfx:b04ccdbe3eb1 Remote branch main c9d90f1 [Exegesis][AArch64] Use more generic cycles counter (llvm#133376)
2 parents 94d4162 + c9d90f1 commit ab46c8e

File tree

926 files changed

+61679
-53936
lines changed

Some content is hidden

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

926 files changed

+61679
-53936
lines changed

.ci/compute-projects.sh

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

.ci/compute_projects.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ 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
197203
modified_projects.add(pathlib.Path(modified_file).parts[0])
198204
return modified_projects
199205

.ci/compute_projects_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ 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+
173182

174183
if __name__ == "__main__":
175184
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

.ci/generate_test_report_github.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
"""Script to generate a build report for Github."""
5+
6+
import argparse
7+
8+
import generate_test_report_lib
9+
10+
if __name__ == "__main__":
11+
parser = argparse.ArgumentParser()
12+
parser.add_argument(
13+
"title", help="Title of the test report, without Markdown formatting."
14+
)
15+
parser.add_argument("return_code", help="The build's return code.", type=int)
16+
parser.add_argument("junit_files", help="Paths to JUnit report files.", nargs="*")
17+
args = parser.parse_args()
18+
19+
report, _ = generate_test_report_lib.generate_report_from_files(
20+
args.title, args.return_code, args.junit_files, None
21+
)
22+
23+
print(report)

.ci/monolithic-linux.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ function at-exit {
4040
then
4141
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_buildkite.py ":linux: Linux x64 Test Results" \
4242
"linux-x64-test-results" $retcode "${BUILD_DIR}"/test-results.*.xml
43+
else
44+
python3 "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":linux: Linux x64 Test Results" \
45+
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
4346
fi
4447
}
4548
trap at-exit EXIT

.ci/monolithic-windows.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ function at-exit {
3939
then
4040
python "${MONOREPO_ROOT}"/.ci/generate_test_report_buildkite.py ":windows: Windows x64 Test Results" \
4141
"windows-x64-test-results" $retcode "${BUILD_DIR}"/test-results.*.xml
42+
else
43+
python "${MONOREPO_ROOT}"/.ci/generate_test_report_github.py ":windows: Windows x64 Test Results" \
44+
$retcode "${BUILD_DIR}"/test-results.*.xml >> $GITHUB_STEP_SUMMARY
4245
fi
4346
}
4447
trap at-exit EXIT

.github/workflows/pr-code-format.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,16 @@ jobs:
2121
- name: Fetch LLVM sources
2222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
with:
24-
ref: ${{ github.event.pull_request.head.sha }}
25-
26-
- name: Checkout through merge base
27-
uses: rmacklin/fetch-through-merge-base@bfe4d03a86f9afa52bc1a70e9814fc92a07f7b75 # v0.3.0
28-
with:
29-
base_ref: ${{ github.event.pull_request.base.ref }}
30-
head_ref: ${{ github.event.pull_request.head.sha }}
31-
deepen_length: 500
24+
fetch-depth: 2
3225

3326
- name: Get changed files
3427
id: changed-files
3528
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
3629
with:
3730
separator: ","
3831
skip_initial_fetch: true
32+
base_sha: 'HEAD~1'
33+
sha: 'HEAD'
3934

4035
# We need to pull the script from the main branch, so that we ensure
4136
# we get the latest version of this script.
@@ -89,8 +84,8 @@ jobs:
8984
--write-comment-to-file \
9085
--token ${{ secrets.GITHUB_TOKEN }} \
9186
--issue-number $GITHUB_PR_NUMBER \
92-
--start-rev $(git merge-base $START_REV $END_REV) \
93-
--end-rev $END_REV \
87+
--start-rev HEAD~1 \
88+
--end-rev HEAD \
9489
--changed-files "$CHANGED_FILES"
9590
9691
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0

0 commit comments

Comments
 (0)