Skip to content

Commit de8238d

Browse files
committed
ci: fail when includes/callgrind.h drifts from the valgrind fork
New check-callgrind-header job diffs the bundled header against CodSpeedHQ/valgrind-codspeed@master on every run, so a fork-side change can't silently get out of sync with the consumed userreqs.
1 parent 2555267 commit de8238d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ jobs:
2727
with:
2828
extra_args: --all-files
2929

30+
check-callgrind-header:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Diff includes/callgrind.h against valgrind-codspeed main
35+
run: |
36+
curl -fsSL -o /tmp/callgrind.h \
37+
https://raw.githubusercontent.com/CodSpeedHQ/valgrind-codspeed/master/callgrind/callgrind.h
38+
if ! diff -u /tmp/callgrind.h includes/callgrind.h; then
39+
echo ""
40+
echo "::error::includes/callgrind.h is out of sync with CodSpeedHQ/valgrind-codspeed."
41+
echo "Copy callgrind/callgrind.h from the fork's default branch into includes/."
42+
exit 1
43+
fi
44+
3045
tests:
3146
strategy:
3247
matrix:
@@ -269,6 +284,7 @@ jobs:
269284
if: always()
270285
needs:
271286
- lint
287+
- check-callgrind-header
272288
- tests
273289
- build
274290
- test-build-cmake

0 commit comments

Comments
 (0)