Skip to content

chore: Memory benchmark workflow #3

chore: Memory benchmark workflow

chore: Memory benchmark workflow #3

name: Memory benchmark
on:
pull_request:
types:
- opened
- reopened
- synchronize
- labeled
permissions:
contents: read
jobs:
memory-benchmark:
name: Memory benchmark
# aarch64 to match the arch the committed baseline.json was generated on.
# leaked_bytes/peak_bytes differ by arch, so the gate needs matching arch.
runs-on: ubuntu-24.04-arm # GitHub-hosted ARM; Docker preinstalled
# Only runs when the PR carries the `check-memory-benchmark` label.
if: contains(github.event.pull_request.labels.*.name, 'check-memory-benchmark')
steps:
- uses: actions/checkout@v4
# Uses the Dockerfile environment for repeatable runs
- name: Run memory benchmark
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make memory-use-bench
# Upload all three flamegraph views per scenario (peak/leaks/temporary).
- name: Upload flamegraph reports
if: always()
uses: actions/upload-artifact@v4
with:
name: memray-flamegraphs
path: tests/perf/reports/*.html
if-no-files-found: warn