Skip to content

refactor(CI): ♻️ Replace existing CIs with one Quality Control CI #10

refactor(CI): ♻️ Replace existing CIs with one Quality Control CI

refactor(CI): ♻️ Replace existing CIs with one Quality Control CI #10

Workflow file for this run

name: Quality Control
on:
push:
branches: [ "Main-Trunk" ]
pull_request:
branches: [ "Main-Trunk" ]
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=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