-
Notifications
You must be signed in to change notification settings - Fork 7
33 lines (27 loc) · 989 Bytes
/
analyze.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: Analyze
on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: src
- name: Install depot_tools
run: |
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$PWD/depot_tools" >> $GITHUB_PATH
- name: Run gclient sync
run: |
gclient config --name=src --unmanaged https://github.com/${{ github.repository }}
gclient sync -v --no-history --shallow --nohooks
- name: Verify C/C++ formatting
working-directory: src
run: |
FILES=$(git ls-files -- '*.h' '*.cc' '*.cpp' | grep -v /third_party/)
third_party/clang/bin/clang-format --style=file --dry-run --Werror $FILES
- name: Verify GN formatting
working-directory: src
run: |
FILES=$(git ls-files -- '*.gn' '*.gni')
third_party/gn/gn format --dry-run $FILES