Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 31 additions & 11 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
name: 'Format Check'

on:
push:
branches:
- 'main'
paths:
- '**/*.c'
- '**/*.cpp'
- '**/*.h'
- '**/*.hpp'

pull_request:
types:
Expand All @@ -18,11 +12,6 @@ on:
- synchronize
branches:
- 'main'
paths:
- '**/*.c'
- '**/*.cpp'
- '**/*.h'
- '**/*.hpp'

workflow_dispatch:
inputs:
Expand All @@ -32,7 +21,27 @@ on:
default: 'warning'

jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
should-check: ${{ steps.filter.outputs.src }}
steps:
# Only checkout for push events, not needed for PRs
- uses: actions/checkout@v4
if: github.event_name == 'push'
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
src:
- '**/*.c'
- '**/*.cpp'
- '**/*.h'
- '**/*.hpp'

format-check:
needs: check-changes
if: needs.check-changes.outputs.should-check == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -58,3 +67,14 @@ jobs:
clang-format-version: '19'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}

verify-format:
if: always()
needs: [check-changes, format-check]
runs-on: ubuntu-latest
steps:
- name: Report Status
run: |
if [[ "${{ needs.format-check.result }}" == "failure" ]]; then
exit 1
fi
1 change: 0 additions & 1 deletion .github/workflows/package_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ jobs:
failOnError: false

verify-core:
name: Collect job errors
runs-on: ubuntu-latest
if: cancelled() || contains(needs.*.result, 'failure')
needs:
Expand Down