Skip to content

github: fix verify jobs to always report status #93

github: fix verify jobs to always report status

github: fix verify jobs to always report status #93

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:
format-check:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- check: 'cores/arduino/'
exclude: 'cores/arduino/api/'
- check: 'loader/'
exclude: 'loader/llext_exports\.c$'
- check: 'libraries/'
exclude: '(examples|extras|ea_malloc)'
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: false
persist-credentials: false
- name: Run clang-format check
uses: jidicula/[email protected]
with:
clang-format-version: '19'
check-path: ${{ matrix.path['check'] }}
exclude-regex: ${{ matrix.path['exclude'] }}
verify-format:
name: verify-format
runs-on: ubuntu-latest
if: always()
needs: format-check
steps:
- name: Check format results
run: |
if [[ "${{ needs.format-check.result }}" == "failure" ||
"${{ needs.format-check.result }}" == "cancelled" ]]; then
echo "Format check failed or was cancelled"
exit 1
else
echo "Format check completed successfully or was skipped"
fi