Skip to content

Commit bc01cf5

Browse files
committed
Run comment-size-report after size report upload
1 parent a2edfa8 commit bc01cf5

5 files changed

Lines changed: 37 additions & 15 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: comment-size-report
2+
description: Posts a comment on a PR of size report
3+
inputs:
4+
repo-token:
5+
description: 'The GitHub token'
6+
required: false
7+
default: ${{ github.token }}
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Post Size Report
12+
# Don't run on forked repos
13+
if: github.repository_owner == 'project-chip'
14+
shell: bash
15+
run: |
16+
python scripts/memory/gh_report.py \
17+
--verbose \
18+
--report-increases 0.2 \
19+
--report-pr \
20+
--github-comment \
21+
--github-limit-artifact-pages 50 \
22+
--github-limit-artifacts 500 \
23+
--github-limit-comments 20 \
24+
--github-repository project-chip/rs-matter \
25+
--github-api-token "${{ inputs.repo-token }}"

.github/actions/setup-size-reports/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ runs:
1414
shell: bash
1515
env:
1616
GH_CONTEXT: ${{ inputs.gh-context }}
17-
run: python scripts/memory/gh_sizes_environment.py "${GH_CONTEXT}"
17+
run: python scripts/memory/gh_sizes_environment.py "${GH_CONTEXT}"

.github/actions/upload-size-reports/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: upload-size-reports
2-
description: upload-size-reports
2+
description: Upload artifacts of size report
33
inputs:
44
platform-name:
55
description: "Platform name Name"

.github/workflows/bloat_check.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,7 @@ jobs:
4141
if: ${{ !env.ACT }}
4242
with:
4343
gh-context: ${{ toJson(github) }}
44-
- name: Report
45-
run: |
46-
python scripts/memory/gh_report.py \
47-
--verbose \
48-
--report-increases 0.2 \
49-
--report-pr \
50-
--github-comment \
51-
--github-limit-artifact-pages 50 \
52-
--github-limit-artifacts 500 \
53-
--github-limit-comments 20 \
54-
--github-repository project-chip/rs-matter \
55-
--github-api-token "${{ secrets.GITHUB_TOKEN }}"
44+
- name: Post report on PR
45+
uses: ./.github/actions/comment-size-report
46+
with:
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/size-check.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,9 @@ jobs:
6262
uses: ./.github/actions/upload-size-reports
6363
if: ${{ !env.ACT }}
6464
with:
65-
platform-name: linux
65+
platform-name: linux
66+
67+
- name: Post report on PR
68+
uses: ./.github/actions/comment-size-report
69+
with:
70+
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)