mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
Install clang-19 from the Ubuntu archive, as apt.llvm.org has no LLVM 19 repository for 26.04.
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: cmake-format
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
cmake-format-job:
|
|
runs-on: ubuntu-26.04
|
|
steps:
|
|
- name: Install cmakelang for cmake-format
|
|
run: |
|
|
python3 -m pip install --user cmakelang
|
|
- uses: actions/checkout@v7
|
|
- name: Check format - ApplicationLibCode
|
|
run: |
|
|
~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i CMakeLists.txt
|
|
|
|
cd ApplicationLibCode
|
|
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
|
|
find -name CMake*.cmake | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
|
|
cd ..
|
|
|
|
cd ApplicationExeCode
|
|
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
|
|
cd ..
|
|
|
|
cd Octave
|
|
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
|
|
cd ..
|
|
|
|
cd Fwk/AppFwk
|
|
find -name CMake*.txt | xargs ~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i
|
|
cd ..
|
|
cd ..
|
|
|
|
~/.local/bin/cmake-format -c ${{ github.workspace }}/cmake/cmake-format.py -i ThirdParty/custom-opm-common/CMakeLists.txt
|
|
|
|
git diff
|
|
- uses: peter-evans/create-pull-request@v8
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: "Fixes by cmake-format"
|
|
title: "Fixes by cmake-format"
|
|
branch: cmake-format-patches
|
|
branch-suffix: random
|