-
Notifications
You must be signed in to change notification settings - Fork 0
254 lines (230 loc) · 9.18 KB
/
Copy pathci.yml
File metadata and controls
254 lines (230 loc) · 9.18 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"
jobs:
build-test:
name: build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install RocksDB build dependencies
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev cmake
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --locked -- -D warnings
- name: Build
run: cargo build --all-targets --locked
- name: Test (default / RocksDB SSD backend)
run: cargo test --locked
- name: Test (no default features / compatibility store)
run: cargo test --locked --no-default-features
- name: Grafana dashboard validation
run: tools/validate_grafana_dashboard.py
- name: Soak report smoke
run: |
cargo run --locked --no-default-features --example soak -- 1 1 \
--duration-seconds 2 \
--sample-seconds 1 \
--json-output /tmp/matrixcache-soak.json \
--require-passed \
--max-get-p99-us 1000000 \
--max-put-p99-us 1000000 \
--max-read-through-p99-us 1000000 \
--min-hit-rate-percent 1
tools/validate_soak_report.py /tmp/matrixcache-soak.json \
--max-get-p99-us 1000000 \
--max-put-p99-us 1000000 \
--max-read-through-p99-us 1000000 \
--min-hit-rate-percent 1 \
--min-reads 1000 \
--min-writes 100 \
--min-memory-evictions 1 \
--min-get-samples 1000 \
--min-put-samples 100 \
--min-read-through-samples 1000 \
--min-eviction-samples 1
tools/compare_soak_reports.py /tmp/matrixcache-soak.json /tmp/matrixcache-soak.json
- name: Backend report smoke
run: |
cargo run --locked --no-default-features --example rocksdb_backend_bench -- \
--iterations 500 \
--replacement-soak-iterations 128 \
--json-output /tmp/matrixcache-backend-compat.json \
--emit-operator-log \
--require-passed
tools/validate_backend_report.py /tmp/matrixcache-backend-compat.json \
--expect-backend file-compat \
--min-iterations 500 \
--min-replacement-soak-iterations 128 \
--min-cold-ssd-refills 1 \
--min-memory-evictions 1 \
--min-pmem-evictions 1 \
--min-disk-fills 1 \
--min-async-writeback-backpressure 1 \
--max-refill-failures 0
tools/emit_backend_operator_log.py /tmp/matrixcache-backend-compat.json
tools/compare_backend_reports.py \
/tmp/matrixcache-backend-compat.json \
/tmp/matrixcache-backend-compat.json
- name: Batch control report smoke
run: |
cargo run --locked --no-default-features --example batch_write_cost -- \
--json-output /tmp/matrixcache-batch-control.json \
--require-passed
tools/validate_batch_control_report.py /tmp/matrixcache-batch-control.json \
--min-batches 2 \
--min-disk-hits 1 \
--min-zero-copy-hits 1 \
--min-refill-samples 1 \
--min-passes 9
tools/compare_batch_control_reports.py \
/tmp/matrixcache-batch-control.json \
/tmp/matrixcache-batch-control.json
- name: Read scaling report smoke
run: |
cargo run --locked --no-default-features --example cache_scaling_bench -- \
1024 \
--json-output /tmp/matrixcache-read-scaling.json \
--require-passed \
--min-sharded-speedup 0.25 \
--max-single-thread-ns 1000000
tools/validate_read_scaling_report.py /tmp/matrixcache-read-scaling.json \
--min-hit-costs 1 \
--min-thread-rows 4 \
--min-max-threads 8 \
--min-worst-sharded-speedup 0.25 \
--max-first-hit-ns 1000000 \
--min-repeats 5
tools/compare_read_scaling_reports.py \
/tmp/matrixcache-read-scaling.json \
/tmp/matrixcache-read-scaling.json
- name: Read path report smoke
run: |
cargo run --locked --no-default-features --example read_path_cost -- \
1024 \
--json-output /tmp/matrixcache-read-path.json \
--require-passed \
--max-full-ns 1000000 \
--max-overhead-percent 1000000 \
--max-spread-percent 1000000
tools/validate_read_path_report.py /tmp/matrixcache-read-path.json \
--max-full-ns 1000000 \
--max-overhead-percent 1000000 \
--max-spread-percent 1000000 \
--min-passes 7 \
--min-entries 1024
tools/compare_read_path_reports.py \
/tmp/matrixcache-read-path.json \
/tmp/matrixcache-read-path.json
- name: Eviction report smoke
run: |
cargo run --locked --no-default-features --example eviction_bench -- \
--smoke \
--json-output /tmp/matrixcache-eviction.json \
--require-passed \
--max-ns-per-write 2000000 \
--max-groups-per-eviction 128 \
--min-hit-rate-percent 70
tools/validate_eviction_report.py /tmp/matrixcache-eviction.json \
--min-steady-rows 3 \
--min-hit-rate-rows 2 \
--min-write-pressure-writes 256 \
--min-read-pressure-reads 20000 \
--max-ns-per-write 2000000 \
--max-groups-per-eviction 128 \
--min-hit-rate-percent 70
tools/compare_eviction_reports.py \
/tmp/matrixcache-eviction.json \
/tmp/matrixcache-eviction.json
- name: Scale report smoke
shell: bash
run: |
set -euo pipefail
tools/run_scale_reports.py \
--debug-build \
--output-dir /tmp/matrixcache-scale-ci \
--markdown-output /tmp/matrixcache-scale-ci/matrixcache-scale-report.md
tools/validate_scale_report_manifest.py \
/tmp/matrixcache-scale-ci/matrixcache-scale-report-manifest.json \
--require-markdown
tools/compare_scale_reports.py \
/tmp/matrixcache-scale-ci/matrixcache-scale-report-manifest.json \
/tmp/matrixcache-scale-ci/matrixcache-scale-report-manifest.json \
--json-output /tmp/matrixcache-scale-ci/matrixcache-scale-comparison.json \
--markdown-output /tmp/matrixcache-scale-ci/matrixcache-scale-comparison.md \
--emit-operator-log
tools/validate_scale_comparison_report.py \
/tmp/matrixcache-scale-ci/matrixcache-scale-comparison.json \
--min-reports 4 \
--min-latency-fields 1 \
--min-throughput-fields 1
- name: Doc
run: cargo doc --no-deps --locked
msrv:
name: msrv (1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@1.88.0
- name: Install RocksDB build dependencies
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev cmake
- uses: Swatinem/rust-cache@v2
- name: Check on MSRV
run: cargo check --all-targets --locked
deny:
name: cargo-deny (licenses & advisories)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check bans licenses sources advisories
coverage:
name: coverage (informational)
runs-on: ubuntu-latest
# Informational: reports line/region coverage but does not gate merges.
continue-on-error: true
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Install RocksDB build dependencies
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev cmake
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- name: Coverage summary
run: cargo llvm-cov --locked --summary-only
license-headers:
name: license headers (SPDX)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Verify SPDX Apache-2.0 header on all Rust sources
shell: bash
run: |
set -euo pipefail
files=$(git ls-files '*.rs')
if [ -z "$files" ]; then
echo "No Rust sources found."; exit 0
fi
missing=$(grep -L 'SPDX-License-Identifier: Apache-2.0' $files || true)
if [ -n "$missing" ]; then
echo "The following Rust sources are missing the SPDX Apache-2.0 header:"
echo "$missing"
exit 1
fi
echo "OK: all $(echo "$files" | wc -l) Rust sources carry the SPDX Apache-2.0 header."