You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TODO (human): one or two sentences on why we want this captured — e.g. "so we can stand the CodSpeed benchmark CI back up on upstream linopy without rediscovering the org/runner dance."
Note
The following content was generated by AI (drafted by Claude while wiring CodSpeed up on this fork). It's a setup runbook, not discussion.
What this covers
The benchmark workflows are committed (.github/workflows/codspeed.yml, codspeed-memory.yml, codspeed-macro.yml), but they only report once a chunk of out-of-band setup exists that the repo can't carry. This is that checklist — for re-creating the setup on another repo/org (e.g. upstream linopy) later.
Prerequisites
The repo must live under a GitHub organization. Walltime/macro runners are org-only — a personal account cannot use them (CodSpeed greys the feature out with "this feature is only available for organization accounts").
CodSpeedHQ/action@v4. v4 made mode a required input — every job must set mode: to one of simulation | walltime | memory. (This bit us: omitting it fails the step instantly.)
1. Connect CodSpeed
Install the CodSpeed GitHub App on the org (not a personal account): app.codspeed.io → import → select the org → add the repo.
Make sure the repo appears under the org workspace on CodSpeed, not your personal workspace. A repo transferred into the org keeps its old personal CodSpeed project; if it shows under personal, disconnect it there and re-add it under the org, or macro stays greyed out even though the app is on the org.
2. Auth — OIDC (no token secret)
The workflows use OIDC, so there is no CODSPEED_TOKEN secret to manage. Each job needs:
Once the app is connected (step 1), uploads authenticate automatically. Verified: the run logs show Performance data uploaded / Linked repository: <org>/<repo>.
3. Macro / walltime runners (org-only)
CodSpeed side: in the org workspace settings, enable macro runners. This registers CodSpeed's bare-metal runners to the GitHub org (they appear in the org's Default runner group).
GitHub side (public repos only):https://github.com/organizations/<org>/settings/actions/runner-groups → Default → tick "Allow public repositories". Without this the runs-on: codspeed-macro job sits queued forever (no eligible runner).
Verified: after both, a previously-stuck codspeed-macro job is picked up by a runner within seconds.
4. Security hardening (do this)
Restrict the runner group to selected repositories (just this repo), not "all repositories" — limits blast radius on a public org.
Optionally restrict the runner group to the macro workflow (.../codspeed-macro.yml@refs/heads/master) so nothing else can land jobs on the bare-metal runners.
Deliberate design property:codspeed-macro.yml triggers on push: master + workflow_dispatch only — never pull_request — so untrusted fork PRs cannot execute on the self-hosted/macro runner (the main public-repo self-hosted-runner risk). Do not add a pull_request trigger to the macro workflow. (The PR-triggered simulation/memory jobs run on GitHub-hosted ubuntu-latest, not the macro runner.)
5. Workflows & cadence (already in the repo)
Workflow
mode
Runs on
Triggers
Cost
codspeed.yml
simulation
GitHub ubuntu-latest
push master + PR→master + dispatch
free
codspeed-memory.yml
memory
GitHub ubuntu-latest
push master + PR→master + dispatch
free
codspeed-macro.yml
walltime
codspeed-macro (org)
push master + dispatch
macro-minutes
All three are continue-on-error: true (non-gating) until baselines/noise are characterized.
6. Plan limits
Free plan includes 600 macro-runner minutes/month — consumed by walltime only. simulation and memory run on GitHub-hosted runners and consume zero macro minutes (just free public-repo Actions minutes).
The baseline is the first successful run on the default branch (master), per instrument. PRs-to-master (simulation/memory) and master pushes (all three) then compare against it.
Parked follow-up
Memory CI currently = CodSpeed memory only (per-test heap allocations). Open question: also gate the end-to-end pipeline OOM ceiling (python -m benchmarks memory --phase pipeline), which CodSpeed's per-test run structurally can't capture. Preferred shape: expose the pipeline phase as a CodSpeed-measured benchmark rather than a second workflow. (A self-contained memray --fail-over gate was prototyped but left unmerged.)
TODO (human): one or two sentences on why we want this captured — e.g. "so we can stand the CodSpeed benchmark CI back up on upstream linopy without rediscovering the org/runner dance."
Note
The following content was generated by AI (drafted by Claude while wiring CodSpeed up on this fork). It's a setup runbook, not discussion.
What this covers
The benchmark workflows are committed (
.github/workflows/codspeed.yml,codspeed-memory.yml,codspeed-macro.yml), but they only report once a chunk of out-of-band setup exists that the repo can't carry. This is that checklist — for re-creating the setup on another repo/org (e.g. upstream linopy) later.Prerequisites
CodSpeedHQ/action@v4. v4 mademodea required input — every job must setmode:to one ofsimulation|walltime|memory. (This bit us: omitting it fails the step instantly.)1. Connect CodSpeed
2. Auth — OIDC (no token secret)
CODSPEED_TOKENsecret to manage. Each job needs:Performance data uploaded/Linked repository: <org>/<repo>.3. Macro / walltime runners (org-only)
Defaultrunner group).https://github.com/organizations/<org>/settings/actions/runner-groups→ Default → tick "Allow public repositories". Without this theruns-on: codspeed-macrojob sits queued forever (no eligible runner).codspeed-macrojob is picked up by a runner within seconds.4. Security hardening (do this)
.../codspeed-macro.yml@refs/heads/master) so nothing else can land jobs on the bare-metal runners.codspeed-macro.ymltriggers onpush: master+workflow_dispatchonly — neverpull_request— so untrusted fork PRs cannot execute on the self-hosted/macro runner (the main public-repo self-hosted-runner risk). Do not add apull_requesttrigger to the macro workflow. (The PR-triggeredsimulation/memoryjobs run on GitHub-hostedubuntu-latest, not the macro runner.)5. Workflows & cadence (already in the repo)
modecodspeed.ymlsimulationubuntu-latestcodspeed-memory.ymlmemoryubuntu-latestcodspeed-macro.ymlwalltimecodspeed-macro(org)All three are
continue-on-error: true(non-gating) until baselines/noise are characterized.6. Plan limits
simulationandmemoryrun on GitHub-hosted runners and consume zero macro minutes (just free public-repo Actions minutes).7. Establishing the baseline
The baseline is the first successful run on the default branch (master), per instrument. PRs-to-master (simulation/memory) and master pushes (all three) then compare against it.
Parked follow-up
Memory CI currently = CodSpeed memory only (per-test heap allocations). Open question: also gate the end-to-end pipeline OOM ceiling (
python -m benchmarks memory --phase pipeline), which CodSpeed's per-test run structurally can't capture. Preferred shape: expose the pipeline phase as a CodSpeed-measured benchmark rather than a second workflow. (A self-contained memray--fail-overgate was prototyped but left unmerged.)