-
Notifications
You must be signed in to change notification settings - Fork 73
56 lines (49 loc) · 1.31 KB
/
benchmark.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Benchmark
on:
# For testing, remove before merge:
pull_request:
push:
branches:
- main
permissions:
contents: read
packages: read
jobs:
benchmark:
name: 'benchmark (pg: ${{ matrix.pgVersion }})'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pgVersion: ['14.8', '15.3', '16.4', '17.0' ,'latest']
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Run benchmarks
run: make bench
env:
POSTGRES_VERSION: ${{ matrix.pgVersion }}
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: benchmark_result_${{ matrix.pgVersion }}.json
path: internal/benchmarks/benchmark_result_${{ matrix.pgVersion }}.json
gather:
name: 'Gather results'
runs-on: ubuntu-latest
needs: [benchmark]
steps:
- uses: actions/download-artifact@v4
with:
path: ./results/
merge-multiple: true
- name: Combine all results
run: cat results/*.json > ${{github.sha}}_benchmark_result.json
- name: Upload combined results
uses: actions/upload-artifact@v4
with:
name: ${{github.sha}}_benchmark_result.json
path: ${{github.sha}}_benchmark_result.json