Skip to content

Commit eb9894c

Browse files
committed
[CI] Add pre-commit job
1 parent 9c4ff82 commit eb9894c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/ubuntu.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,24 @@ on:
22
workflow_call:
33

44
jobs:
5+
pre-commit:
6+
runs-on: ubuntu-24.04
7+
steps:
8+
- uses: actions/checkout@v4
9+
with:
10+
submodules: recursive
11+
- name: Setup environment
12+
run: |
13+
sudo apt-get update
14+
sudo apt-get install --no-install-recommends -y \
15+
gcc-14 g++-14 ninja-build python3-pip clang-format-16
16+
python3 -m pip install -r requirements.txt
17+
- name: Run pre-commit checks
18+
run: |
19+
pre-commit run --from-ref origin/master --to-ref HEAD
520
gcc-build:
21+
needs:
22+
- pre-commit
623
runs-on: ${{ matrix.os }}
724
strategy:
825
matrix:
@@ -110,6 +127,8 @@ jobs:
110127
env:
111128
PPC_NUM_PROC: 1
112129
clang-build:
130+
needs:
131+
- pre-commit
113132
runs-on: ${{ matrix.os }}
114133
strategy:
115134
matrix:

0 commit comments

Comments
 (0)