Skip to content

Use clang format

Use clang format #1031

Workflow file for this run

name: PlatformIO CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio setuptools wheel
- name: Install clang-format
run: sudo apt-get install clang-format
- name: Check clang-format
run: |
# Only check the format of the files in the root directory
clang-format --dry-run --Werror *.c *.cpp *.h *.ino
- name: Build
run: pio ci -c platformio.ini .