Add very simple benchmarking against reactor-c #420
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Memory usage report | |
on: | |
pull_request: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
ci: | |
name: Report memory usage | |
runs-on: ubuntu-latest | |
steps: | |
# To get the potential changes to CI | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Generate memory usage report (base branch) | |
id: base | |
uses: ./.github/actions/memory-report | |
with: | |
branch: ${{ github.base_ref }} | |
- name: Generate memory usage report (head branch) # I.e. the PR branch | |
id: head | |
uses: ./.github/actions/memory-report | |
with: | |
branch: ${{ github.head_ref }} | |
- 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 \ | |
head_report.txt \ | |
base_report.txt \ | |
report | |
env: | |
BASE_REPORT: ${{ steps.base.outputs.report }} | |
HEAD_REPORT: ${{ steps.head.outputs.report }} | |
# This in conjunction with create-or-update-comment allows us to only | |
# comment once and update it after | |
- name: Find Comment | |
uses: peter-evans/find-comment@v3 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Memory report | |
- name: Create or update comment | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body-path: report.md | |
edit-mode: replace |