Skip to content

Commit

Permalink
Try use real data
Browse files Browse the repository at this point in the history
  • Loading branch information
magnmaeh committed Oct 12, 2024
1 parent 2e607f1 commit 4bd41a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/memory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ jobs:
uses: ./.github/actions/memory-report
with:
branch: ${{ github.head_ref }}
# TODO: Comment back in
#- name: Generate memory usage report (main)
# uses: ./.github/actions/memory-report
# with:
# branch: ${{ github.base_ref }}
- name: Generate memory usage report (target branch)
uses: ./.github/actions/memory-report
with:
branch: ${{ github.base_ref }}

# To get back to the PR branch
- name: Checkout
Expand All @@ -36,21 +35,12 @@ jobs:

- name: Compare
run: |
# TODO: Must be the ones generated ofc, but for now just static to test
python3 -m pip install -r scripts/ci/reports/requirements.txt
python3 scripts/ci/reports/parse-reports.py \
scripts/ci/reports/test/update.txt \
scripts/ci/reports/test/main.txt \
build/memory-report-${{ github.head_ref }}.txt \
build/memory-report-${{ github.base_ref }}.txt \
report
- name: Comment
uses: gavv/[email protected]
with:
commit: ${{ github.event.pull_request.head.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifacts: report.txt
comment-title: "Memory usage report"
comment-message: "Here is an overview of how your pull request impacts the memory usage compared to the main branch:"
- name: Comment test table
- name: Comment memory usage tables
uses: GrantBirki/[email protected]
with:
file: report.md
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/reports/parse-reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def format_md_tables(update: pd.DataFrame, main: pd.DataFrame, report: pd.DataFr
| bss | {main.loc[idx]['bss']} | {update.loc[idx]['bss']} | {row['bss'] : <4.2f} |
| total | {main.loc[idx]['dec']} | {update.loc[idx]['dec']} | {row['dec'] : <4.2f} |
"""
format_string += f"## {row['filename'].replace('_c', '.c')}\n" + table + "\n\n"
format_string += f"## {row['filename']}\n" + table + "\n\n"

return format_string

Expand Down

0 comments on commit 4bd41a1

Please sign in to comment.