From ebb5f52423a8b1eaaaa3ebdf015362f17ccd966a Mon Sep 17 00:00:00 2001 From: Will <2185386+willhoy@users.noreply.github.com> Date: Fri, 10 May 2024 18:17:18 +0100 Subject: [PATCH 1/4] Create formatting-check.yml Signed-off-by: Will <2185386+willhoy@users.noreply.github.com> --- .github/workflows/formatting-check.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/formatting-check.yml diff --git a/.github/workflows/formatting-check.yml b/.github/workflows/formatting-check.yml new file mode 100644 index 00000000..669b93ce --- /dev/null +++ b/.github/workflows/formatting-check.yml @@ -0,0 +1,23 @@ +name: Formatting check + +on: + pull_request: + types: + - "opened" + - "reopened" + - "synchronize" + - "labeled" + - "unlabeled" + +jobs: + formatting_check: + name: Formatting Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: clang-format style check + run: | + git clang-format-14 --diff -q origin/main | tee format_diff.txt + if [ -s format_diff.txt ]; then exit 1; fi From da11f0aaedd0007fa76551ffbec192179e759873 Mon Sep 17 00:00:00 2001 From: Will <2185386+willhoy@users.noreply.github.com> Date: Fri, 10 May 2024 18:18:13 +0100 Subject: [PATCH 2/4] Update build.yml Signed-off-by: Will <2185386+willhoy@users.noreply.github.com> --- .github/workflows/build.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c16136a..996e89bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,21 +42,6 @@ jobs: # GitHub Pages directory path ghpagesdir: ./docs - Formatting: - name: Clang Format - runs-on: ubuntu-latest - strategy: - matrix: - path: - - 'src' - - 'examples' - steps: - - uses: actions/checkout@v3 - - name: Run clang-format style check for C/C++/Protobuf programs. - uses: jidicula/clang-format-action@v4.11.0 - with: - clang-format-version: '14' - check-path: ${{ matrix.path }} Linting: name: Shellcheck From e4d9487700a9bcd191ba7c5cc0d7672e9983e7b6 Mon Sep 17 00:00:00 2001 From: Will <2185386+willhoy@users.noreply.github.com> Date: Fri, 27 Jun 2025 20:39:25 +0100 Subject: [PATCH 3/4] Update formatting-check.yml Signed-off-by: Will <2185386+willhoy@users.noreply.github.com> --- .github/workflows/formatting-check.yml | 28 +++++++++----------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/formatting-check.yml b/.github/workflows/formatting-check.yml index 669b93ce..04bf0157 100644 --- a/.github/workflows/formatting-check.yml +++ b/.github/workflows/formatting-check.yml @@ -1,23 +1,13 @@ -name: Formatting check - -on: - pull_request: - types: - - "opened" - - "reopened" - - "synchronize" - - "labeled" - - "unlabeled" - +name: clang-format Check +on: [push, pull_request] jobs: - formatting_check: + formatting-check: name: Formatting Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: clang-format style check - run: | - git clang-format-14 --diff -q origin/main | tee format_diff.txt - if [ -s format_diff.txt ]; then exit 1; fi + - uses: actions/checkout@v4 + - name: Run clang-format style check for C++ programs. + uses: jidicula/clang-format-action@v4.15.0 + with: + clang-format-version: '14' + check-path: 'src' From 77c909de9b6729a31a95ee31eee076d8dfe42e80 Mon Sep 17 00:00:00 2001 From: Will <2185386+willhoy@users.noreply.github.com> Date: Fri, 27 Jun 2025 20:45:50 +0100 Subject: [PATCH 4/4] Update formatting-check.yml Signed-off-by: Will <2185386+willhoy@users.noreply.github.com> --- .github/workflows/formatting-check.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/formatting-check.yml b/.github/workflows/formatting-check.yml index 04bf0157..cdc2938c 100644 --- a/.github/workflows/formatting-check.yml +++ b/.github/workflows/formatting-check.yml @@ -4,10 +4,15 @@ jobs: formatting-check: name: Formatting Check runs-on: ubuntu-latest + strategy: + matrix: + path: + - 'src' + - 'examples' steps: - uses: actions/checkout@v4 - - name: Run clang-format style check for C++ programs. + - name: Run clang-format style check for C/C++/Protobuf programs. uses: jidicula/clang-format-action@v4.15.0 with: clang-format-version: '14' - check-path: 'src' + check-path: ${{ matrix.path }}