-
Notifications
You must be signed in to change notification settings - Fork 0
240 lines (233 loc) · 8.57 KB
/
Copy pathci.yml
File metadata and controls
240 lines (233 loc) · 8.57 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "17 9 * * 1"
jobs:
acp-v1-reference-interop:
name: ACP v1 official-type interoperability
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Official ACP v1 peer interoperability
run: scripts/test-acp-v1-reference-interop.sh
acp-v1-schema-drift:
name: ACP v1 upstream schema drift
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compare pinned ACP v1 artifacts with upstream
run: scripts/check-acp-v1-schema-drift.sh
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --check
- name: Check
run: cargo check -p trail
- name: Test
run: cargo test -p trail
- name: Scale Benchmark Syntax
run: bash -n scripts/cli-scale-bench.sh
- name: Scale Threshold Checker Tests
run: >-
python3 -m unittest
scripts/test_cli_scale_bench_source.py
scripts/test_check_cli_scale_thresholds.py
scripts/test_check_changed_path_ledger_thresholds.py
scripts/test_extract_agent_git_performance.py
scripts/test_extract_path_index_performance.py
- name: Scale Benchmark Smoke
run: make bench-cli-scale-smoke
env:
TRAIL_SCALE_BASE: ${{ runner.temp }}
TRAIL_SCALE_LABEL: ci-${{ github.run_id }}
- name: Scale Benchmark Thresholds
run: >
python3 scripts/check-cli-scale-thresholds.py
"${{ runner.temp }}/trail-cli-scale-ci-${{ github.run_id }}/1000/results.tsv"
init_working_tree=60
status_clean=15
status_dirty=20
diff_dirty=25
record_dirty=25
git_dirty_status=15
git_dirty_diff=20
git_dirty_record=20
git_status_after_dirty_record=15
daemon_wait_for_health=60
daemon_wait_for_hot_cache=60
daemon_persisted_snapshot_status=10
daemon_persisted_snapshot_record_clean=10
daemon_persisted_snapshot_diff_dirty=10
daemon_cli_session_start=10
daemon_cli_approval_request=10
daemon_cli_lease_acquire=10
daemon_cli_timeline=10
daemon_cli_why=10
daemon_cli_history=10
daemon_cli_code_from=10
agent_apply_patch=30
path_index_rename_patch=30
path_index_empty_patch=30
path_index_record=30
agent_git_apply_dry_run=15
agent_git_apply=20
agent_git_apply_missing_mapping=5
lane_merge_queue_run=30
agent_spawn_sparse=15
agent_read_sparse_hydrate_neighbors=15
agent_sync_sparse_dir=15
agent_spawn_materialized=30
agent_status_materialized=15
agent_record_materialized=30
backup_create=30
backup_verify=30
--metrics
"${{ runner.temp }}/trail-cli-scale-ci-${{ github.run_id }}/1000/metrics.tsv"
sqlite_bytes=64000000
dbstat_repo_prolly_nodes=32000000
object_kind_repo_TextContent_bytes=16000000
object_count=20000
agent_git_changed_paths=1
agent_git_blob_writes=1
agent_git_plumbing_commands=5
patch_path_index_lookup_count=5
patch_path_index_full_root_path_load_count=0
patch_path_index_full_filesystem_path_scan_count=0
record_path_index_lookup_count=1
record_path_index_full_root_path_load_count=0
record_path_index_full_filesystem_path_scan_count=0
empty_root_patch_path_index_lookup_count=1
empty_root_patch_path_index_full_root_path_load_count=0
empty_root_patch_path_index_full_filesystem_path_scan_count=0
rename_patch_path_index_lookup_count=2
rename_patch_path_index_full_root_path_load_count=0
rename_patch_path_index_full_filesystem_path_scan_count=0
--metric-equals
agent_git_export_mode=mapped_delta
agent_git_changed_paths=1
patch_path_index_mode=indexed
record_path_index_mode=indexed
empty_root_patch_path_index_mode=indexed
rename_patch_path_index_mode=indexed
- name: Changed-path Ledger 1k Benchmark
run: scripts/cli-scale-bench.sh changed-path-ledger
env:
TRAIL_SCALE_BASE: ${{ runner.temp }}
TRAIL_SCALE_LABEL: changed-path-ci-${{ github.run_id }}
TRAIL_SCALE_FILES: "1000"
TRAIL_CHANGED_PATH_COW: "0"
- name: Changed-path Ledger 1k Thresholds
run: >-
python3 scripts/check-changed-path-ledger-thresholds.py
"${{ runner.temp }}/trail-cli-scale-changed-path-ci-${{ github.run_id }}/1000/results.tsv"
"${{ runner.temp }}/trail-cli-scale-changed-path-ci-${{ github.run_id }}/1000/structural-metrics.jsonl"
--oracle
"${{ runner.temp }}/trail-cli-scale-changed-path-ci-${{ github.run_id }}/1000/oracle-results.tsv"
--max-seconds workspace_status=15
--max-seconds workspace_diff=20
--max-seconds workspace_record=30
--max-seconds materialized_lane_record=60
--max-seconds structured_patch=30
--max-rss-bytes workspace_status=2147483648
--max-rss-bytes workspace_diff=2147483648
--max-rss-bytes workspace_record=2147483648
prolly:
name: Prolly core
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --check
- name: Check
run: cargo check -p prolly-map
- name: Default tests
run: cargo test -p prolly-map
- name: Clippy
run: >-
cargo clippy -p prolly-map --all-targets --features tokio --
-D warnings
-A clippy::result-large-err
-A clippy::large-enum-variant
-A clippy::type-complexity
- name: Rustdoc
run: RUSTDOCFLAGS="-D warnings" cargo doc -p prolly-map --no-deps --features tokio
- name: Inspect binary
run: cargo check -p prolly-map --bin prolly-inspect
- name: Examples
run: cargo check -p prolly-map --examples
- name: Bench compile
run: cargo check -p prolly-map --benches --features tokio
- name: Package
run: cargo package -p prolly-map --no-verify
- name: Tokio feature tests
run: cargo test -p prolly-map --features tokio
- name: SQLite store contract
run: cargo test -p prolly-store-sqlite
prolly-optional-backends:
name: Prolly optional backend (${{ matrix.backend }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- backend: rocksdb
package: prolly-store-rocksdb
- backend: slatedb
package: prolly-store-slatedb
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install RocksDB native dependencies
if: ${{ matrix.backend == 'rocksdb' }}
run: sudo apt-get update && sudo apt-get install -y clang libclang-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Store contract
run: cargo test -p "${{ matrix.package }}"
prolly-pglite-sidecar:
name: Prolly PGlite sidecar
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install PGlite node package
run: |
mkdir -p "${{ runner.temp }}/prolly-pglite-node"
npm install --prefix "${{ runner.temp }}/prolly-pglite-node" @electric-sql/[email protected]
- name: PGlite store contract
run: cargo test -p prolly-store-pglite
env:
PROLLY_PGLITE_TEST: "1"
PROLLY_PGLITE_NODE_CWD: ${{ runner.temp }}/prolly-pglite-node