Skip to content

Commit f14329f

Browse files
Merge branch 'main' into constant-fold-fpext-fptrunc
2 parents 24c35a9 + d7eade1 commit f14329f

File tree

4,099 files changed

+342339
-133363
lines changed

Some content is hidden

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

4,099 files changed

+342339
-133363
lines changed

.ci/cache_lit_timing_files.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import glob
1818

1919
from google.cloud import storage
20+
from google.api_core import exceptions
2021

2122
GCS_PARALLELISM = 100
2223

@@ -50,7 +51,14 @@ def _maybe_download_timing_file(blob):
5051

5152
def download_timing_files(storage_client, bucket_name: str):
5253
bucket = storage_client.bucket(bucket_name)
53-
blobs = bucket.list_blobs(prefix="lit_timing")
54+
try:
55+
blobs = bucket.list_blobs(prefix="lit_timing")
56+
except exceptions.ClientError as client_error:
57+
print(
58+
"::warning file=cache_lit_timing_files.py::Failed to list blobs "
59+
"in bucket."
60+
)
61+
sys.exit(0)
5462
with multiprocessing.pool.ThreadPool(GCS_PARALLELISM) as thread_pool:
5563
futures = []
5664
for timing_file_blob in blobs:
@@ -60,7 +68,13 @@ def download_timing_files(storage_client, bucket_name: str):
6068
)
6169
)
6270
for future in futures:
63-
future.get()
71+
future.wait()
72+
if not future.successful():
73+
print(
74+
"::warning file=cache_lit_timing_files.py::Failed to "
75+
"download lit timing file."
76+
)
77+
continue
6478
print("Done downloading")
6579

6680

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BasedOnStyle: LLVM
2+
LineEnding: LF

