forked from torrust/torrust-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (93 loc) · 3.47 KB
/
Copy pathdb-benchmarking.yaml
File metadata and controls
114 lines (93 loc) · 3.47 KB
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
name: Database Benchmarking
# adr: docs/adrs/20260612000000_adopt_sccache_for_ci_bare_builds.md
# sccache added for cross-run compilation caching on bare CI builds.
# Path policy: run this workflow only for persistence-relevant changes.
# Scoped to tracker-core (persistence layer) and persistence-benchmark (runner).
# General compile/cross-package regressions are covered by the Testing workflow.
# See .github/workflows/docs-lint.yaml for the lightweight docs-only workflow.
on:
push:
paths:
- "packages/tracker-core/**"
- "packages/persistence-benchmark/**"
- ".github/workflows/db-benchmarking.yaml"
pull_request:
paths:
- "packages/tracker-core/**"
- "packages/persistence-benchmark/**"
- ".github/workflows/db-benchmarking.yaml"
env:
CARGO_TERM_COLOR: always
jobs:
persistence-benchmark-sqlite3:
name: Persistence Benchmark SQLite3
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v7
- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- id: sccache
name: Install sccache (GHA backend)
uses: mozilla-actions/sccache-action@v0.0.10
- id: enable-sccache
name: Enable sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"
- id: benchmark
name: Run Persistence Benchmark (SQLite3)
run: cargo run -p torrust-tracker-persistence-benchmark --bin persistence_benchmark_runner -- --driver sqlite3 --ops 10
persistence-benchmark-mysql:
name: Persistence Benchmark MySQL
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v7
- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- id: sccache
name: Install sccache (GHA backend)
uses: mozilla-actions/sccache-action@v0.0.10
- id: enable-sccache
name: Enable sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"
- id: benchmark
name: Run Persistence Benchmark (MySQL)
run: cargo run -p torrust-tracker-persistence-benchmark --bin persistence_benchmark_runner -- --driver mysql --db-version 8.4 --ops 10
persistence-benchmark-postgresql:
name: Persistence Benchmark PostgreSQL
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v7
- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- id: sccache
name: Install sccache (GHA backend)
uses: mozilla-actions/sccache-action@v0.0.10
- id: enable-sccache
name: Enable sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV"
- id: benchmark
name: Run Persistence Benchmark (PostgreSQL)
run: cargo run -p torrust-tracker-persistence-benchmark --bin persistence_benchmark_runner -- --driver postgresql --db-version 17 --ops 10