Skip to content

Commit c90658d

Browse files
committed
Merge with Conflict Markers
CONFLICT (modify/delete): libclc/clc/include/clc/math/clc_sincos_piby4.inc deleted in 54c4ef2 and modified in HEAD. Version HEAD of libclc/clc/include/clc/math/clc_sincos_piby4.inc left in tree. CONFLICT (content): Merge conflict in llvm/docs/SPIRVUsage.rst CONFLICT (content): Merge conflict in llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td CONFLICT (content): Merge conflict in llvm/lib/Target/SPIRV/SPIRVUtils.h
2 parents 8b0d54a + 54c4ef2 commit c90658d

File tree

9,335 files changed

+809127
-179243
lines changed

Some content is hidden

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

9,335 files changed

+809127
-179243
lines changed

.ci/generate_test_report_github.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88

99
import generate_test_report_lib
1010

11-
PLATFORM_TITLES = {
12-
"Windows": ":window: Windows x64 Test Results",
13-
"Linux": ":penguin: Linux x64 Test Results",
14-
}
11+
def compute_platform_title() -> str:
12+
logo = ":window:" if platform.system() == "Windows" else ":penguin:"
13+
# On Linux the machine value is x86_64 on Windows it is AMD64.
14+
if platform.machine() == "x86_64" or platform.machine() == "AMD64":
15+
arch = "x64"
16+
else:
17+
arch = platform.machine()
18+
return f"{logo} {platform.system()} {arch} Test Results"
19+
1520

1621
if __name__ == "__main__":
1722
parser = argparse.ArgumentParser()
@@ -22,7 +27,7 @@
2227
args = parser.parse_args()
2328

2429
report = generate_test_report_lib.generate_report_from_files(
25-
PLATFORM_TITLES[platform.system()], args.return_code, args.build_test_logs
30+
compute_platform_title(), args.return_code, args.build_test_logs
2631
)
2732

2833
print(report)

.ci/premerge_advisor_explain.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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 for getting explanations from the premerge advisor."""
5+
6+
import argparse
7+
import os
8+
import platform
9+
import sys
10+
11+
import requests
12+
13+
import generate_test_report_lib
14+
15+
PREMERGE_ADVISOR_URL = (
16+
"http://premerge-advisor.premerge-advisor.svc.cluster.local:5000/explain"
17+
)
18+
19+
20+
def main(commit_sha: str, build_log_files: list[str]):
21+
junit_objects, ninja_logs = generate_test_report_lib.load_info_from_files(
22+
build_log_files
23+
)
24+
test_failures = generate_test_report_lib.get_failures(junit_objects)
25+
current_platform = f"{platform.system()}-{platform.machine()}".lower()
26+
explanation_request = {
27+
"base_commit_sha": commit_sha,
28+
"platform": current_platform,
29+
"failures": [],
30+
}
31+
if test_failures:
32+
for _, failures in test_failures.items():
33+
for name, failure_messsage in failures:
34+
explanation_request["failures"].append(
35+
{"name": name, "message": failure_messsage}
36+
)
37+
else:
38+
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
39+
for name, failure_message in ninja_failures:
40+
explanation_request["failures"].append(
41+
{"name": name, "message": failure_message}
42+
)
43+
advisor_response = requests.get(PREMERGE_ADVISOR_URL, json=explanation_request)
44+
if advisor_response.status_code == 200:
45+
print(advisor_response.json())
46+
else:
47+
print(advisor_response.reason)
48+
49+
50+
if __name__ == "__main__":
51+
parser = argparse.ArgumentParser()
52+
parser.add_argument("commit_sha", help="The base commit SHA for the test.")
53+
parser.add_argument(
54+
"build_log_files", help="Paths to JUnit report files and ninja logs.", nargs="*"
55+
)
56+
args = parser.parse_args()
57+
58+
# Skip looking for results on AArch64 for now because the premerge advisor
59+
# service is not available on AWS currently.
60+
if platform.machine() == "arm64":
61+
sys.exit(0)
62+
63+
main(args.commit_sha, args.build_log_files)

.ci/premerge_advisor_upload.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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 for uploading results to the premerge advisor."""
5+
6+
import argparse
7+
import os
8+
import platform
9+
import sys
10+
11+
import requests
12+
13+
import generate_test_report_lib
14+
15+
PREMERGE_ADVISOR_URL = (
16+
"http://premerge-advisor.premerge-advisor.svc.cluster.local:5000/upload"
17+
)
18+
19+
20+
def main(commit_sha, workflow_run_number, build_log_files):
21+
junit_objects, ninja_logs = generate_test_report_lib.load_info_from_files(
22+
build_log_files
23+
)
24+
test_failures = generate_test_report_lib.get_failures(junit_objects)
25+
source = "pull_request" if "GITHUB_ACTIONS" in os.environ else "postcommit"
26+
failure_info = {
27+
"source_type": source,
28+
"base_commit_sha": commit_sha,
29+
"source_id": workflow_run_number,
30+
"failures": [],
31+
}
32+
if test_failures:
33+
for name, failure_message in test_failures:
34+
failure_info["failures"].append({"name": name, "message": failure_message})
35+
else:
36+
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
37+
for name, failure_message in ninja_failures:
38+
failure_info["failures"].append({"name": name, "message": failure_message})
39+
requests.post(PREMERGE_ADVISOR_URL, json=failure_info)
40+
41+
42+
if __name__ == "__main__":
43+
parser = argparse.ArgumentParser()
44+
parser.add_argument("commit_sha", help="The base commit SHA for the test.")
45+
parser.add_argument("workflow_run_number", help="The run number from GHA.")
46+
parser.add_argument(
47+
"build_log_files", help="Paths to JUnit report files and ninja logs.", nargs="*"
48+
)
49+
args = parser.parse_args()
50+
51+
# Skip uploading results on AArch64 for now because the premerge advisor
52+
# service is not available on AWS currently.
53+
if platform.machine() == "arm64":
54+
sys.exit(0)
55+
56+
main(args.commit_sha, args.workflow_run_number, args.build_log_files)

.ci/utils.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ function start-group {
5252
echo "Starting $groupname"
5353
fi
5454
}
55+
56+
export PIP_BREAK_SYSTEM_PACKAGES=1
57+
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
58+
59+
# The ARM64 builders run on AWS and don't have access to the GCS cache.
60+
if [[ "$GITHUB_ACTIONS" != "" ]] && [[ "$RUNNER_ARCH" != "ARM64" ]]; then
61+
python .ci/cache_lit_timing_files.py download
62+
fi

0 commit comments

Comments
 (0)