Skip to content

Commit 546124e

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 6ccd593 + 959c3b6 commit 546124e

File tree

2,090 files changed

+57597
-33227
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,090 files changed

+57597
-33227
lines changed

.github/dependabot.yml

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6262
steps:
6363
- name: Download container
64-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
64+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
6565
with:
6666
name: container
6767
- name: Push Container

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8989
steps:
9090
- name: Download container
91-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
91+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
9292

9393
- name: Push Container
9494
run: |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767
steps:
6868
- name: Download Container
69-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
69+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
7070
with:
7171
name: container
7272
- name: Push Container

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
fetch-depth: 2
6161
- name: Get subprojects that have doc changes
6262
id: docs-changed-subprojects
63-
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
63+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
6464
with:
6565
skip_initial_fetch: true
6666
base_sha: 'HEAD~1'

.github/workflows/gha-codeql.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Github Actions CodeQL
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- main
10+
schedule:
11+
- cron: '30 0 * * *'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
codeql:
19+
name: 'Github Actions CodeQL'
20+
runs-on: ubuntu-24.04
21+
permissions:
22+
security-events: write
23+
steps:
24+
- name: Checkout LLVM
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
with:
27+
sparse-checkout: |
28+
.github/
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
31+
with:
32+
languages: actions
33+
queries: security-extended
34+
- name: Perform CodeQL Analysis
35+
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3

.github/workflows/libclang-abi-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ jobs:
144144
- abi-dump
145145
steps:
146146
- name: Download baseline
147-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
147+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
148148
with:
149149
name: build-baseline
150150
path: build-baseline
151151
- name: Download latest
152-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
152+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
153153
with:
154154
name: build-latest
155155
path: build-latest

.github/workflows/libcxx-run-benchmarks.yml

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
name: Benchmark libc++
1111

1212
permissions:
13-
contents: read # Default everything to read-only
13+
contents: read
1414

1515
on:
1616
issue_comment:
@@ -21,45 +21,92 @@ on:
2121
env:
2222
CC: clang-22
2323
CXX: clang++-22
24-
COMMENT_BODY: ${{ github.event.comment.body }}
25-
PULL_REQUEST_HEAD: ${{ github.event.issue.pull_request.head.sha }}
26-
PULL_REQUEST_BASE: ${{ github.event.issue.pull_request.base.sha }}
2724

2825
jobs:
2926
run-benchmarks:
27+
permissions:
28+
pull-requests: write
29+
3030
if: >-
3131
github.event.issue.pull_request &&
3232
contains(github.event.comment.body, '/libcxx-bot benchmark')
3333
3434
runs-on: llvm-premerge-libcxx-next-runners # TODO: This should run on a dedicated set of machines
3535
steps:
36-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37-
with:
38-
ref: ${PULL_REQUEST_HEAD}
39-
fetch-depth: 0
40-
fetch-tags: true # This job requires access to all the Git branches so it can diff against (usually) main
41-
42-
- uses: actions/setup-python@v6
36+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
4337
with:
4438
python-version: '3.10'
4539

46-
- name: Install dependencies
40+
- name: Extract information from the PR
41+
id: vars
42+
env:
43+
COMMENT_BODY: ${{ github.event.comment.body }}
4744
run: |
4845
python3 -m venv .venv
4946
source .venv/bin/activate
50-
python -m pip install -r libcxx/utils/requirements.txt
47+
python -m pip install pygithub
48+
49+
cat <<EOF | python >> ${GITHUB_OUTPUT}
50+
import github
51+
repo = github.Github("${{ github.token }}").get_repo("${{ github.repository }}")
52+
pr = repo.get_pull(${{ github.event.issue.number }})
53+
print(f"pr_base={pr.base.sha}")
54+
print(f"pr_head={pr.head.sha}")
55+
EOF
56+
BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
57+
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
58+
59+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
60+
with:
61+
ref: ${{ steps.vars.outputs.pr_head }}
62+
fetch-depth: 0
63+
fetch-tags: true # This job requires access to all the Git branches so it can diff against (usually) main
64+
path: repo # Avoid nuking the workspace, where we have the Python virtualenv
5165

5266
- name: Run baseline
5367
run: |
54-
BENCHMARKS=$(echo "${COMMENT_BODY}" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
55-
baseline_commit=$(git merge-base ${PULL_REQUEST_BASE} ${PULL_REQUEST_SHA})
56-
./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed ${BENCHMARKS}
68+
source .venv/bin/activate && cd repo
69+
python -m pip install -r libcxx/utils/requirements.txt
70+
baseline_commit=$(git merge-base ${{ steps.vars.outputs.pr_base }} ${{ steps.vars.outputs.pr_head }})
71+
./libcxx/utils/test-at-commit --commit ${baseline_commit} -B build/baseline -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
72+
./libcxx/utils/consolidate-benchmarks build/baseline | tee baseline.lnt
5773
5874
- name: Run candidate
5975
run: |
60-
BENCHMARKS=$(echo "${COMMENT_BODY}" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
61-
./libcxx/utils/test-at-commit --commit ${PULL_REQUEST_SHA} -B build/candidate -- -sv -j1 --param optimization=speed ${BENCHMARKS}
76+
source .venv/bin/activate && cd repo
77+
./libcxx/utils/test-at-commit --commit ${{ steps.vars.outputs.pr_head }} -B build/candidate -- -sv -j1 --param optimization=speed ${{ steps.vars.outputs.benchmarks }}
78+
./libcxx/utils/consolidate-benchmarks build/candidate | tee candidate.lnt
6279
6380
- name: Compare baseline and candidate runs
64-
run: ./libcxx/utils/compare-benchmarks <(./libcxx/utils/consolidate-benchmarks build/baseline) \
65-
<(./libcxx/utils/consolidate-benchmarks build/candidate)
81+
run: |
82+
source .venv/bin/activate && cd repo
83+
./libcxx/utils/compare-benchmarks baseline.lnt candidate.lnt | tee results.txt
84+
85+
- name: Update comment with results
86+
run: |
87+
source .venv/bin/activate && cd repo
88+
cat <<EOF | python
89+
import github
90+
repo = github.Github("${{ github.token }}").get_repo("${{ github.repository }}")
91+
pr = repo.get_pull(${{ github.event.issue.number }})
92+
comment = pr.get_issue_comment(${{ github.event.comment.id }})
93+
with open('results.txt', 'r') as f:
94+
benchmark_results = f.read()
95+
96+
new_comment_text = f"""
97+
{comment.body}
98+
99+
<details>
100+
<summary>
101+
Benchmark results:
102+
</summary>
103+
104+
\`\`\`
105+
{benchmark_results}
106+
\`\`\`
107+
108+
</details>
109+
"""
110+
111+
comment.edit(new_comment_text)
112+
EOF

.github/workflows/llvm-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,17 @@ jobs:
148148
- abi-dump
149149
steps:
150150
- name: Download baseline
151-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
151+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
152152
with:
153153
name: build-baseline
154154
path: build-baseline
155155
- name: Download latest
156-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
156+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
157157
with:
158158
name: build-latest
159159
path: build-latest
160160
- name: Download symbol list
161-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
161+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
162162
with:
163163
name: symbol-list
164164
path: symbol-list

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Get changed files
2727
id: changed-files
28-
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
28+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
2929
with:
3030
separator: ","
3131
skip_initial_fetch: true

0 commit comments

Comments
 (0)