Debian Codegraph @

.forgejo/workflows/bench.yaml

raw
1 on:
2 push:
3 paths:
4 - "internal/pack/*.go"
5 - "internal/unpack/*.go"
6 - "headerpack.go"
7 - "serve*.go"
8 - "msg.go"
9 - "udp*.go"
10 pull_request:
11 paths:
12 - "internal/pack/*.go"
13 - "internal/unpack/*.go"
14 - "headerpack.go"
15 - "serve*.go"
16 - "msg.go"
17 - "udp*.go"
18 concurrency:
19 group: deploy-${{ forgejo.ref }}
20
21 jobs:
22 test:
23 runs-on: atoom-tiny
24 steps:
25 - uses: actions/checkout@v6
26 - uses: actions/setup-go@v6
27 with:
28 go-version: ${{ vars.GOVERSION }}
29 - run: |
30 apt-get update
31 apt-get -y install dnsperf jq
32 go install golang.org/x/perf/cmd/benchstat@latest
33 (cd cmd/reflect; go build)
34 HOSTNAME=atoom-tiny
35 # Sleep here so we have the machine to ourselves.
36 sleep 60
37 (cd cmd/reflect; make new.txt)
38 REF=$(echo ${{ forgejo.ref }} | cut -d/ -f3)
39 echo ${{ forgejo.api_url}}/repos/${{ forgejo.repository }}/issues/${REF}/comments
40 echo "{\"body\": $(cd cmd/reflect; make stat | jq -sR .)}" | \
41 curl --json @- \
42 -H 'Authorization: token ${{ forgejo.token }}' \
43 ${{ forgejo.api_url}}/repos/${{ forgejo.repository }}/issues/${REF}/comments