[llvm] [CI] Add Basic Bazel Checks (PR #153740)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 21:14:51 PDT 2025


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/153740

>From 767ea42218c84d1f9565dc5c33cdc096692b338f Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 15 Aug 2025 04:03:56 +0000
Subject: [PATCH] [CI] Add Basic Bazel Checks

Having basic checks (like running buildifier) on the upstream bazel
files would be helpful for contributors maintaining the bazel build. Add
basic checks (currently just buildifier) to a workflow that runs
whenever the bazel build files change.
---
 .github/workflows/bazel-checks.yml | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 .github/workflows/bazel-checks.yml

diff --git a/.github/workflows/bazel-checks.yml b/.github/workflows/bazel-checks.yml
new file mode 100644
index 0000000000000..33f8a2859c91c
--- /dev/null
+++ b/.github/workflows/bazel-checks.yml
@@ -0,0 +1,30 @@
+name: Bazel Checks
+
+permissions:
+  contents: read
+
+on:
+  push:
+    paths:
+      - '.github/workflows/bazel-checks.yml'
+      - 'utils/bazel/**'
+    branches:
+      - main
+  pull_request:
+    paths:
+      - '.github/workflows/bazel-checks.yml'
+      - 'utils/bazel/**'
+
+jobs:
+  buildifier:
+    name: "Buildifier"
+    runs-on: ubuntu-24.04
+    if: github.repository == 'llvm/llvm-project'
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at 08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+      - name: Setup Buildifier
+        run: |
+          sudo curl -L https://github.com/bazelbuild/buildtools/releases/download/v8.2.1/buildifier-linux-amd64 > /usr/bin/buildifier
+          sudo chmod +x /usr/bin/buildifier
+          buildifier -r utils/bazel



More information about the llvm-commits mailing list