-
-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (26 loc) · 1005 Bytes
/
check_clang-format.yml
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
name: check_clang-format
on:
push:
pull_request:
types: [opened, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'false'
- name: Updating clang (clang-format)
shell: bash
run: |
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && \
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
sudo apt-mark hold grub-efi-amd64-signed && sudo apt-get update --fix-missing && sudo apt-get upgrade && sudo apt-get install clang-format-17 && \
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 1000
- name: Check clang-format version
shell: bash
run: clang-format --version
- name: Check format
shell: bash
working-directory: ${{github.workspace}}
run: ./verify_clang_format.sh