-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.26 KB
/
clang-format.yml
File metadata and controls
39 lines (33 loc) · 1.26 KB
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
33
34
35
36
37
38
39
---
name: clang-format style check
on: # yamllint disable-line rule:truthy
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
workflow_dispatch:
jobs:
lint:
name: clang-format style check
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install dependencies
# yamllint disable rule:line-length
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo apt-get -y update
sudo apt-get -y install --no-install-recommends --no-install-suggests clang-format-19
sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-19) 100
sudo update-alternatives --set clang-format $(update-alternatives --list clang-format | grep clang-format-19)
# yamllint enable rule:line-length
- name: Check Tools
run: |
make --version
cmake --version
clang-format --version
- name: Style Check
run: make test/styling