Skip to content

Commit 255c056

Browse files
committed
Try to put back together
1 parent 04ba1e1 commit 255c056

File tree

2 files changed

+28
-15
lines changed

2 files changed

+28
-15
lines changed

.github/workflows/memory.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,46 @@ permissions:
77
contents: write
88
pull-requests: write
99

10-
env:
11-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
12-
1310
jobs:
1411
ci:
1512
name: Report memory usage
1613
runs-on: ubuntu-latest
1714
steps:
15+
# To get the potential changes to CI
1816
- name: Checkout
1917
uses: actions/checkout@v3
2018
with:
2119
submodules: recursive
20+
2221
- name: Generate memory usage report (current branch)
2322
uses: ./.github/actions/memory-report
2423
with:
2524
branch: ${{ github.head_ref }}
26-
- name: Generate memory usage report (main)
27-
uses: ./.github/actions/memory-report
25+
# TODO: Comment back in
26+
#- name: Generate memory usage report (main)
27+
# uses: ./.github/actions/memory-report
28+
# with:
29+
# branch: ${{ github.base_ref }}
30+
31+
# To get back to the PR branch
32+
- name: Checkout
33+
uses: actions/checkout@v3
2834
with:
29-
branch: ${{ github.base_ref }}
35+
submodules: recursive
36+
37+
- name: Compare
38+
run:
39+
python3 parse-reports.py artifacts/baseline-report.txt artifacts/update-report.txt artifacts/report.txt
40+
41+
- name: Comment
42+
uses: gavv/pull-request-artifacts@v2.1.0
43+
with:
44+
commit: ${{ github.event.pull_request.head.sha }}
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
artifacts: report.txt
47+
comment-title: "Memory usage report"
48+
comment-message: "Here is an overview of how your pull request impacts the memory usage compared to the main branch:"
49+
3050

3151
# - name: Checkout main
3252
# uses: actions/checkout@v3
@@ -52,11 +72,4 @@ jobs:
5272
# - name: Combine
5373
# run:
5474
# python3 parse-reports.py artifacts/baseline-report.txt artifacts/update-report.txt artifacts/report.txt
55-
# - name: Comment
56-
# uses: gavv/pull-request-artifacts@v2.1.0
57-
# with:
58-
# commit: ${{ github.event.pull_request.head.sha }}
59-
# repo-token: ${{ secrets.GITHUB_TOKEN }}
60-
# artifacts: artifacts/report.txt
61-
# comment-title: "Memory usage report"
62-
# comment-message: "Here is an overview of how your pull request impacts the memory usage compared to the main branch:"
75+

parse-reports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
with open('artifacts/report.txt', 'w') as f:
1+
with open('report.txt', 'w') as f:
22
f.write("Test")

0 commit comments

Comments
 (0)