Skip to content

feat(quality control): ✨ Add MISRA C-2012 compliance #87

feat(quality control): ✨ Add MISRA C-2012 compliance

feat(quality control): ✨ Add MISRA C-2012 compliance #87

name: Quality Control
on:
push:
branches: [ "Main-Trunk", "Version-1.1.0-Development" ]
pull_request:
branches: [ "Main-Trunk", "Version-1.1.0-Development" ]
jobs:
# Code formatting with clang-format
code_formatting:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Adafruit's Arduino CI
uses: actions/checkout@v4.1.1
with:
repository: adafruit/ci-arduino
path: ci
- name: Install ci/actions_install.sh
run: bash ci/actions_install.sh
- name: Check for correct formatting with clang-format
run: python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
# Static code analysis with cppcheck using PlatformIO
defect_detector:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build defect detector
run: pio run -e defect_detector
- name: Run defect detector
run: pio check -e defect_detector --fail-on-defect=low --fail-on-defect=medium --fail-on-defect=high
# Build the project with PlatformIO
build_on_compatible_targets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build CRSF for Arduino on compatible targets
run: pio run