Skip to content

Commit

Permalink
Maybe fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
magnmaeh committed Oct 12, 2024
1 parent 3ace2c1 commit d6e53b5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/actions/memory-report/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ inputs:
branch:
required: true

outputs:
report:
description: "A raw memory usage report"
value: ${{ steps.make_report.outputs.report }}

runs:
using: "composite"
steps:
Expand All @@ -14,10 +19,11 @@ runs:
submodules: recursive
ref: ${{ inputs.branch }}
- name: Report
id: make_report
shell: bash
run: |
make test
cat build/test/unit/*.size > build/memory-report-${{ inputs.branch }}.txt
echo "report=$(cat build/test/unit/*.size)" >> $GITHUB_OUTPUT
- name: Upload
uses: actions/upload-artifact@v4
with:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/memory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:
submodules: recursive

- name: Generate memory usage report (current branch)
id: head
uses: ./.github/actions/memory-report
with:
branch: ${{ github.head_ref }}
- name: Generate memory usage report (target branch)
id: base
uses: ./.github/actions/memory-report
with:
branch: ${{ github.base_ref }}
Expand All @@ -32,18 +34,23 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive

- name: Compare
run: |
echo "$BASE_REPORT" > base_report.txt
echo "$HEAD_REPORT" > head_report.txt
python3 -m pip install -r scripts/ci/reports/requirements.txt
python3 scripts/ci/reports/parse-reports.py \
build/memory-report-${{ github.head_ref }}.txt \
build/memory-report-${{ github.base_ref }}.txt \
base_report.txt \
head_report.txt \
report
- name: Comment memory usage tables
uses: GrantBirki/[email protected]
with:
file: report.md
env:
BASE_REPORT: ${{ steps.base.outputs.report }}
HEAD_REPORT: ${{ steps.head.outputs.report }}



Expand Down

0 comments on commit d6e53b5

Please sign in to comment.