format-check: add collect errors job #89
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Format Check' | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
branches: | |
- 'main' | |
jobs: | |
verify-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: false | |
persist-credentials: false | |
- name: Get changed source files that need format check | |
id: changed-files | |
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5 | |
with: | |
files: | | |
cores/arduino/**/*.{c,cpp,h,hpp,ino} | |
loader/**/*.{c,cpp,h,hpp,ino} | |
libraries/**/*.{c,cpp,h,hpp,ino} | |
files_ignore: | | |
cores/arduino/api/** | |
loader/llext_exports.c | |
libraries/examples/** | |
libraries/extras/** | |
libraries/ea_malloc/** | |
write_output_files: true | |
- name: List changed files | |
if: steps.changed-files.outputs.any_changed == 'true' | |
run: cat .github/outputs/all_changed_files.txt | |
- name: Run clang-format check | |
if: steps.changed-files.outputs.any_changed == 'true' | |
uses: pillo79/clang-format-action@05f671e71f0758aba4d3c9dbb0ee81bc5f0137c6 | |
with: | |
clang-format-version: '19' | |
check-files-from: .github/outputs/all_changed_files.txt |