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:
Magne Sjaastad
2023-04-13 07:05:53 +02:00
committed by GitHub
parent 310b54ef93
commit 952e766c2f
230 changed files with 2010 additions and 2019 deletions

View File

@@ -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: