Skip to content

Commit aff41f6

Browse files
committed
add ci
1 parent a79e206 commit aff41f6

File tree

5 files changed

+106
-1
lines changed

5 files changed

+106
-1
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ BreakBeforeBinaryOperators: None
4040
BreakBeforeBraces: Attach
4141
BreakBeforeInheritanceComma: false
4242
BreakBeforeTernaryOperators: true
43-
BreakConstructorInitializersBeforeComma: false
43+
BreakConstructorInitializersBeforeComma: true
4444
BreakConstructorInitializers: BeforeColon
4545
BreakAfterJavaFieldAnnotations: false
4646
BreakStringLiterals: true

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v2
13+
with:
14+
submodules: 'recursive'
15+
16+
- name: Build Examples
17+
uses: espressif/esp-idf-ci-action@v1
18+
with:
19+
esp_idf_version: release-v5.2
20+
target: esp32s3
21+
path: '.'

.github/workflows/package_main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Package Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
continue-on-error: false
14+
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v2
18+
with:
19+
submodules: 'recursive'
20+
21+
- name: Build Main Code
22+
uses: espressif/esp-idf-ci-action@v1
23+
with:
24+
esp_idf_version: release-v5.2
25+
target: esp32s3
26+
path: '.'
27+
command: 'idf.py build'
28+
29+
- name: Upload Build Outputs
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: build-artifacts
33+
path: |
34+
build/bootloader/bootloader.bin
35+
build/partition_table/partition-table.bin
36+
build/bldc_test_stand.bin
37+
build/flash_args
38+
39+
- name: Attach files to release
40+
uses: softprops/action-gh-release@v1
41+
if: ${{ github.event.release && github.event.action == 'published' }}
42+
with:
43+
files: |
44+
build/bldc_test_stand.bin
45+
build/bootloader/bootloader.bin
46+
build/partition_table/partition-table.bin
47+
build/flash_args
48+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Static analysis
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
static_analysis:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v2
12+
with:
13+
submodules: 'recursive'
14+
15+
- name: Run static analysis
16+
uses: esp-cpp/StaticAnalysis@master
17+
with:
18+
# Do not build the project and do not use cmake to generate compile_commands.json
19+
use_cmake: false
20+
21+
# Use the 5.2 release version since it's what we build with
22+
esp_idf_version: release/v5.2
23+
24+
# (Optional) cppcheck args
25+
cppcheck_args: -i$GITHUB_WORKSPACE/components/espp --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt

suppressions.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// category of errors to suppress, e.g. unusedFunction
2+
missingInclude
3+
missingIncludeSystem
4+
unusedFunction
5+
unusedStructMember
6+
functionStatic
7+
cstyleCast
8+
9+
// Specific suppressions of the form:
10+
// [error id]:[filename]:[line]
11+
*:components/espp/*

0 commit comments

Comments
 (0)