@@ -10,40 +10,52 @@ permissions:
10
10
contents : write
11
11
pull-requests : write
12
12
13
+ env :
14
+ BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
15
+
13
16
jobs :
14
17
ci :
15
18
name : Report memory usage
16
19
runs-on : ubuntu-latest
17
20
steps :
18
- - name : Checkout main
19
- uses : actions/checkout@v3
20
- with :
21
- submodules : recursive
22
- ref : main
23
- - name : Baseline report
24
- run : |
25
- make test
26
- mkdir artifacts
27
- # TODO: main does not generate the .size files yet:
28
- # cat build/test/*.size > artifacts/baseline-report.txt
29
- - name : Checkout update
30
- uses : actions/checkout@v3
21
+ - name : Generate memory usage report (current branch)
22
+ uses : ./.github/actions/memory-report.yml
31
23
with :
32
- submodules : recursive
33
- - name : Update report
34
- run : |
35
- make test
36
- cat build/test/*.size > artifacts/update-report.txt
37
- cp artifacts/update-report.txt artifacts/baseline-report.txt
38
- # TODO: remove cp
39
- - name : Combine
40
- run :
41
- python3 parse-reports.py artifacts/baseline-report.txt artifacts/update-report.txt artifacts/report.txt
42
- - name : Comment
43
- uses : gavv/pull-request-artifacts@v2.1.0
24
+ branch : ${GITHUB_REF##*/}
25
+ - name : Generate memory usage report (main)
26
+ uses : ./.github/actions/memory-report.yml
44
27
with :
45
- commit : ${{ github.event.pull_request.head.sha }}
46
- repo-token : ${{ secrets.GITHUB_TOKEN }}
47
- artifacts : artifacts/report.txt
48
- comment-title : " Memory usage report"
49
- comment-message : " Here is an overview of how your pull request impacts the memory usage compared to the main branch:"
28
+ branch : main
29
+
30
+ # - name: Checkout main
31
+ # uses: actions/checkout@v3
32
+ # with:
33
+ # submodules: recursive
34
+ # ref: main
35
+ # - name: Baseline report
36
+ # run: |
37
+ # make test
38
+ # mkdir artifacts
39
+ # # TODO: main does not generate the .size files yet:
40
+ # #cat build/test/*.size > artifacts/baseline-report.txt
41
+ # - name: Checkout update
42
+ # uses: actions/checkout@v3
43
+ # with:
44
+ # submodules: recursive
45
+ # - name: Update report
46
+ # run: |
47
+ # make test
48
+ # cat build/test/*.size > artifacts/update-report.txt
49
+ # cp artifacts/update-report.txt artifacts/baseline-report.txt
50
+ # # TODO: remove cp
51
+ # - name: Combine
52
+ # run:
53
+ # python3 parse-reports.py artifacts/baseline-report.txt artifacts/update-report.txt artifacts/report.txt
54
+ # - name: Comment
55
+ # uses: gavv/pull-request-artifacts@v2.1.0
56
+ # with:
57
+ # commit: ${{ github.event.pull_request.head.sha }}
58
+ # repo-token: ${{ secrets.GITHUB_TOKEN }}
59
+ # artifacts: artifacts/report.txt
60
+ # comment-title: "Memory usage report"
61
+ # comment-message: "Here is an overview of how your pull request impacts the memory usage compared to the main branch:"
0 commit comments