-
-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (84 loc) · 2.15 KB
/
CI.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches:
- master
paths:
- 'boards/**'
- 'extend/**'
- 'builder/**'
- 'examples/**'
- '**.json'
- '**.py'
jobs:
CodeCheck:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: 1
- name: cppcheck
uses: Qful/check-action@master
with:
github_token: ${{ secrets.OSQ_REPO_TOKEN }}
enable: all
inconclusive: disable
inline_suppression: disable
force_language: c
force: enable
max_ctu_depth: 2
std: c11
output_file: ./codecheck.txt
other_options: --bug-hunting --verbose --std=c99
- name: report
uses: Qful/check-action@master
env:
GITHUB_TOKEN: ${{ secrets.OSQ_REPO_TOKEN }}
BRANCH_NAME: 'master'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: code_check_report
path: codecheck.txt
build:
strategy:
fail-fast: false
matrix:
example:
- "native-blink"
- "native-uart"
- "bsp-pwm"
- "bsp-spi"
- "bsp-template"
- "hpdl-1414"
- "xy-lpwm-fw"
- "xy-lpwm-lcd"
package: ["pio","qio"]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install qio
if: matrix.package == 'qio'
run: |
pip install -U https://github.com/OS-Q/M03/releases/latest/download/qio.zip
qio platform install file://.
- name: Install pio
if: matrix.package == 'pio'
run: |
pip install -U https://github.com/platformio/platformio/archive/develop.zip
pio platform install file://.
- name: Build examples
working-directory: examples
run: |
pio run -d ${{ matrix.example }}