Pr fix format check UI fail #82
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' | ||
Check failure on line 1 in .github/workflows/format_check.yml
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
jobs: | ||
verify-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: false | ||
persist-credentials: false | ||
- name: Get first commit SHA | ||
id: first-commit | ||
if: github.event_name == 'workflow_dispatch' | ||
run: echo "sha=$(git rev-list --max-parents=0 HEAD)" >> $GITHUB_OUTPUT | ||
- 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 | ||
base_sha: ${{ steps.first-commit.outputs.sha if github.event_name == 'workflow_dispatch' else '' }} | ||
- 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 |