-
Notifications
You must be signed in to change notification settings - Fork 76
32 lines (30 loc) · 850 Bytes
/
pre-commit.yml
File metadata and controls
32 lines (30 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Pre-commit checks
on:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
- '*.txt'
- 'LICENSE'
jobs:
pre-commit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup environment
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
gcc-14 g++-14 ninja-build python3-pip
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 20 all
python3 -m pip install -r requirements.txt
- name: Run pre-commit checks
run: |
git fetch origin ${{ github.base_ref }}:${{ github.base_ref }}
pre-commit run --from-ref ${{ github.base_ref }} --to-ref HEAD