Repository navigation
82 lines (73 loc) · 3.42 KB
/
Copy pathcodspeed.yml
File metadata and controls
82 lines (73 loc) · 3.42 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CodSpeed
# The hosted twin of the CI `bench` job. That job DIFFS cachegrind Ir of the PR
# binary against an origin/main binary and is the merge gate. This lane runs
# the same class of measurement (valgrind CPU simulation, deterministic) on
# the targets in codspeed.yml and uploads per-commit results, so every PR gets
# a differential flamegraph per target and a trend line lives somewhere other
# than a checked-in baseline. It is a PROFILER and a record, not a second
# gate: nothing here is a required check.
#
# Docs-only diffs are skipped by path: they cannot change the instruction
# count of a C binary.
on:
push:
branches: [main]
paths-ignore:
- '**.md'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
permissions:
contents: read
concurrency:
group: codspeed-${{ github.ref }}
cancel-in-progress: true
jobs:
simulation:
name: codspeed (simulation)
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
id-token: write # OIDC upload; the repo is public, so no token secret is needed
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Build the release interpreter
run: ./build.sh
# The target set is a claim; pin it before measuring anything. Red if a
# consumer row is gone, the pin is a branch name, or an exec line reaches
# a DMG outside the fetched dir. Its --selftest plants each of those.
- name: Pin the lane's target set (tools/codspeed_targets_check.sh)
run: bash tools/codspeed_targets_check.sh
# A real consumer in the matrix. Pinned by SHA, not branch: a moving
# consumer would put ITS changes into this repo's trend line (the
# solver-policy confound). Bump deliberately, in a PR that says why.
# Shallow fetch of one commit; `git clone` of a branch is not a pin.
- name: Fetch consumer DMG at its pin
env:
DMG_REF: afd9bd52778cb0a8d1ab0473ec726aaae556fb90 # DMG master, 2026-10-06 (DMG#79: ready for the boolean type, #1637)
run: |
set -euo pipefail
mkdir -p .codspeed-consumers/DMG && cd .codspeed-consumers/DMG
git init -q && git remote add origin https://github.com/InauguralSystems/DMG
git fetch -q --depth 1 origin "$DMG_REF"
git -c advice.detachedHead=false checkout -q FETCH_HEAD
test -f roms/cpu_instrs.gb && test -f eigs.json
echo "DMG at $(git rev-parse HEAD)"
# `run` is deliberately omitted: with no command the runner executes the
# exec-harness targets declared in codspeed.yml at the repository root.
#
# cycle-estimation OFF: the headline metric is then INSTRUCTIONS, the
# unit the in-repo Ir gate uses and the unit the dev box agrees with
# (perf `instructions:u` matched cachegrind Ir within 1%). With it on,
# the first run attributed ~60% of the DMG shape's time to simulated
# cache misses; perf stat on the box the same night read IPC 1.61,
# 1.6% last-level references and 76 K memory misses in a 1.19 G
# instruction run — a busy core, not a stalled one. A model that
# disagrees with the hardware by that much is not a headline number.
- name: Run codspeed.yml targets under CPU simulation
uses: CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1
with:
mode: simulation
cycle-estimation: false