PR code size Check#446
Open
Jean-Francois Penven (jepenven-silabs) wants to merge 1 commit intomainfrom
Open
Conversation
Comment on lines
16
to
74
| name: Code Size Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| submodules: "true" # Do not initialize submodules automatically | ||
|
|
||
| - name: Install tools | ||
| uses: ./.github/actions/install-tools | ||
|
|
||
| # TODO checkout PR target and build canary app on it. | ||
|
|
||
| - name: Build code-canary app | ||
| uses: SiliconLabsSoftware/matter_build_action@v2.0.0 | ||
| 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: Generate Code Size Result with current changes | ||
| shell: bash | ||
| run: | | ||
| ./slc/script/code_size_result.sh ./out current.csv | ||
| - name: Checkout PR target branch | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ github.event.pull_request.base.ref }} | ||
| submodules: "true" | ||
| - name: Build code-canary app on PR target | ||
| uses: SiliconLabsSoftware/matter_build_action@v2.0.0 | ||
| 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: Go back to PR branch | ||
| run: | | ||
| git checkout ${{ github.head_ref }} | ||
| - name: Generate Code Size Result with PR target | ||
| shell: bash | ||
| run: | | ||
| ./slc/script/code_size_result.sh ./out target.csv | ||
| - name: Compare Code Size Results | ||
| shell: bash | ||
| run: | | ||
| cat ./target.csv | ||
| - name: Compare Code Size Results | ||
| shell: bash | ||
| run: | | ||
| ls -la ./ | ||
| - name: Perform checks and display results | ||
| shell: bash | ||
| run: | | ||
| python3 ./slc/script/code_size_diff_check.py ./current.csv ./target.csv No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions
8b32560 to
bc967da
Compare
e08209a to
616b22e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Link:
Fix MATTER-5919 For now it tracks the multi-sensor app as it's out smallest app configuration possibl
Description of Problem/Feature:
The goal is to prevent component changes bloat accross all samples. Should a fix or feature be needed for a specific use case, then the fix/feature should be apply only to that use case and not cause bloats accross all samples apps
Description of Fix/Solution:
Build the multi-sensor app on the PR and on the PR target branch and compare both code size. Fails should the threshold of increase is met.
Testing Done:
Tested with the CI of this PR.