From eb6cab619aefbcf1dced85090c198b1aa1abff44 Mon Sep 17 00:00:00 2001 From: Austin Vazquez Date: Thu, 19 Mar 2026 15:22:26 -0500 Subject: [PATCH] ci: publish benchmarks to GH pages Signed-off-by: Austin Vazquez --- .github/workflows/benchmarks.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 26eda6bb..e6bda14a 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -7,7 +7,8 @@ on: - cron: '0 0 * * *' permissions: - contents: read + contents: write + deployments: write jobs: setup: @@ -119,7 +120,7 @@ jobs: - name: Run benchmarks run: | go test -bench=BenchmarkVM -benchtime=5x -run=^$ -v ./integration/... \ - | tee /tmp/bench-output.txt + | tee /tmp/benchmark-output.txt - name: Publish benchmark results to step summary if: always() @@ -131,3 +132,15 @@ jobs: echo '```' >> $GITHUB_STEP_SUMMARY grep -E '^(Benchmark|PASS|FAIL|ok|---)' /tmp/bench-output.txt >> $GITHUB_STEP_SUMMARY || true echo '```' >> $GITHUB_STEP_SUMMARY + + - name: Store benchmark results + uses: benchmark-action/github-action-benchmark@a7bc2366eda11037936ea57d811a43b3418d3073 # v1.21.0 + with: + name: 'Nerdbox Benchmarks' + tool: 'go' + benchmark-data-dir-path: "data/benchmarks/linux/${{ matrix.arch }}" + output-file-path: '/tmp/benchmark-output.txt' + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Push benchmark result + run: git push 'https://github.com/containerd/nerdbox.git' ghpages:gh-pages