Files
ResInsight/.github/workflows/clang-format.yml
T
dependabot[bot] 4f51687715 Bump peter-evans/create-pull-request from 7 to 8
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7 to 8.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v7...v8)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 11:48:47 +01:00

51 lines
2.0 KiB
YAML

name: clang-format
on: [push]
jobs:
clang-format-job:
runs-on: ubuntu-24.04
steps:
- name: Set apt mirror
# GitHub Actions apt proxy is super unstable
# see https://github.com/actions/runner-images/issues/7048
run: |
# make sure there is a `\t` between URL and `priority:*` attributes
printf 'http://azure.archive.ubuntu.com/ubuntu priority:1\n' | sudo tee /etc/apt/mirrors.txt
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 19
run: |
sudo apt-get update
sudo apt-get install --option="APT::Acquire::Retries=3" clang-format-19
clang-format-19 --version
- uses: actions/checkout@v6
- name: Check format - ApplicationLibCode
run: |
cd ApplicationLibCode
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-19 -i
git diff
- name: Check format - ApplicationExeCode
run: |
cd ApplicationExeCode
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-19 -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-19 -i
git diff
- name: Check format - GrpcInterface
run: |
cd GrpcInterface
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' -o -name '*.proto' | grep -v gtest | xargs clang-format-19 -i
git diff
- uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Fixes by clang-format"
title: "Fixes by clang-format"
branch: clang-format-patches
branch-suffix: random