mirror of
https://github.com/micropython/micropython.git
synced 2026-01-09 05:30:27 +01:00
github/workflows: Comment on code size change instead of failing CI.
This changes the code size workflow to post a comment on pull requests with the code size report. It also removes the error threshold so that the test won't fail if code size increases. Allowable code size changes are subjective, so shouldn't cause CI to fail. In addition, failing CI tests can cause other hooks like code coverage reports to be suppressed, so this fixes that problem as well. Fixes issue #8464. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
committed by
Damien George
parent
d5181034f2
commit
1b774b373e
16
.github/workflows/code_size.yml
vendored
16
.github/workflows/code_size.yml
vendored
@@ -24,4 +24,18 @@ jobs:
|
||||
- name: Build
|
||||
run: source tools/ci.sh && ci_code_size_build
|
||||
- name: Compute code size difference
|
||||
run: tools/metrics.py diff --error-threshold 0 ~/size0 ~/size1
|
||||
run: tools/metrics.py diff ~/size0 ~/size1 | tee > diff
|
||||
- name: Save PR number
|
||||
if: github.event_name == 'pull_request'
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
run: echo $PR_NUMBER > pr_number
|
||||
- name: Upload diff
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: code-size-report
|
||||
path: |
|
||||
diff
|
||||
pr_number
|
||||
retention-days: 1
|
||||
|
||||
Reference in New Issue
Block a user