-
-
Notifications
You must be signed in to change notification settings - Fork 37
122 lines (106 loc) · 3.14 KB
/
benches.yml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Benchmarks
on: [push]
jobs:
microbenchmarks:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
# postgres: # Not needed yet, this suite doesn't support postgres.
# image: postgres
# env:
# POSTGRES_PASSWORD: postgres
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# ports:
# - 5432:5432
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
-
name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) || true
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true
- name: Install Rust
uses: hecrj/setup-rust-action@v1
- name: Run benchmarks
run: |
cargo bench --bench suite --features sqlite,redis,compression
env:
COMMERCE_POSTGRESQL_URL: postgres://postgres:postgres@localhost/postgres
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v3
with:
name: microbenchmarks
path: target/criterion
commerce:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: hecrj/setup-rust-action@v1
- name: Run benchmarks
run: |
cargo bench --bench commerce --features postgresql,compression -- --suite -n1000
env:
COMMERCE_POSTGRESQL_URL: postgres://postgres:postgres@localhost/postgres
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v3
with:
name: commerce
path: benchmarks/commerce-bench
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/')
needs: [commerce, microbenchmarks]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Gather artifacts
run: |
mkdir reports
mv commerce reports/
mv microbenchmarks reports/suite
- name: Deploy
uses: khonsulabs/sync-to-dossier@main
with:
url: ${{ secrets.DOSSIER_URL }}
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }}
api-key: ${{ secrets.DOSSIER_API_KEY }}
project: bonsaidb
from: reports
to: /${{ github.ref_name }}/benchmarks