-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (47 loc) · 1.43 KB
/
memory.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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)
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 }}
# To get back to the PR branch
- name: Checkout
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 \
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 }}