[llvm] t[Github] Add initial version of precommit checks (PR #80951)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 23:58:29 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

This patch adds an initial version of the LLVM precommit checks. These checks should be reasonably performant (full test cycle in ~30 minutes with a fully warm cache, ~80 minutes with a completely cold cache) and should catch regressions within LLVM.

This is mainly intended to test the scalability of the current design and to start eliminating issues before we begin to scale to other subprojects.

---
Full diff: https://github.com/llvm/llvm-project/pull/80951.diff


1 Files Affected:

- (added) .github/workflows/precommit.yaml (+47) 


``````````diff
diff --git a/.github/workflows/precommit.yaml b/.github/workflows/precommit.yaml
new file mode 100644
index 0000000000000..8285a19b684f3
--- /dev/null
+++ b/.github/workflows/precommit.yaml
@@ -0,0 +1,47 @@
+name: "Precommit tests"
+
+permissions:
+  contents: read
+
+on:
+  pull_request:
+    branches:
+      - main
+    paths:
+      - '.github/workflows/precommit.yaml'
+      - 'llvm/**'
+
+jobs:
+  build-llvm:
+    name: "Build and test LLVM"
+    runs-on: ubuntu-latest
+    container:
+      image: ghcr.io/llvm/ci-ubuntu-22.04:latest
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at v4
+        with:
+          fetch-depth: 1
+      - name: Setup ccache
+        uses: hendrikmuhs/ccache-action at v1
+        with:
+          max-size: 500M
+          variant: sccache
+          key: precommit-linux
+      - name: Configure LLVM
+        run: |
+          cmake -B llvm-build -GNinja \
+            -DCMAKE_BUILD_TYPE=Release \
+            -DCMAKE_C_COMPILER_LAUNCHER=sccache \
+            -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
+            -DLLVM_ENABLE_ASSERTIONS=ON \
+            -DCMAKE_C_COMPILER=clang \
+            -DCMAKE_CXX_COMPILER=clang++ \
+            -DLLVM_LIT_ARGS="-v --no-progress-bar" \
+            ./llvm
+      - name: Build LLVM
+        run: |
+          ninja -C llvm-build llvm-test-depends
+      - name: Check LLVM
+        run: |
+          ninja -C llvm-build check-llvm

``````````

</details>


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


More information about the llvm-commits mailing list