-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (45 loc) · 1.41 KB
/
cmake.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
name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Load submodules
run: chmod +x ./scripts/update_components.sh && ./scripts/update_components.sh
- name: Cache esp-idf build
uses: actions/cache@v3
with:
path: "build"
key: ${{ runner.os }}-build
- name: Esp-idf build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v4.4
target: esp32
path: "."
- name: Extract compile_commands.json
# the following compilation flags originate from esp-idf
# they must be removed as they are unknown to clang
run: |
cp build/compile_commands.json .
sed -i "s/-mlongcalls/ /g" compile_commands.json
sed -i "s/-fno-tree-switch-conversion/ /g" compile_commands.json
sed -i "s/-fstrict-volatile-bitfields/ /g" compile_commands.json
cat ./compile_commands.json
- name: Cpp Lint
uses: cpp-linter/cpp-linter-action@v2
id: cpp-linter
with:
# don't use .clang-format because versions for clang-format versions are incompatible
style: google
tidy-checks: "" # use .clang-tidy
ignore: ".github|components|build"
files-changed-only: false