[llvm] [Workflow] Add new code format helper. (PR #66684)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 23:24:53 PDT 2023


================
@@ -0,0 +1,54 @@
+name: "Check code formatting"
+on: pull_request
+permissions:
+  pull-requests: write
+
+jobs:
+  code_formatter:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at v4
+        with:
+          persist-credentials: false
+          fetch-depth: 2
+
+      - name: Get changed files
+        id: changed-files
+        uses: tj-actions/changed-files at v39
+        with:
+          separator: ","
+
+      - name: "Listed files"
+        run: |
+          echo "Formatting files:"
+          echo "${{ steps.changed-files.outputs.all_changed_files }}"
+
+      - name: Install clang-format
+        uses: aminya/setup-cpp at v1
+        with:
+          clangformat: 16.0.6
----------------
tru wrote:

This actually uses apt.llvm.org already which is why I thought it was fine :)

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


More information about the llvm-commits mailing list