From 0f12003e07e0585fa4120e29ac4487f4a064a503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 8 Aug 2021 14:17:01 +0200 Subject: [PATCH] crustify; check formatting in CI --- .github/workflows/CI-unixish.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml index f32c0c50b..b71ab1759 100644 --- a/.github/workflows/CI-unixish.yml +++ b/.github/workflows/CI-unixish.yml @@ -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 +