summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/new-prs-labeler.yml5
-rw-r--r--.github/workflows/build-ci-container.yml5
-rw-r--r--.github/workflows/commit-access-review.py44
-rw-r--r--.github/workflows/containers/github-action-ci/Dockerfile17
-rw-r--r--.github/workflows/new-issues.yml2
-rw-r--r--.github/workflows/pr-code-format.yml2
-rw-r--r--.github/workflows/premerge.yaml6
-rw-r--r--.github/workflows/release-binaries.yml16
8 files changed, 67 insertions, 30 deletions
diff --git a/.github/new-prs-labeler.yml b/.github/new-prs-labeler.yml
index 0aa05cd027a4..566308bb3df8 100644
--- a/.github/new-prs-labeler.yml
+++ b/.github/new-prs-labeler.yml
@@ -661,6 +661,11 @@ backend:DirectX:
backend:SPIR-V:
- clang/lib/Driver/ToolChains/SPIRV.*
+ - clang/lib/Sema/SemaSPIRV.cpp
+ - clang/include/clang/Sema/SemaSPIRV.h
+ - clang/include/clang/Basic/BuiltinsSPIRV.td
+ - clang/test/CodeGenSPIRV/**
+ - clang/test/SemaSPIRV/**
- llvm/lib/Target/SPIRV/**
- llvm/test/CodeGen/SPIRV/**
- llvm/test/Frontend/HLSL/**
diff --git a/.github/workflows/build-ci-container.yml b/.github/workflows/build-ci-container.yml
index 50729e017350..4fa0713b381c 100644
--- a/.github/workflows/build-ci-container.yml
+++ b/.github/workflows/build-ci-container.yml
@@ -59,8 +59,9 @@ jobs:
- name: Test Container
run: |
- for image in ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}; do
- podman run --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
+ for image in ${{ steps.vars.outputs.container-name-tag }}; do
+ # Use --pull=never to ensure we are testing the just built image.
+ podman run --pull=never --rm -it $image /usr/bin/bash -x -c 'cd $HOME && printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
done
push-ci-container:
diff --git a/.github/workflows/commit-access-review.py b/.github/workflows/commit-access-review.py
index 91d3a61cdcb1..4f539fe98004 100644
--- a/.github/workflows/commit-access-review.py
+++ b/.github/workflows/commit-access-review.py
@@ -67,39 +67,47 @@ def check_manual_requests(
) -> list[str]:
"""
Return a list of users who have been asked since ``start_date`` if they
- want to keep their commit access.
+ want to keep their commit access or if they have applied for commit
+ access since ``start_date``
"""
+
query = """
- query ($query: String!) {
- search(query: $query, type: ISSUE, first: 100) {
+ query ($query: String!, $after: String) {
+ search(query: $query, type: ISSUE, first: 100, after: $after) {
nodes {
... on Issue {
- body
- comments (first: 100) {
- nodes {
- author {
- login
- }
- }
+ author {
+ login
}
+ body
}
}
+ pageInfo {
+ hasNextPage
+ endCursor
+ }
}
}
"""
formatted_start_date = start_date.strftime("%Y-%m-%dT%H:%M:%S")
variables = {
- "query": f"type:issue created:>{formatted_start_date} org:llvm repo:llvm-project label:infra:commit-access"
+ "query": f"type:issue created:>{formatted_start_date} org:llvm repo:llvm-project label:infra:commit-access,infra:commit-access-request"
}
- res_header, res_data = gh._Github__requester.graphql_query(
- query=query, variables=variables
- )
- data = res_data["data"]
+ has_next_page = True
users = []
- for issue in data["search"]["nodes"]:
- users.extend([user[1:] for user in re.findall("@[^ ,\n]+", issue["body"])])
-
+ while has_next_page:
+ res_header, res_data = gh._Github__requester.graphql_query(
+ query=query, variables=variables
+ )
+ data = res_data["data"]
+ for issue in data["search"]["nodes"]:
+ users.extend([user[1:] for user in re.findall("@[^ ,\n]+", issue["body"])])
+ if issue["author"]:
+ users.append(issue["author"]["login"])
+ has_next_page = data["search"]["pageInfo"]["hasNextPage"]
+ if has_next_page:
+ variables["after"] = data["search"]["pageInfo"]["endCursor"]
return users
diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index 58355d261c43..3757e603f8a1 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -57,6 +57,7 @@ RUN apt-get update && \
nodejs \
perl-modules \
python3-psutil \
+ sudo \
# These are needed by the premerge pipeline. Pip is used to install
# dependent python packages and ccache is used for build caching. File and
@@ -66,6 +67,16 @@ RUN apt-get update && \
file \
tzdata
+# Install sccache as it is needed by most of the project test workflows and
+# cannot be installed by the ccache action when executing as a non-root user.
+# TODO(boomanaiden154): This should be switched to being installed with apt
+# once we bump to Ubuntu 24.04.
+RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.7.6/sccache-v0.7.6-x86_64-unknown-linux-musl.tar.gz' > /tmp/sccache.tar.gz && \
+ echo "2902a5e44c3342132f07b62e70cca75d9b23252922faf3b924f449808cc1ae58 /tmp/sccache.tar.gz" | sha256sum -c && \
+ tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
+ rm /tmp/sccache.tar.gz && \
+ chmod +x /usr/local/bin/sccache
+
ENV LLVM_SYSROOT=$LLVM_SYSROOT
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
@@ -73,5 +84,11 @@ ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
# permissions issues in some tests. Set the user id to 1001 as that is the
# user id that Github Actions uses to perform the checkout action.
RUN useradd gha -u 1001 -m -s /bin/bash
+
+# Also add the user to passwordless sudoers so that we can install software
+# later on without having to rebuild the container.
+RUN adduser gha sudo
+RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+
USER gha
diff --git a/.github/workflows/new-issues.yml b/.github/workflows/new-issues.yml
index ed15fdb9fba6..3cac57e26851 100644
--- a/.github/workflows/new-issues.yml
+++ b/.github/workflows/new-issues.yml
@@ -15,7 +15,7 @@ jobs:
steps:
- uses: llvm/actions/issue-labeler@main
with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
+ repo-token: ${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}
configuration-path: .github/new-issues-labeler.yml
include-title: 1
include-body: 0
diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index f2bb37316d3a..0e6180acf4a4 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -60,7 +60,7 @@ jobs:
- name: Install clang-format
uses: aminya/setup-cpp@v1
with:
- clangformat: 18.1.7
+ clangformat: 19.1.6
- name: Setup Python env
uses: actions/setup-python@v5
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 7a9762812cc1..261dc8bbb97e 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -31,6 +31,12 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2.14
- name: Build and Test
+ # Mark the job as a success even if the step fails so that people do
+ # not get notified while the new premerge pipeline is in an
+ # experimental state.
+ # TODO(boomanaiden154): Remove this once the pipeline is stable and we
+ # are ready for people to start recieving notifications.
+ continue-on-error: true
run: |
git config --global --add safe.directory '*'
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 1cde628d3f66..fc5431c96bbf 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -83,7 +83,7 @@ jobs:
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
shell: bash
run: |
- ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
+ ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user "$GITHUB_ACTOR" --user-token "$USER_TOKEN" check-permissions
- name: Collect Variables
id: vars
@@ -102,8 +102,8 @@ jobs:
release_version="$trimmed"
ref="llvmorg-$release_version"
else
- release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-${{ github.sha }}"
- ref=${{ github.sha }}
+ release_version="${{ (github.event_name == 'pull_request' && format('PR{0}', github.event.pull_request.number)) || 'CI'}}-$GITHUB_SHA"
+ ref="$GITHUB_SHA"
fi
if [ -n "${{ inputs.upload }}" ]; then
upload="${{ inputs.upload }}"
@@ -114,20 +114,20 @@ jobs:
echo "ref=$ref" >> $GITHUB_OUTPUT
echo "upload=$upload" >> $GITHUB_OUTPUT
- release_binary_basename="LLVM-$release_version-${{ runner.os }}-${{ runner.arch }}"
+ release_binary_basename="LLVM-$release_version-$RUNNER_OS-$RUNNER_ARCH"
echo "release-binary-basename=$release_binary_basename" >> $GITHUB_OUTPUT
echo "release-binary-filename=$release_binary_basename.tar.xz" >> $GITHUB_OUTPUT
# Detect necessary CMake flags
- target="${{ runner.os }}-${{ runner.arch }}"
+ target="$RUNNER_OS-$RUNNER_ARCH"
echo "enable-pgo=false" >> $GITHUB_OUTPUT
target_cmake_flags="-DLLVM_RELEASE_ENABLE_PGO=OFF"
# The macOS builds try to cross compile some libraries so we need to
# add extra CMake args to disable them.
# See https://github.com/llvm/llvm-project/issues/99767
- if [ "${{ runner.os }}" = "macOS" ]; then
+ if [ "$RUNNER_OS" = "macOS" ]; then
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
- if [ "${{ runner.arch }}" = "ARM64" ]; then
+ if [ "$RUNNER_ARCH" = "ARM64" ]; then
arches=arm64
else
arches=x86_64
@@ -137,7 +137,7 @@ jobs:
build_flang="true"
- if [ "${{ runner.os }}" = "Windows" ]; then
+ if [ "$RUNNER_OS" = "Windows" ]; then
# The build times out on Windows, so we need to disable LTO.
target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
fi