-
Notifications
You must be signed in to change notification settings - Fork 1
146 lines (124 loc) · 5.18 KB
/
Copy pathsource-validation.yml
File metadata and controls
146 lines (124 loc) · 5.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
name: Validate WOK Client source
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
workflow_dispatch:
permissions:
contents: read
concurrency:
group: wok-client-source-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
name: Validate on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24.13.0
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install source dependencies without lifecycle scripts
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Validate source
run: pnpm run validate
# Observe-only performance job. This job exists to collect signal, not to gate:
# continue-on-error keeps any failure from blocking the workflow, and it must NOT be
# added to branch-protection required checks until run-to-run variance on hosted
# runners is understood. It builds nothing heavy and launches nothing.
perf-observe:
name: Perf unit checks (observe-only)
runs-on: windows-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24.13.0
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install source dependencies without lifecycle scripts
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Validate source
run: pnpm run validate
- name: Perf-unit assertions
# Cheap perf-adjacent unit tests only: rollover/reset residue guards and
# histogram-accuracy bounds for the frame-time stats, adaptive-validation
# runtime lifecycle, and the startup-marks parser. No app launch, no packaging.
run: node --test tests/performance-stats.test.ts tests/performance-monitor.test.ts tests/adaptive-validation.test.ts tests/adaptive-validation-runtime.test.ts tests/parse-perf-marks.test.ts
# Future packaged startup-marks smoke job — intentionally disabled scaffolding.
# TODO(perf-gate): enable (remove `if: false`) only once a runner pool with understood
# frame/IO variance exists and the medians have been baselined. Planned flow: make the
# Windows package, launch it with WOK_PERF_MARKS=1 and WOK_PERF_EXIT_MS so it quits
# itself after load, repeat a handful of runs, feed the concatenated log to
# scripts/parse-perf-marks.mjs, and upload the JSON medians as an artifact.
# Even when enabled this stays observe-only by design: it publishes data for humans
# and dashboards and must not gate merges.
packaged-smoke:
name: Packaged perf smoke (disabled scaffolding)
if: false
runs-on: windows-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24.13.0
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies and verified patched Electron
run: pnpm install --frozen-lockfile
- name: Build platform package
run: pnpm run make -- --arch=x64
- name: Capture startup marks from the packaged app
shell: pwsh
run: |
# TODO(perf-gate): confirm the packaged exe name/path once the job is enabled.
$exe = Get-ChildItem -Recurse dist -Filter '*.exe' |
Where-Object { $_.FullName -notmatch 'make' } |
Select-Object -First 1
if (-not $exe) { throw 'No packaged executable found under dist/.' }
$env:WOK_PERF_MARKS = '1'
$env:WOK_PERF_EXIT_MS = '10000'
for ($run = 1; $run -le 5; $run++) {
& $exe.FullName 2>&1 | Out-File -Append -Encoding utf8 perf-marks.log
}
- name: Summarize startup marks
run: node scripts/parse-perf-marks.mjs perf-marks.log > perf-marks-summary.json
- name: Upload startup-mark medians
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: wok-client-perf-marks
path: |
perf-marks.log
perf-marks-summary.json
if-no-files-found: error