forked from SiliconLabsSoftware/matter_extension
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 2.27 KB
/
code-size-check.yaml
File metadata and controls
63 lines (59 loc) · 2.27 KB
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
name: Code Size Check
permissions:
contents: read
pull-requests: read
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- "release_*"
concurrency:
group: code-size-check-${{ github.ref }}
cancel-in-progress: true
jobs:
code-size-check:
name: Code Size Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: "true"
- name: Install tools
uses: ./.github/actions/install-tools
- name: Checkout PR target branch
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.base.sha }}
path: baseline
submodules: "true"
- name: Build code-canary app
uses: SiliconLabsSoftware/matter_build_action@v2
with:
json-file-path: ".github/silabs-code-size.json"
path-to-example-app: "./slc/apps/multi-sensor-app/thread/multi-sensor-app.slcp"
example-app: code-canary
build-script: "./slc/build.sh"
output-directory: " "
build-type: "standard"
- name: Move results
run: |
mv ./out ./current
- name: Build code-canary app on PR target
uses: SiliconLabsSoftware/matter_build_action@v2
with:
json-file-path: ".github/silabs-code-size.json"
path-to-example-app: "./baseline/slc/apps/multi-sensor-app/thread/multi-sensor-app.slcp"
example-app: code-canary
build-script: "./baseline/slc/build.sh"
output-directory: " "
build-type: "standard"
- name: Generate Code Size Results and Compare
shell: bash
run: |
./slc/script/code_size_result.sh ./current/ current.csv
./slc/script/code_size_result.sh ./out/ target.csv
cat ./current.csv
cat ./target.csv
python3 ./slc/script/code_size_diff_check.py ./current.csv ./target.csv | tee code_size_report.txt