From 44ebd5a6fff0e85c91cfa70971c0f7333b98766f Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Tue, 28 Jun 2022 12:48:19 +0100 Subject: [PATCH] Add clang-format check to Github actions. --- .github/workflows/clang-format-check.yml | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/clang-format-check.yml diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml new file mode 100644 index 00000000..18a53d44 --- /dev/null +++ b/.github/workflows/clang-format-check.yml @@ -0,0 +1,25 @@ +name: Check code style +on: [push, pull_request] +jobs: + formatting-check: + name: clang-format + runs-on: ubuntu-latest + strategy: + matrix: + path: + - check: 'host/libhackrf/src' + exclude: '' + - check: 'host/hackrf-tools/src' + exclude: '' + - check: 'firmware/common' + exclude: 'firmware/common/xapp058' + - check: 'firmware/hackrf_usb' + exclude: '' + steps: + - uses: actions/checkout@v2 + - name: Run clang-format-action + uses: jidicula/clang-format-action@v4.6.2 + with: + clang-format-version: '14' + check-path: ${{ matrix.path['check'] }} + exclude-regex: ${{ matrix.path['exclude'] }}