Skip to content

Commit 3b3addd

Browse files
[Github] Add initial version of precommit checks
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.
1 parent 920bb54 commit 3b3addd

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/precommit.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Precommit tests"
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- main
10+
paths:
11+
- '.github/workflows/precommit.yaml'
12+
- 'llvm/**'
13+
14+
jobs:
15+
build-llvm:
16+
name: "Build and test LLVM"
17+
runs-on: ubuntu-latest
18+
container:
19+
image: ghcr.io/llvm/ci-ubuntu-22.04:latest
20+
steps:
21+
- name: Fetch LLVM sources
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 1
25+
- name: Setup ccache
26+
uses: hendrikmuhs/ccache-action@v1
27+
with:
28+
max-size: 500M
29+
variant: sccache
30+
key: precommit-linux
31+
- name: Configure LLVM
32+
run: |
33+
cmake -B llvm-build -GNinja \
34+
-DCMAKE_BUILD_TYPE=Release \
35+
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
36+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
37+
-DLLVM_ENABLE_ASSERTIONS=ON \
38+
-DCMAKE_C_COMPILER=clang \
39+
-DCMAKE_CXX_COMPILER=clang++ \
40+
-DLLVM_LIT_ARGS="-v --no-progress-bar" \
41+
./llvm
42+
- name: Build LLVM
43+
run: |
44+
ninja -C llvm-build llvm-test-depends
45+
- name: Check LLVM
46+
run: |
47+
ninja -C llvm-build check-llvm

0 commit comments

Comments
 (0)