mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 05:53:25 -06:00
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: clang-format
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
clang-format-job:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Install clang-format 10.0
|
|
run: |
|
|
sudo apt install clang-format
|
|
clang-format --version
|
|
- uses: actions/checkout@v3
|
|
- name: Check format - ApplicationLibCode
|
|
run: |
|
|
cd ApplicationLibCode
|
|
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
|
|
git diff
|
|
- name: Check format - ApplicationExeCode
|
|
run: |
|
|
cd ApplicationExeCode
|
|
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format -i
|
|
git diff
|
|
- name: Check format - AppFwk
|
|
run: |
|
|
cd Fwk/AppFwk
|
|
find -name *.h -o -name *.cpp -o -name *.inl | grep -v gtest | xargs clang-format -i
|
|
git diff
|
|
- uses: peter-evans/create-pull-request@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: "Fixes by clang-format"
|
|
title: "Fixes by clang-format"
|
|
branch: clang-format-patches
|
|
branch-suffix: random
|