forked from lvgl/lvgl
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 1.07 KB
/
check_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
name: Verify code formatting
on:
push:
pull_request:
jobs:
verify-formatting:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Checkout astyle
uses: actions/checkout@v4
with:
repository: lvgl/astyle
path: astyle
ref: v3.4.12
- name: Install astyle
run: |
cd astyle/build/gcc/
make
sudo make install
astyle --version
- name: Format code
run: python code-format.py
working-directory: scripts
- name: Check that repository is clean
shell: bash
run: |
set -o pipefail
if ! (git diff --exit-code --color=always | tee /tmp/lvgl_diff.patch); then
echo "Please apply the preceding diff to your code or run scripts/code-format.py"
exit 1
fi