mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
31 lines
854 B
YAML
31 lines
854 B
YAML
name: clang-format
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
clang-format-job:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install clang-format 6.0
|
|
run: |
|
|
sudo apt install clang-format-6.0
|
|
clang-format-6.0 --version
|
|
- uses: actions/checkout@v2
|
|
- name: Check format - ApplicationCode
|
|
run: |
|
|
cd ApplicationCode
|
|
find -name *.h -o -name *.cpp -o -name *.inl | xargs clang-format-6.0 -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-6.0 -i
|
|
git diff
|
|
- uses: peter-evans/create-pull-request@v2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: 'Fixes by clang-format'
|
|
title: 'Fixes by clang-format'
|
|
branch: clang-format-patches
|
|
|
|
|