Skip to content

Commit eb6cab6

Browse files
committed
ci: publish benchmarks to GH pages
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
1 parent e6e665d commit eb6cab6

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ on:
77
- cron: '0 0 * * *'
88

99
permissions:
10-
contents: read
10+
contents: write
11+
deployments: write
1112

1213
jobs:
1314
setup:
@@ -119,7 +120,7 @@ jobs:
119120
- name: Run benchmarks
120121
run: |
121122
go test -bench=BenchmarkVM -benchtime=5x -run=^$ -v ./integration/... \
122-
| tee /tmp/bench-output.txt
123+
| tee /tmp/benchmark-output.txt
123124
124125
- name: Publish benchmark results to step summary
125126
if: always()
@@ -131,3 +132,15 @@ jobs:
131132
echo '```' >> $GITHUB_STEP_SUMMARY
132133
grep -E '^(Benchmark|PASS|FAIL|ok|---)' /tmp/bench-output.txt >> $GITHUB_STEP_SUMMARY || true
133134
echo '```' >> $GITHUB_STEP_SUMMARY
135+
136+
- name: Store benchmark results
137+
uses: benchmark-action/github-action-benchmark@a7bc2366eda11037936ea57d811a43b3418d3073 # v1.21.0
138+
with:
139+
name: 'Nerdbox Benchmarks'
140+
tool: 'go'
141+
benchmark-data-dir-path: "data/benchmarks/linux/${{ matrix.arch }}"
142+
output-file-path: '/tmp/benchmark-output.txt'
143+
github-token: ${{ secrets.GITHUB_TOKEN }}
144+
145+
- name: Push benchmark result
146+
run: git push 'https://github.com/containerd/nerdbox.git' ghpages:gh-pages

0 commit comments

Comments
 (0)