Skip to content

Commit

Permalink
[eclipse-iceoryx#265] Add clang-format check to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Jul 10, 2024
1 parent 56b3a01 commit 9aed254
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Check license header
run: ./internal/scripts/ci_test_spdx_license_header.sh

static-code-analysis:
static-code-analysis-rust:
needs: preflight-check
if: ${{ needs.changes.outputs.source-code == 'true' }}
strategy:
Expand Down Expand Up @@ -72,6 +72,27 @@ jobs:
- name: Build documentation
run: cargo doc

static-code-analysis-cpp:
needs: preflight-check
if: ${{ needs.changes.outputs.source-code == 'true' }}
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: clang-format and clang-tidy versions
run: |
clang-format --version
clang-tidy --version
- name: Run clang-format
run: git ls-files | grep -E "\.(c|cc|cpp|cxx|inl|h|hh|hpp|hxx)$" | xargs clang-format -i -style=file --Werror --dry-run

# just to have a sync point for the C++ and Rust static code analysis
static-code-analysis-cpp:
needs: [static-code-analysis-cpp, static-code-analysis-rust]

cargo-nextest:
needs: preflight-check
strategy:
Expand Down

0 comments on commit 9aed254

Please sign in to comment.