2020-06-08 04:08:22 -05:00
|
|
|
name: clang-format
|
|
|
|
|
2020-11-19 01:17:55 -06:00
|
|
|
on: [push]
|
2020-06-08 04:08:22 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
clang-format-job:
|
2020-11-06 02:05:16 -06:00
|
|
|
runs-on: ubuntu-20.04
|
2020-06-08 04:08:22 -05:00
|
|
|
steps:
|
2020-11-06 02:05:16 -06:00
|
|
|
- name: Install clang-format 10.0
|
2020-06-08 04:08:22 -05:00
|
|
|
run: |
|
2020-11-06 02:05:16 -06:00
|
|
|
sudo apt install clang-format
|
|
|
|
clang-format --version
|
2020-06-08 04:08:22 -05:00
|
|
|
- uses: actions/checkout@v2
|
2021-01-06 08:03:38 -06:00
|
|
|
- name: Check format - ApplicationLibCode
|
2020-06-08 04:08:22 -05:00
|
|
|
run: |
|
2021-01-06 08:03:38 -06:00
|
|
|
cd ApplicationLibCode
|
|
|
|
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
|
|
|
|
git diff
|
|
|
|
- name: Check format - ApplicationExeCode
|
|
|
|
run: |
|
|
|
|
cd ApplicationExeCode
|
2020-11-06 02:05:16 -06:00
|
|
|
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
|
2020-06-19 00:51:17 -05:00
|
|
|
git diff
|
|
|
|
- name: Check format - AppFwk
|
|
|
|
run: |
|
|
|
|
cd Fwk/AppFwk
|
2020-11-06 02:05:16 -06:00
|
|
|
find -name *.h -o -name *.cpp -o -name *.inl | grep -v gtest | xargs clang-format -i
|
2020-06-08 04:08:22 -05:00
|
|
|
git diff
|
2020-11-06 02:12:05 -06:00
|
|
|
- uses: peter-evans/create-pull-request@v3
|
2020-06-08 04:08:22 -05:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
commit-message: 'Fixes by clang-format'
|
|
|
|
title: 'Fixes by clang-format'
|
2020-06-24 09:09:41 -05:00
|
|
|
branch: clang-format-patches
|
2021-11-29 05:33:38 -06:00
|
|
|
branch-suffix: random
|
2020-06-19 00:51:17 -05:00
|
|
|
|
|
|
|
|