-
Notifications
You must be signed in to change notification settings - Fork 26
72 lines (62 loc) · 1.94 KB
/
quality_control.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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