Skip to content

Commit a1f32b5

Browse files
authored
Merge branch 'main' into fix-profgen-symbol
2 parents f34ab2d + c422881 commit a1f32b5

File tree

2,195 files changed

+100740
-63686
lines changed

Some content is hidden

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

2,195 files changed

+100740
-63686
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/generate_test_report_lib.py

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,23 @@ def _format_ninja_failures(ninja_failures: list[tuple[str, str]]) -> list[str]:
9898
)
9999
return output
100100

101+
def get_failures(junit_objects) -> dict[str, list[tuple[str, str]]]:
102+
failures = {}
103+
for results in junit_objects:
104+
for testsuite in results:
105+
for test in testsuite:
106+
if (
107+
not test.is_passed
108+
and test.result
109+
and isinstance(test.result[0], Failure)
110+
):
111+
if failures.get(testsuite.name) is None:
112+
failures[testsuite.name] = []
113+
failures[testsuite.name].append(
114+
(test.classname + "/" + test.name, test.result[0].text)
115+
)
116+
return failures
117+
101118

102119
# Set size_limit to limit the byte size of the report. The default is 1MB as this
103120
# is the most that can be put into an annotation. If the generated report exceeds
@@ -113,7 +130,7 @@ def generate_report(
113130
size_limit=1024 * 1024,
114131
list_failures=True,
115132
):
116-
failures = {}
133+
failures = get_failures(junit_objects)
117134
tests_run = 0
118135
tests_skipped = 0
119136
tests_failed = 0
@@ -124,18 +141,6 @@ def generate_report(
124141
tests_skipped += testsuite.skipped
125142
tests_failed += testsuite.failures
126143

127-
for test in testsuite:
128-
if (
129-
not test.is_passed
130-
and test.result
131-
and isinstance(test.result[0], Failure)
132-
):
133-
if failures.get(testsuite.name) is None:
134-
failures[testsuite.name] = []
135-
failures[testsuite.name].append(
136-
(test.classname + "/" + test.name, test.result[0].text)
137-
)
138-
139144
report = [f"# {title}", ""]
140145

141146
if tests_run == 0:
@@ -258,7 +263,7 @@ def plural(num_tests):
258263
return report
259264

260265

261-
def generate_report_from_files(title, return_code, build_log_files):
266+
def load_info_from_files(build_log_files):
262267
junit_files = [
263268
junit_file for junit_file in build_log_files if junit_file.endswith(".xml")
264269
]
@@ -271,6 +276,9 @@ def generate_report_from_files(title, return_code, build_log_files):
271276
ninja_logs.append(
272277
[log_line.strip() for log_line in ninja_log_file_handle.readlines()]
273278
)
274-
return generate_report(
275-
title, return_code, [JUnitXml.fromfile(p) for p in junit_files], ninja_logs
276-
)
279+
return [JUnitXml.fromfile(p) for p in junit_files], ninja_logs
280+
281+
282+
def generate_report_from_files(title, return_code, build_log_files):
283+
junit_objects, ninja_logs = load_info_from_files(build_log_files)
284+
return generate_report(title, return_code, junit_objects, ninja_logs)

.ci/metrics/metrics.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
GITHUB_JOB_TO_TRACK = {
4141
"github_llvm_premerge_checks": {
4242
"Build and Test Linux": "premerge_linux",
43+
"Build and Test Linux AArch64": "premerge_linux_aarch64",
4344
"Build and Test Windows": "premerge_windows",
4445
},
4546
"github_libcxx_premerge_checks": {

.ci/utils.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function start-group {
5656
export PIP_BREAK_SYSTEM_PACKAGES=1
5757
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
5858

59-
if [[ "$GITHUB_ACTIONS" != "" ]]; then
59+
# The ARM64 builders run on AWS and don't have access to the GCS cache.
60+
if [[ "$GITHUB_ACTIONS" != "" ]] && [[ "$RUNNER_ARCH" != "ARM64" ]]; then
6061
python .ci/cache_lit_timing_files.py download
6162
fi

.github/new-prs-labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,8 @@ clang:openmp:
10961096
- llvm/test/Transforms/OpenMP/**
10971097

10981098
clang:temporal-safety:
1099-
- clang/include/clang/Analysis/Analyses/LifetimeSafety*
1100-
- clang/lib/Analysis/LifetimeSafety*
1099+
- clang/include/clang/Analysis/Analyses/LifetimeSafety/**
1100+
- clang/lib/Analysis/LifetimeSafety/**
11011101
- clang/unittests/Analysis/LifetimeSafety*
11021102
- clang/test/Sema/*lifetime-safety*
11031103
- clang/test/Sema/*lifetime-analysis*

.github/workflows/build-ci-container-tooling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Test Container
7373
run: |
7474
# Use --pull=never to ensure we are testing the just built image.
75-
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-format-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-format --version | grep version && black --version | grep black'
75+
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-format-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-format --version | grep version && git-clang-format -h | grep usage && black --version | grep black'
7676
podman run --pull=never --rm -it ${{ steps.vars.outputs.container-name-lint-tag }} /usr/bin/bash -x -c 'cd $HOME && clang-tidy --version | grep version && clang-tidy-diff.py -h | grep usage'
7777
7878
push-ci-container:

.github/workflows/containers/github-action-ci-tooling/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RUN apt-get update && \
1010
tar -xvJf llvm.tar.xz -C /llvm-extract \
1111
# Only unpack these tools to save space on Github runner.
1212
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-tidy \
13-
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format && \
13+
LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
14+
LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format && \
1415
rm llvm.tar.xz
1516

1617

@@ -35,7 +36,9 @@ RUN apt-get update && \
3536
FROM base AS ci-container-code-format
3637
ARG LLVM_VERSION
3738

38-
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format ${LLVM_SYSROOT}/bin/clang-format
39+
COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/clang-format \
40+
/llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/git-clang-format \
41+
${LLVM_SYSROOT}/bin/
3942

4043
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
4144

.github/workflows/containers/github-action-ci-windows/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ RUN powershell -Command \
9090
RUN git config --system core.longpaths true & \
9191
git config --global core.autocrlf false
9292
93-
ARG RUNNER_VERSION=2.328.0
93+
ARG RUNNER_VERSION=2.329.0
9494
ENV RUNNER_VERSION=$RUNNER_VERSION
9595
9696
RUN powershell -Command \

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/ubuntu:24.04 AS base
22
ENV LLVM_SYSROOT=/opt/llvm
33

44
FROM base AS stage1-toolchain
5-
ENV LLVM_VERSION=21.1.1
5+
ENV LLVM_VERSION=21.1.3
66

77
RUN apt-get update && \
88
apt-get install -y \
@@ -62,7 +62,6 @@ RUN apt-get update && \
6262
# Having a symlink from python to python3 enables code sharing between
6363
# the Linux and Windows pipelines.
6464
python3-pip \
65-
python3-venv \
6665
file \
6766
tzdata \
6867
python-is-python3 && \
@@ -100,7 +99,7 @@ WORKDIR /home/gha
10099

101100
FROM ci-container AS ci-container-agent
102101

103-
ENV GITHUB_RUNNER_VERSION=2.328.0
102+
ENV GITHUB_RUNNER_VERSION=2.329.0
104103

105104
RUN mkdir actions-runner && \
106105
cd actions-runner && \

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

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
jobs:
1313
code_formatter:
1414
runs-on: ubuntu-24.04
15+
container:
16+
image: 'ghcr.io/llvm/ci-ubuntu-24.04-format'
1517
timeout-minutes: 30
1618
concurrency:
1719
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
@@ -23,6 +25,14 @@ jobs:
2325
with:
2426
fetch-depth: 2
2527

28+
# We need to set the repo checkout as safe, otherwise tj-actions/changed-files
29+
# will fail due to the changed ownership inside the container.
30+
# TODO(boomanaiden154): We should probably fix this by having the default user
31+
# in the container have the same ID as the GHA user on the host.
32+
- name: Set Safe Directory
33+
run: |
34+
chown -R root $(pwd)
35+
2636
- name: Get changed files
2737
id: changed-files
2838
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
@@ -39,24 +49,6 @@ jobs:
3949
echo "Formatting files:"
4050
echo "$CHANGED_FILES"
4151
42-
# The clang format version should always be upgraded to the first version
43-
# of a release cycle (x.1.0) or the last version of a release cycle, or
44-
# if there have been relevant clang-format backports.
45-
- name: Install clang-format
46-
uses: aminya/setup-cpp@a276e6e3d1db9160db5edc458e99a30d3b109949 # v1.7.1
47-
with:
48-
clangformat: 21.1.0
49-
50-
- name: Setup Python env
51-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
52-
with:
53-
python-version: '3.13'
54-
cache: 'pip'
55-
cache-dependency-path: 'llvm/utils/git/requirements_formatting.txt'
56-
57-
- name: Install python dependencies
58-
run: pip install -r llvm/utils/git/requirements_formatting.txt
59-
6052
- name: Run code formatter
6153
env:
6254
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)