-
Notifications
You must be signed in to change notification settings - Fork 142
48 lines (41 loc) · 1.11 KB
/
style.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
name: Code style tests
on:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]
jobs:
style:
name: Test code style
runs-on: ubuntu-24.04
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip3 install tox
sudo apt-get -y install clang-tidy-16
- name: Install uncrustify
run: |
# Set up uncrustify.
wget https://github.com/uncrustify/uncrustify/archive/uncrustify-0.72.0.tar.gz
tar xzf uncrustify-0.72.0.tar.gz
cd uncrustify-uncrustify-0.72.0
mkdir build
cd build
cmake ../
make -j2
mv uncrustify ../../
cd ../../
rm -rf uncrustify-0.72.0.tar.gz uncrustify-uncrustify-0.72.0
- name: Run code style tests
run: |
export PATH="$(pwd):$PATH" # Add uncrustify to path.
cd misc/
tox -e style,clang-tidy
...