-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (89 loc) · 2.34 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
97
98
99
100
101
name: CI
on:
push:
branches:
- master
# on:
# push:
# paths:
# - 'src/**'
# pull_request:
# paths:
# - 'src/**'
jobs:
check:
name: check
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: cppcheck
uses: Qful/check-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# check_library: disable
# skip_preprocessor: disable
exclude_check: ./project/
enable: all #performance,portability,warning
inconclusive: disable
inline_suppression: disable
force_language: c
force: enable
max_ctu_depth: 2
# platform: disable
std: c11
output_file: ./cppcheck.txt
other_options: --bug-hunting --verbose --std=c11
- name: report
uses: Qful/check-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'master'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: report
path: cppcheck.txt
build:
needs:
- check
if: success()
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Download
working-directory: src
run: |
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
tar -xf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
# - name: Build
# working-directory: src
# run: |
# mkdir build && cd build
# # cmake -DMCU_TYPE=MM32F031 -D CROSS_COMPILER_PATH=../gcc-arm-none-eabi-10-2020-q4-major .. && make
# # mkdir -p ./output && cp *.elf "$_"
# # make clean
- name: Build
working-directory: src
run: |
mkdir build && cd build
cmake -DMCU_TYPE=MM32F031 -D CROSS_COMPILER_PATH=../gcc-arm-none-eabi-10-2020-q4-major ..
- name: output
run: |
mkdir src/output
- name: Action build
uses: Qful/cmake-action@master
with:
source-dir: src
build-dir: src/output
parallel: 8
- name: Upload
uses: actions/upload-artifact@v2
with:
name: firmware
path: src/output