[llvm] [Github][Bazel] Add Workflow to Run Bazel Build (PR #165071)

Aaron Siddhartha Mondal via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 27 10:11:07 PDT 2025


================
@@ -30,3 +30,28 @@ jobs:
       - name: Run Buildifier
         run: |
           buildifier --mode=check $(find ./utils/bazel -name *BUILD*)
+  
+  bazel-build:
+    name: "Bazel Build/Test"
+    runs-on: llvm-premerge-linux-runners
+    if: github.repository == 'llvm/llvm-project'
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at 08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+        # TODO(boomanaiden154): We should use a purpose built container for this. Move
+        # over when we have fixed the issues with using custom containers with Github
+        # ARC in GKE.
+      - name: Setup System Dependencies
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y libmpfr-dev libpfm4-dev
+          sudo curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb > /tmp/bazelisk.deb
+          sudo apt-get install -y /tmp/bazelisk.deb
+          rm /tmp/bazelisk.deb
+      - name: Build/Test
+        working-directory: utils/bazel
+        run: |
+          bazel test --config=ci --sandbox_base="" \
----------------
aaronmondal wrote:

Yes, bazelisk would be better. There is actually this action which might be nice to look into as it's fairly standardized and it seems to me like it could work more or less out of the box:

https://github.com/bazel-contrib/setup-bazel

https://github.com/llvm/llvm-project/pull/165071


More information about the llvm-commits mailing list