From 72b337e32c2cbddd127e82994f8fa60d14335fcc Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Fri, 9 Jul 2021 18:31:52 +0200 Subject: static checks. --- .github/workflows/build_release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to '.github') diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 0205afa..19a59c9 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -2,9 +2,36 @@ name: 🔧 Build -> Package 📦 on: [push, pull_request] jobs: + static-checks: + name: 📊 Static Checks (clang-format, black format, file format) + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo apt-get install -qq dos2unix recode clang-format-11 + sudo update-alternatives --remove-all clang-format + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-11 100 + sudo pip3 install black==20.8b1 pygments + + - name: File formatting checks (file_format.sh) + run: | + bash ./misc/scripts/file_format.sh + + - name: Style checks via clang-format (clang_format.sh) + run: | + bash ./misc/scripts/clang_format.sh + + - name: Python style checks via black (black_format.sh) + run: | + bash ./misc/scripts/black_format.sh + build: runs-on: ${{ matrix.os }} name: 🔧 Build + needs: static-checks strategy: matrix: include: -- cgit v1.2.3