From ef1bf9c35de940b169231dbdba5a4e45025bec08 Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Mon, 15 Dec 2025 19:24:34 +1100 Subject: [PATCH] Add cppcheck and formatter to CI --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ platformio.ini | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..956d75e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - uses: actions/cache@v5 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + key: ${{ runner.os }}-pio + - uses: actions/setup-python@v6 + with: + python-version: '3.14' + - name: Install PlatformIO Core + run: pip install --upgrade platformio + + - name: Run cppcheck + run: pio check --fail-on-defect medium --fail-on-defect high + + - name: Run clang-format + run: bin/clang-format-fix && git diff --exit-code + + - name: Build CrossPoint + run: pio run diff --git a/platformio.ini b/platformio.ini index 6918e34..7998dcb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -8,6 +8,9 @@ board = esp32-c3-devkitm-1 framework = arduino monitor_speed = 115200 upload_speed = 921600 +check_tool = cppcheck +check_skip_packages = yes +check_severity = medium, high board_upload.flash_size = 16MB board_upload.maximum_size = 16777216