Skip to content

Commit e705ed8

Browse files
committed
ci: add manual Windows build and benchmark workflow [skip jenkins] [skip ci]
1 parent d952be3 commit e705ed8

2 files changed

Lines changed: 75 additions & 0 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Manual Windows Benchmark
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
repeats:
7+
description: Measured repetitions for each warm operation
8+
required: false
9+
default: '5'
10+
type: string
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
windows-benchmark:
17+
name: Build, install, and benchmark Windows CLI
18+
runs-on: windows-2025
19+
timeout-minutes: 240
20+
steps:
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22+
23+
- uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
24+
with:
25+
msystem: CLANG64
26+
path-type: inherit
27+
install: >-
28+
mingw-w64-clang-x86_64-clang
29+
mingw-w64-clang-x86_64-zlib
30+
mingw-w64-clang-x86_64-python3
31+
make
32+
git
33+
coreutils
34+
zip
35+
36+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
37+
with:
38+
node-version: '22'
39+
40+
- name: Build native Windows binary
41+
shell: msys2 {0}
42+
run: scripts/build.sh --with-ui CC=clang CXX=clang++
43+
44+
- name: Install exact built binary and run benchmark
45+
shell: pwsh
46+
env:
47+
BENCH_REPEATS: ${{ inputs.repeats }}
48+
run: |
49+
$ErrorActionPreference = 'Stop'
50+
$repo = (Get-Location).Path
51+
$binary = Join-Path $repo 'build\c\codebase-memory-cli.exe'
52+
$install = Join-Path $env:RUNNER_TEMP 'cbm-installed'
53+
$workspace = Join-Path $env:RUNNER_TEMP 'cbm-benchmark-repos'
54+
$results = Join-Path $env:RUNNER_TEMP 'cbm-benchmark-results'
55+
& pwsh -NoProfile -File (Join-Path $repo 'scripts\setup-windows.ps1') `
56+
-Binary $binary -InstallDir $install -NoPathPrompt
57+
if ($LASTEXITCODE) { throw 'binary installation failed' }
58+
& pwsh -NoProfile -File (Join-Path $repo 'scripts\qualification\run-windows-benchmark-corpus.ps1') `
59+
-CandidateBinary (Join-Path $install 'codebase-memory-cli.exe') `
60+
-WorkspaceRoot $workspace -ResultsRoot $results `
61+
-CodebaseMemoryRef $env:GITHUB_SHA -Repeats ([int]$env:BENCH_REPEATS) -Initialize
62+
if ($LASTEXITCODE) { throw 'Windows benchmark failed' }
63+
64+
- name: Upload benchmark evidence
65+
if: always()
66+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
67+
with:
68+
name: windows-benchmark-${{ github.run_id }}
69+
path: ${{ runner.temp }}/cbm-benchmark-results
70+
if-no-files-found: warn

‎README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ installs the native executable, and stores timestamped benchmark evidence under
183183
`C:\cbm-benchmark`. See [`docs/WINDOWS_BENCHMARK_RUNBOOK.md`](docs/WINDOWS_BENCHMARK_RUNBOOK.md)
184184
for prerequisites and the full qualification path.
185185

186+
To run the same build, install, and benchmark flow on a GitHub-hosted Windows
187+
runner, manually dispatch the **Manual Windows Benchmark** workflow from the
188+
desired branch. It uploads the complete benchmark evidence as a workflow
189+
artifact and requires no local Windows build.
190+
186191
## Human and machine output
187192

188193
Human-readable output is the default. `--json` is the stable machine-oriented surface for the canonical commands in this slice.

0 commit comments

Comments
 (0)