Skip to content

Pr fix format check UI fail #67

Pr fix format check UI fail

Pr fix format check UI fail #67

Workflow file for this run

name: 'Format Check'
on:
push:
branches:
- 'main'
pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'main'
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
jobs:
filter-format:
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- 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 of changed files
if: steps.changed-files.outputs.any_changed == 'true'
run: |
ls -la .github/outputs
cat .github/outputs/changed_files.txt
verify-format:
runs-on: ubuntu-latest
needs:
- filter-format
if: needs.filter-format.outputs.any_changed
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: false
persist-credentials: false
- name: Run clang-format check
uses: pillo79/clang-format-action@main
with:
clang-format-version: '19'
check-files-from: .github/outputs/changed_files.txt