-
Notifications
You must be signed in to change notification settings - Fork 51
38 lines (36 loc) · 1.1 KB
/
ClangFormat.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: Format Validation (Clang)
on:
workflow_dispatch: {}
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
runFormatValidationScript:
name: Run Clang Format Validation Script
runs-on: ubuntu-latest
steps:
- name: Get Clang Format 16
run: |
sudo wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get update
sudo apt-get install -y clang-format-16
- name: Checkout Code
uses: actions/checkout@v2
- name: Python Setup
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Run Script
run: python3 scripts/format/format_validation.py
id: format-validation
continue-on-error: true
- name: Check Success
run: |
if [ ${{ steps.format-validation.outcome }} == "success" ]; then
echo "Format Validation Passed"
else
echo "Format Validation Failed"
exit 1
fi