ResInsight/.github/workflows/cmake-format.yml
Magne Sjaastad b050cac1d2
Make it possible to build Octave plugins independent to main build
The building of Octave plugins within main ResInsight build on RHEL8 cause the build to use gcc-12, and gcc-12 is extremely slow when building opm-common.

Adjust the CMake configuration so it is possible to build the Octave plugins as an independent build job. The plugin binaries can then be uploaded to an external server. The main ResInsight build  can download the binaries and include them in the install package for ResInsight.

Use the flag RESINSIGHT_USE_EXTERNAL_OCTAVE_PLUGINS to download external Octave plugin binaries.
2024-06-04 07:42:50 +02:00

42 lines
1.4 KiB
YAML

name: cmake-format
on: [push]
jobs:
cmake-format-job:
runs-on: ubuntu-20.04
steps:
- name: Install cmakelang for cmake-format
run: |
python3 -m pip install --user cmakelang
- uses: actions/checkout@v4
- 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 ..
git diff
- uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Fixes by cmake-format"
title: "Fixes by cmake-format"
branch: cmake-format-patches
branch-suffix: random