-
-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (75 loc) · 2.78 KB
/
Copy pathperf.yml
File metadata and controls
89 lines (75 loc) · 2.78 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
name: Performance
# Hard gates are deterministic; millisecond timings are recorded, not gated.
on:
pull_request:
workflow_dispatch:
concurrency:
group: perf-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
scan-budget:
name: Native scan budget
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/linux-deps
- uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master, 2026-08
with:
toolchain: stable
# Restores ci.yml's release cache and never saves one: PR caches are branch-scoped.
- name: Rust cache
uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: './src-tauri -> target'
shared-key: tauri-release
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Run scan budget (release)
run: |
cd src-tauri
cargo test --release --lib -- --ignored --nocapture scan_budget 2>&1 | tee scan.log
{
echo "### Native scan budget"
echo '```'
grep "PERF scan_notes" scan.log || echo "(no measurement captured)"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
# Search is a linear scan (see src-tauri/src/index.rs); this gate is what justifies that.
- name: Run search budget (release)
run: |
cd src-tauri
cargo test --release --lib -- --ignored --nocapture search_budget 2>&1 | tee search.log
{
echo "### Native search budget"
echo '```'
grep "PERF search_notes" search.log || echo "(no measurement captured)"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
frontend-budget:
name: Frontend virtualization + timings
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/setup-node
- name: Install Playwright (Chromium)
run: pnpm exec playwright install --with-deps chromium
- name: Build web app
run: pnpm build
- name: Run frontend perf gate
run: |
pnpm test:perf 2>&1 | tee perf.log
{
echo "### Frontend perf timings (recorded)"
echo '```'
grep "⏱" perf.log || echo "(no timings captured)"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload Playwright report on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: playwright-report
path: playwright-report
retention-days: 7
if-no-files-found: ignore