GitHub Action
A size report on every pull request, and a failed job when a memory budget is exceeded.
memprobe-action builds on the CLI: it analyzes your ELF on the runner, posts a sticky PR comment with flash/RAM totals and symbol-level changes, and exits non-zero on a budget breach. The ELF is parsed on the runner; only section and symbol metadata is sent.
Quick start
name: firmware-size
on: [pull_request]
permissions:
pull-requests: write
jobs:
size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build firmware
run: make # produces build/firmware.elf
- uses: memprobe-dev/memprobe-action@v1
with:
file: build/firmware.elf
project: my-firmware
api-key: ${{ secrets.MEMPROBE_API_KEY }}
Create the key in Account settings and store it as the MEMPROBE_API_KEY repository secret. pull-requests: write lets the action post the comment.
Size diff without a second build
With project set, every run is compared against the project's baseline build saved at memprobe.dev, so the PR comment shows flash/RAM deltas and the largest symbol changes without building the base branch. The baseline is the newest saved build, or a build you pin as the baseline in your project. The first run has nothing to compare against and skips the diff.
Add fail-on to gate growth:
with:
file: build/firmware.elf
project: my-firmware
fail-on: 'flash:+2KB'
api-key: ${{ secrets.MEMPROBE_API_KEY }}
Budgets
A memprobe.toml next to your build is picked up automatically; the job fails when a budget is exceeded and the verdict appears in the PR comment. [regions] capacities add utilization percentages to the report. You can also pass budget-flash / budget-ram inputs instead.
Inputs
| Input | Meaning |
|---|---|
| file | Path to the firmware ELF. Required. |
| api-key | memprobe API key. Required; use a repository secret. |
| project | Project name at memprobe.dev. Saves the build and enables the baseline diff. |
| fail-on | Fail when growth passes a limit, like flash:+2KB or ram:0. |
| base-file | Diff against a local ELF instead of the saved baseline. |
| budget-flash / budget-ram | Budgets that override memprobe.toml. |
| comment | Set false to skip the PR comment. |
The action also sets flash, ram, flash-delta, ram-delta, and passed as step outputs for later workflow steps. The full list is in the README.
Other CI systems
GitLab, Jenkins, and everything else can run the CLI directly: memprobe check exits non-zero on a breach and memprobe diff --project prints a markdown report. See the CLI reference.
Privacy
The action runs the CLI on your runner, so the same guarantee applies: your compiled binary never leaves the runner. Only section and symbol metadata is sent, the same information readelf -S and nm print.