From 30469bb556b33388d3e4037300f3fdda21e08495 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sat, 10 Oct 2026 22:45:53 +0200 Subject: [PATCH] fix(docs): regenerate readme.svg; CI checks it is what its code draws The README figure in v0.1.0 had been drawn by an earlier state of the code: its x tick labels sat 1 px off what the tagged code draws (found by the docs site's figure check). It is regenerated, and a CI job now regenerates it and compares byte for byte. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 19 +++++++++++++++++++ docs/readme.svg | 32 ++++++++++++++++---------------- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25372eb..a351fe8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,25 @@ jobs: go-version: '1.27.2' - run: go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... + readme-figure: + name: the README figure is what its code draws + # docs/readme.svg is generated by tools/compare/readme from this tree. v0.1.0 + # shipped one drawn by an earlier state of the code (its x tick labels sat + # 1 px off what the tagged code draws); regenerating and comparing byte for + # byte keeps the README from showing anything the library does not do. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-go@v7 + with: + go-version: '1.27.2' + - name: Regenerate and compare + run: | + cd tools/compare + go run ./readme > /tmp/readme.svg + cmp /tmp/readme.svg ../../docs/readme.svg || { + echo "::error::docs/readme.svg is stale: run (cd tools/compare && go run ./readme > ../../docs/readme.svg)"; exit 1; } + arch-native: name: arch ${{ matrix.label }} runs-on: ${{ matrix.os }} diff --git a/docs/readme.svg b/docs/readme.svg index c719f82..dfe71c4 100644 --- a/docs/readme.svg +++ b/docs/readme.svg @@ -23,17 +23,17 @@ - + - + - + - + - + - + @@ -47,24 +47,24 @@ - + - + - + - + - + - + - + - + - - + +