Skip to content

Commit 12d9614

Browse files
srenatuscharlieegan3
authored andcommitted
workflows: add post-merge benchmark-recording workflow
Following the example set in OPA. The relevant (orphaned) `benchmarks` branch already exists. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
1 parent ecb23d3 commit 12d9614

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/benchmarks.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Benchmarks
2+
3+
on:
4+
workflow_dispatch: {}
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
benchmarks:
10+
permissions:
11+
contents: write # we'll push to the `benchmarks` branch
12+
name: Benchmarks
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
with:
18+
path: regal
19+
- id: go_version
20+
name: Read go version
21+
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
22+
working-directory: regal
23+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
24+
with:
25+
go-version: ${{ steps.go_version.outputs.go_version }}
26+
cache-dependency-path: regal/go.sum
27+
- name: gobenchdata publish
28+
run: go run go.bobheadxi.dev/gobenchdata@v1 action
29+
env:
30+
INPUT_GO_TEST_FLAGS: "-timeout=120m -run=^#"
31+
INPUT_GO_TEST_PKGS: ./...
32+
INPUT_SUBDIRECTORY: regal
33+
INPUT_PUBLISH: true
34+
INPUT_PUBLISH_BRANCH: benchmarks
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
timeout-minutes: 120

0 commit comments

Comments
 (0)