Skip to content

Commit 967dc03

Browse files
run 'git merge main'
2 parents 1f50494 + a36a67c commit 967dc03

File tree

8,350 files changed

+765168
-513766
lines changed

Some content is hidden

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

8,350 files changed

+765168
-513766
lines changed

.ci/metrics/metrics.py

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class JobMetrics:
2424
status: int
2525
created_at_ns: int
2626
workflow_id: int
27+
workflow_name: str
2728

2829

2930
@dataclass
@@ -43,40 +44,60 @@ def get_sampled_workflow_metrics(github_repo: github.Repository):
4344
Returns a list of GaugeMetric objects, containing the relevant metrics about
4445
the workflow
4546
"""
47+
queued_job_counts = {}
48+
running_job_counts = {}
4649

4750
# Other states are available (pending, waiting, etc), but the meaning
4851
# is not documented (See #70540).
4952
# "queued" seems to be the info we want.
50-
queued_workflow_count = len(
51-
[
52-
x
53-
for x in github_repo.get_workflow_runs(status="queued")
54-
if x.name in WORKFLOWS_TO_TRACK
55-
]
56-
)
57-
running_workflow_count = len(
58-
[
59-
x
60-
for x in github_repo.get_workflow_runs(status="in_progress")
61-
if x.name in WORKFLOWS_TO_TRACK
62-
]
63-
)
53+
for queued_workflow in github_repo.get_workflow_runs(status="queued"):
54+
if queued_workflow.name not in WORKFLOWS_TO_TRACK:
55+
continue
56+
for queued_workflow_job in queued_workflow.jobs():
57+
job_name = queued_workflow_job.name
58+
# Workflows marked as queued can potentially only have some jobs
59+
# queued, so make sure to also count jobs currently in progress.
60+
if queued_workflow_job.status == "queued":
61+
if job_name not in queued_job_counts:
62+
queued_job_counts[job_name] = 1
63+
else:
64+
queued_job_counts[job_name] += 1
65+
elif queued_workflow_job.status == "in_progress":
66+
if job_name not in running_job_counts:
67+
running_job_counts[job_name] = 1
68+
else:
69+
running_job_counts[job_name] += 1
70+
71+
for running_workflow in github_repo.get_workflow_runs(status="in_progress"):
72+
if running_workflow.name not in WORKFLOWS_TO_TRACK:
73+
continue
74+
for running_workflow_job in running_workflow.jobs():
75+
job_name = running_workflow_job.name
76+
if running_workflow_job.status != "in_progress":
77+
continue
78+
79+
if job_name not in running_job_counts:
80+
running_job_counts[job_name] = 1
81+
else:
82+
running_job_counts[job_name] += 1
6483

6584
workflow_metrics = []
66-
workflow_metrics.append(
67-
GaugeMetric(
68-
"workflow_queue_size",
69-
queued_workflow_count,
70-
time.time_ns(),
85+
for queued_job in queued_job_counts:
86+
workflow_metrics.append(
87+
GaugeMetric(
88+
f"workflow_queue_size_{queued_job}",
89+
queued_job_counts[queued_job],
90+
time.time_ns(),
91+
)
7192
)
72-
)
73-
workflow_metrics.append(
74-
GaugeMetric(
75-
"running_workflow_count",
76-
running_workflow_count,
77-
time.time_ns(),
93+
for running_job in running_job_counts:
94+
workflow_metrics.append(
95+
GaugeMetric(
96+
f"running_workflow_count_{running_job}",
97+
running_job_counts[running_job],
98+
time.time_ns(),
99+
)
78100
)
79-
)
80101
# Always send a hearbeat metric so we can monitor is this container is still able to log to Grafana.
81102
workflow_metrics.append(
82103
GaugeMetric("metrics_container_heartbeat", 1, time.time_ns())
@@ -157,7 +178,7 @@ def get_per_workflow_metrics(
157178
# longer in a testing state and we can directly assert the workflow
158179
# result.
159180
for step in workflow_job.steps:
160-
if step.conclusion != "success":
181+
if step.conclusion != "success" and step.conclusion != "skipped":
161182
job_result = 0
162183
break
163184

@@ -179,6 +200,7 @@ def get_per_workflow_metrics(
179200
job_result,
180201
created_at_ns,
181202
workflow_run.id,
203+
workflow_run.name,
182204
)
183205
)
184206

@@ -235,8 +257,6 @@ def upload_metrics(workflow_metrics, metrics_userid, api_key):
235257
def main():
236258
# Authenticate with Github
237259
auth = Auth.Token(os.environ["GITHUB_TOKEN"])
238-
github_object = Github(auth=auth)
239-
github_repo = github_object.get_repo("llvm/llvm-project")
240260

241261
grafana_api_key = os.environ["GRAFANA_API_KEY"]
242262
grafana_metrics_userid = os.environ["GRAFANA_METRICS_USERID"]
@@ -248,20 +268,19 @@ def main():
248268
# Enter the main loop. Every five minutes we wake up and dump metrics for
249269
# the relevant jobs.
250270
while True:
271+
github_object = Github(auth=auth)
272+
github_repo = github_object.get_repo("llvm/llvm-project")
273+
251274
current_metrics = get_per_workflow_metrics(github_repo, workflows_to_track)
252275
current_metrics += get_sampled_workflow_metrics(github_repo)
253-
# Always send a hearbeat metric so we can monitor is this container is still able to log to Grafana.
254-
current_metrics.append(
255-
GaugeMetric("metrics_container_heartbeat", 1, time.time_ns())
256-
)
257276

258277
upload_metrics(current_metrics, grafana_metrics_userid, grafana_api_key)
259278
print(f"Uploaded {len(current_metrics)} metrics", file=sys.stderr)
260279

261280
for workflow_metric in reversed(current_metrics):
262281
if isinstance(workflow_metric, JobMetrics):
263282
workflows_to_track[
264-
workflow_metric.job_name
283+
workflow_metric.workflow_name
265284
] = workflow_metric.workflow_id
266285

267286
time.sleep(SCRAPE_INTERVAL_SECONDS)

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci @yota9
132132

133133
# Bazel build system.
134-
/utils/bazel/ @rupprecht @keith
134+
/utils/bazel/ @rupprecht @keith @aaronmondal
135135

136136
# InstallAPI and TextAPI
137137
/llvm/**/TextAPI/ @cyndyishida

.github/new-prs-labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ clang:static analyzer:
499499
- clang/tools/scan-build/**
500500
- clang/utils/analyzer/**
501501
- clang/docs/analyzer/**
502+
- clang/test/Analysis/**
502503

503504
pgo:
504505
- llvm/lib/Transforms/Instrumentation/CGProfile.cpp

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
container-filename: ${{ steps.vars.outputs.container-filename }}
2828
steps:
2929
- name: Checkout LLVM
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3131
with:
3232
sparse-checkout: .github/workflows/containers/github-action-ci-windows
3333
- name: Write Variables
@@ -46,7 +46,7 @@ jobs:
4646
run: |
4747
docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
4848
- name: Upload container image
49-
uses: actions/upload-artifact@v4
49+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
5050
with:
5151
name: container
5252
path: ${{ steps.vars.outputs.container-filename }}
@@ -63,7 +63,7 @@ jobs:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
steps:
6565
- name: Download container
66-
uses: actions/download-artifact@v4
66+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
6767
with:
6868
name: container
6969
- name: Push Container

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: depot-ubuntu-22.04-arm-16
3333
steps:
3434
- name: Checkout LLVM
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
3737
sparse-checkout: .github/workflows/containers/github-action-ci/
3838
# podman is not installed by default on the ARM64 images.
@@ -66,7 +66,7 @@ jobs:
6666
podman save ${{ steps.vars.outputs.container-name-agent-tag }} > ${{ steps.vars.outputs.container-agent-filename }}
6767
6868
- name: Upload container image
69-
uses: actions/upload-artifact@v4
69+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
7070
with:
7171
name: container-${{ matrix.arch }}
7272
path: "*.tar"
@@ -90,7 +90,7 @@ jobs:
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9191
steps:
9292
- name: Download container
93-
uses: actions/download-artifact@v4
93+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
9494

9595
- name: Push Container
9696
run: |

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18+
build_type: [Debug, Release, MinSizeRel]
1819
include:
1920
- os: ubuntu-24.04
2021
ccache-variant: sccache
@@ -68,7 +69,7 @@ jobs:
6869
cmake -B ${{ steps.strings.outputs.build-output-dir }}
6970
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
7071
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
71-
-DCMAKE_BUILD_TYPE=MinSizeRel
72+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
7273
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7374
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
7475
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}

.github/workflows/libc-overlay-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
1717
fail-fast: false
1818
matrix:
19+
build_type: [Debug, Release, MinSizeRel]
1920
include:
2021
# TODO: add linux gcc when it is fixed
2122
- os: ubuntu-24.04
@@ -95,7 +96,7 @@ jobs:
9596
cmake -B ${{ steps.strings.outputs.build-output-dir }}
9697
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
9798
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
98-
-DCMAKE_BUILD_TYPE=MinSizeRel
99+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
99100
-DCMAKE_C_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
100101
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ matrix.ccache-variant }}
101102
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
stage1:
3838
if: github.repository_owner == 'llvm'
3939
runs-on: libcxx-self-hosted-linux
40-
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
40+
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
4141
continue-on-error: false
4242
strategy:
4343
fail-fast: false
@@ -48,8 +48,8 @@ jobs:
4848
'generic-cxx26',
4949
'generic-modules'
5050
]
51-
cc: [ 'clang-20' ]
52-
cxx: [ 'clang++-20' ]
51+
cc: [ 'clang-21' ]
52+
cxx: [ 'clang++-21' ]
5353
include:
5454
- config: 'generic-gcc'
5555
cc: 'gcc-14'
@@ -75,7 +75,7 @@ jobs:
7575
stage2:
7676
if: github.repository_owner == 'llvm'
7777
runs-on: libcxx-self-hosted-linux
78-
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
78+
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
7979
needs: [ stage1 ]
8080
continue-on-error: false
8181
strategy:
@@ -88,18 +88,22 @@ jobs:
8888
'generic-cxx20',
8989
'generic-cxx23'
9090
]
91-
cc: [ 'clang-20' ]
92-
cxx: [ 'clang++-20' ]
91+
cc: [ 'clang-21' ]
92+
cxx: [ 'clang++-21' ]
9393
include:
9494
- config: 'generic-gcc-cxx11'
9595
cc: 'gcc-14'
9696
cxx: 'g++-14'
97-
- config: 'generic-cxx23'
98-
cc: 'clang-18'
99-
cxx: 'clang++-18'
97+
- config: 'generic-cxx26'
98+
cc: 'clang-20'
99+
cxx: 'clang++-20'
100100
- config: 'generic-cxx26'
101101
cc: 'clang-19'
102102
cxx: 'clang++-19'
103+
# Release transition
104+
- config: 'generic-cxx23'
105+
cc: 'clang-18'
106+
cxx: 'clang++-18'
103107
steps:
104108
- uses: actions/checkout@v4
105109
- name: ${{ matrix.config }}
@@ -120,7 +124,7 @@ jobs:
120124
**/crash_diagnostics/*
121125
stage3:
122126
if: github.repository_owner == 'llvm'
123-
needs: [ stage1, stage2 ]
127+
needs: [ stage2 ]
124128
continue-on-error: false
125129
strategy:
126130
fail-fast: false
@@ -163,14 +167,14 @@ jobs:
163167
- config: 'generic-msan'
164168
machine: libcxx-self-hosted-linux
165169
runs-on: ${{ matrix.machine }}
166-
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
170+
container: ghcr.io/llvm/libcxx-linux-builder:b319dfef21f6c7b0bc6a356d6b9f41a3b3b98ae9
167171
steps:
168172
- uses: actions/checkout@v4
169173
- name: ${{ matrix.config }}
170174
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
171175
env:
172-
CC: clang-20
173-
CXX: clang++-20
176+
CC: clang-21
177+
CXX: clang++-21
174178
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
175179
if: always()
176180
with:
@@ -184,7 +188,7 @@ jobs:
184188
**/crash_diagnostics/*
185189
186190
macos:
187-
needs: [ stage1 ]
191+
needs: [ stage3 ]
188192
strategy:
189193
fail-fast: false
190194
matrix:
@@ -228,7 +232,7 @@ jobs:
228232
229233
windows:
230234
runs-on: windows-2022
231-
needs: [ stage1 ]
235+
needs: [ stage2 ]
232236
strategy:
233237
fail-fast: false
234238
matrix:
@@ -251,11 +255,11 @@ jobs:
251255
- name: Install a current LLVM
252256
if: ${{ matrix.mingw != true }}
253257
run: |
254-
choco install -y llvm --version=18.1.6 --allow-downgrade
258+
choco install -y llvm --version=19.1.7 --allow-downgrade
255259
- name: Install llvm-mingw
256260
if: ${{ matrix.mingw == true }}
257261
run: |
258-
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20240606/llvm-mingw-20240606-ucrt-x86_64.zip
262+
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250114/llvm-mingw-20250114-ucrt-x86_64.zip
259263
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
260264
del llvm-mingw*.zip
261265
mv llvm-mingw* c:\llvm-mingw

.github/workflows/libcxx-build-containers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ name: Build Docker images for libc++ CI
99

1010
permissions:
1111
contents: read
12-
packages: write
1312

1413
on:
1514
push:

0 commit comments

Comments
 (0)