-
Notifications
You must be signed in to change notification settings - Fork 73
63 lines (54 loc) · 1.65 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
57
58
59
60
61
62
63
name: Benchmark
on:
workflow_dispatch:
push:
branches:
- main
permissions:
id-token: write # For getting AWS permissions
contents: read
packages: read
jobs:
benchmark:
name: 'benchmark (pg: ${{ matrix.pgVersion }})'
runs-on: ubuntu-24.04
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-24.04
needs: [benchmark]
steps:
- uses: actions/download-artifact@v4
with:
path: ./results/
merge-multiple: true
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::493985724844:role/pgroll-benchmark-results-access
aws-region: us-east-1
mask-aws-account-id: 'no'
- name: Download current results from S3
run: aws s3 cp s3://pgroll-benchmark-results/benchmark-results.json ./benchmark-results.json
- name: Append new results
run: cat results/*.json >> benchmark-results.json
- name: Upload combined results
run: aws s3 cp ./benchmark-results.json s3://pgroll-benchmark-results/benchmark-results.json