crustify; check formatting in CI

This commit is contained in:
Daniel Marjamäki 2021-08-08 14:17:01 +02:00
parent 0b36ece049
commit 0f12003e07
1 changed files with 19 additions and 0 deletions

View File

@ -22,6 +22,20 @@ jobs:
with:
python-version: 3.9
- name: Cache uncrustify
uses: actions/cache@v2
id: cache-uncrustify
with:
path: |
~/uncrustify
key: ${{ runner.os }}-uncrustify
- name: build uncrustify
if: steps.cache-uncrustify.outputs.cache-hit != 'true'
run: |
wget https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.72.0.tar.gz
tar xzvf uncrustify-0.72.0.tar.gz && cd uncrustify-uncrustify-0.72.0 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j$(nproc) -s && mkdir ~/uncrustify && cp uncrustify ~/uncrustify/
- name: Install missing software on ubuntu 18.04
if: matrix.os == 'ubuntu-18.04'
run: |
@ -54,6 +68,10 @@ jobs:
with:
modules: 'qtcharts'
- name: Uncrustify check
run: |
~/uncrustify/uncrustify -c .uncrustify.cfg -l CPP --check */*.cpp */*.h
- name: Test CMake build
run: |
mkdir cmake.output
@ -183,3 +201,4 @@ jobs:
run: |
pushd oss-fuzz
make -j$(nproc) CXX=clang++ CXXFLAGS="-fsanitize=address" fuzz-client translate