mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update clang-format.yml (#10068)
* Update to clang-format-15 Removed two custom .clang-format files in subfolders of AppFwk * Fixes by clang-format
This commit is contained in:
15
.github/workflows/clang-format.yml
vendored
15
.github/workflows/clang-format.yml
vendored
@@ -4,7 +4,7 @@ on: [push]
|
||||
|
||||
jobs:
|
||||
clang-format-job:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Set apt mirror
|
||||
# GitHub Actions apt proxy is super unstable
|
||||
@@ -15,25 +15,26 @@ jobs:
|
||||
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
|
||||
sudo sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/mirrors.txt/' /etc/apt/sources.list
|
||||
|
||||
- name: Install clang-format 10.0
|
||||
- name: Install clang-format 15.0
|
||||
run: |
|
||||
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-10
|
||||
clang-format-10 --version
|
||||
sudo apt-get update
|
||||
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-15
|
||||
clang-format-15 --version
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check format - ApplicationLibCode
|
||||
run: |
|
||||
cd ApplicationLibCode
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -i
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -i
|
||||
git diff
|
||||
- name: Check format - ApplicationExeCode
|
||||
run: |
|
||||
cd ApplicationExeCode
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-10 -i
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -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-10 -i
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | grep -v gtest | xargs clang-format-15 -i
|
||||
git diff
|
||||
- uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user