-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (26 loc) · 922 Bytes
/
format.yaml
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
on:
push:
branches: main
pull_request:
branches:
- main
name: format_check
jobs:
format_check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up LLVM repository
run: |
sudo apt-get update
sudo apt-get install -y wget gnupg
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb-src http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main" >> /etc/apt/sources.list'
sudo apt-get update
- name: Install ClangFormat
run: sudo apt-get install -y clang-format-19
- name: Run ClangFormat
run: make format clang_format=clang-format-19
- name: Check for a non-empty diff
run: git diff-files -U --exit-code