.github/new-prs-labeler.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,12 @@ mlgo:
722722
- llvm/include/llvm/Analysis/IR2Vec.h
723723
- llvm/lib/Analysis/IR2Vec.cpp
724724
- llvm/lib/Analysis/models/**
725+
- llvm/include/llvm/CodeGen/MIR2Vec.h
726+
- llvm/lib/CodeGen/MIR2Vec.cpp
725727
- llvm/test/Analysis/IR2Vec/**
728+
- llvm/test/CodeGen/MIR2Vec/**
729+
- llvm/unittests/Analysis/IR2VecTest.cpp
730+
- llvm/unittests/CodeGen/MIR2VecTest.cpp
726731
- llvm/tools/llvm-ir2vec/**
727732
- llvm/docs/CommandGuide/llvm-ir2vec.rst
728733

@@ -1121,3 +1126,6 @@ tablegen:
11211126
- llvm/include/TableGen/**
11221127
- llvm/lib/TableGen/**
11231128
- llvm/utils/TableGen/**
1129+
1130+
infrastructure:
1131+
- .ci/**
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Build CI Container
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- .github/workflows/build-ci-container-tooling.yml
12+
- '.github/workflows/containers/github-action-ci-tooling/**'
13+
- llvm/utils/git/requirements_formatting.txt
14+
- llvm/utils/git/requirements_linting.txt
15+
pull_request:
16+
paths:
17+
- .github/workflows/build-ci-container-tooling.yml
18+
- '.github/workflows/containers/github-action-ci-tooling/**'
19+
- llvm/utils/git/requirements_formatting.txt
20+
- llvm/utils/git/requirements_linting.txt
21+
22+
jobs:
23+
build-ci-container-tooling:
24+
if: github.repository_owner == 'llvm'
25+
runs-on: ubuntu-24.04
26+
steps:
27+
- name: Checkout LLVM
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
sparse-checkout: |
31+
.github/workflows/containers/github-action-ci-tooling/
32+
llvm/utils/git/requirements_formatting.txt
33+
llvm/utils/git/requirements_linting.txt
34+
clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
35+
36+
- name: Write Variables
37+
id: vars
38+
run: |
39+
tag=$(git rev-parse --short=12 HEAD)
40+
container_name="ghcr.io/$GITHUB_REPOSITORY_OWNER/amd64/ci-ubuntu-24.04"
41+
echo "container-name-format=$container_name-code-format" >> $GITHUB_OUTPUT
42+
echo "container-name-lint=$container_name-code-lint" >> $GITHUB_OUTPUT
43+
echo "container-name-format-tag=$container_name-format:$tag" >> $GITHUB_OUTPUT
44+
echo "container-name-lint-tag=$container_name-lint:$tag" >> $GITHUB_OUTPUT
45+
echo "container-format-filename=$(echo $container_name-format:$tag | sed -e 's/\//-/g' -e 's/:/-/g').tar" >> $GITHUB_OUTPUT
46+
echo "container-lint-filename=$(echo $container_name-lint:$tag | sed -e 's/\//-/g' -e 's/:/-/g').tar" >> $GITHUB_OUTPUT
47+
48+
- name: Build container
49+
run: |
50+
podman build --target ci-container-code-format \
51+
-f .github/workflows/containers/github-action-ci-tooling/Dockerfile \
52+
-t ${{ steps.vars.outputs.container-name-format-tag }} .
53+
podman build --target ci-container-code-lint \
54+
-f .github/workflows/containers/github-action-ci-tooling/Dockerfile \
55+
-t ${{ steps.vars.outputs.container-name-lint-tag }} .
56+
57+
# Save the container so we have it in case the push fails. This also
58+
# allows us to separate the push step into a different job so we can
59+
# maintain minimal permissions while building the container.
60+
- name: Save container image
61+
run: |
62+
podman save ${{ steps.vars.outputs.container-name-format-tag }} > ${{ steps.vars.outputs.container-format-filename }}
63+
podman save ${{ steps.vars.outputs.container-name-lint-tag }} > ${{ steps.vars.outputs.container-lint-filename }}
64+
65+
- name: Upload container image
66+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
67+
with:
68+
name: container-amd64
69+
path: "*.tar"
70+
retention-days: 14
71+
72+
- name: Test Container
73+
run: |
74+
# 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'
76+
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'
77+
78+
push-ci-container:
79+
if: github.event_name == 'push'
80+
needs:
81+
- build-ci-container-tooling
82+
permissions:
83+
packages: write
84+
runs-on: ubuntu-24.04
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
steps:
88+
- name: Download container
89+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
90+
91+
- name: Push Container
92+
run: |
93+
function push_container {
94+
image_name=$1
95+
latest_name=$(echo $image_name | sed 's/:[a-f0-9]\+$/:latest/g')
96+
podman tag $image_name $latest_name
97+
echo "Pushing $image_name ..."
98+
podman push $image_name
99+
echo "Pushing $latest_name ..."
100+
podman push $latest_name
101+
}
102+
103+
podman login -u ${{ github.actor }} -p $GITHUB_TOKEN ghcr.io
104+
for f in $(find . -iname *.tar); do
105+
image_name=$(podman load -q -i $f | sed 's/Loaded image: //g')
106+
push_container $image_name
107+
108+
if echo $image_name | grep '/amd64/'; then
109+
# For amd64, create an alias with the arch component removed.
110+
# This matches the convention used on dockerhub.
111+
default_image_name=$(echo $(dirname $(dirname $image_name))/$(basename $image_name))
112+
podman tag $image_name $default_image_name
113+
push_container $default_image_name
114+
fi
115+
done

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: |
4545
docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
4646
- name: Upload container image
47-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
47+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4848
with:
4949
name: container
5050
path: ${{ steps.vars.outputs.container-filename }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
podman save ${{ steps.vars.outputs.container-name-agent-tag }} > ${{ steps.vars.outputs.container-agent-filename }}
6565
6666
- name: Upload container image
67-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
67+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6868
with:
6969
name: container-${{ matrix.arch }}
7070
path: "*.tar"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
podman save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
5151
- name: Upload Container Image
52-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
52+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5353
with:
5454
name: container
5555
path: ${{ steps.vars.outputs.container-filename }}

.github/workflows/check-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
sparse-checkout: .ci
2828
- name: Setup Python
29-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
29+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3030
with:
3131
python-version: 3.13
3232
cache: 'pip'

.github/workflows/ci-post-commit-analyzer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4545

4646
- name: Setup ccache
47-
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
47+
uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19
4848
with:
4949
# A full build of llvm, clang, lld, and lldb takes about 250MB
5050
# of ccache space. There's not much reason to have more than this,
@@ -87,7 +87,7 @@ jobs:
8787
scan-build --generate-index-only build/analyzer-results
8888
8989
- name: Upload Results
90-
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
90+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
9191
if: always()
9292
with:
9393
name: analyzer-results

.github/workflows/commit-access-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
python3 .github/workflows/commit-access-review.py $GITHUB_TOKEN
2929
3030
- name: Upload Triage List
31-
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
31+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3232
with:
3333
name: triagers
3434
path: triagers.log

0 commit comments

Comments
 (0)