memprobe is in free beta. Sign up now during beta to get 40% off Pro for life. See pricing

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

InputMeaning
filePath to the firmware ELF. Required.
api-keymemprobe API key. Required; use a repository secret.
projectProject name at memprobe.dev. Saves the build and enables the baseline diff.
fail-onFail when growth passes a limit, like flash:+2KB or ram:0.
base-fileDiff against a local ELF instead of the saved baseline.
budget-flash / budget-ramBudgets that override memprobe.toml.
commentSet 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.

Analyze your own firmware
Drop in an ELF and see exactly where your flash and RAM go.
Open the analyzer