Memory report ci #37
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 (current branch) | |
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 }} | |
# To get back to the PR branch | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- 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 \ | |
report.txt | |
- 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 | |
uses: GrantBirki/[email protected] | |
with: | |
file: table-test.md | |