Skip to content

Commit 3d37af3

Browse files
committed
chore(ci): temporary Windows concurrent check repro
1 parent 933ae3e commit 3d37af3

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: cliopen win conc repro
2+
on:
3+
push:
4+
branches: [cliopen/win-conc-repro]
5+
permissions:
6+
contents: read
7+
env:
8+
HYPERFRAMES_NO_TELEMETRY: "1"
9+
jobs:
10+
repro:
11+
runs-on: windows-latest
12+
timeout-minutes: 40
13+
steps:
14+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
15+
- uses: ./.github/actions/install-ffmpeg-windows
16+
- name: Set FFMPEG_BIN
17+
shell: pwsh
18+
run: |
19+
$path = (Get-Command ffmpeg.exe).Source
20+
"FFMPEG_BIN=$path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
21+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
22+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
23+
with:
24+
node-version: 22
25+
- shell: pwsh
26+
run: bun install --frozen-lockfile --linker=hoisted
27+
- shell: pwsh
28+
run: |
29+
bun run --filter '@hyperframes/{parsers,lint,studio-server}' build
30+
bun run --cwd packages/core build
31+
bun run --filter @hyperframes/player build
32+
bun run --filter @hyperframes/studio build
33+
bun run --filter @hyperframes/inspector build
34+
bun run --filter @hyperframes/cli build
35+
- name: Scaffold
36+
shell: pwsh
37+
env:
38+
HYPERFRAMES_SKIP_SKILLS: "1"
39+
run: |
40+
New-Item -ItemType Directory -Force -Path "$env:RUNNER_TEMP\p" | Out-Null
41+
cd "$env:RUNNER_TEMP\p"
42+
node "$env:GITHUB_WORKSPACE\packages\cli\bin\hyperframes.mjs" init canary --example blank --non-interactive --skip-skills
43+
- name: concurrent checks in one project
44+
shell: pwsh
45+
env:
46+
CI: ""
47+
run: |
48+
cd "$env:RUNNER_TEMP\p\canary"
49+
$bin = "$env:GITHUB_WORKSPACE\packages\cli\bin\hyperframes.mjs"
50+
$sw = [Diagnostics.Stopwatch]::StartNew()
51+
$jobs = @(
52+
@("A", "check", "--json"), @("B", "check"), @("C", "check", "--json"),
53+
@("D", "snapshot", "--at", "1", "--describe", "false")
54+
) | ForEach-Object {
55+
$a = $_
56+
$o = "$env:RUNNER_TEMP\out-$($a[0]).txt"; $e = "$env:RUNNER_TEMP\err-$($a[0]).txt"
57+
[pscustomobject]@{ Name = $a[0]; Args = ($a[1..($a.Length-1)] -join " "); Out = $o; Err = $e
58+
Proc = (Start-Process node -ArgumentList (@($bin) + $a[1..($a.Length-1)]) -RedirectStandardOutput $o -RedirectStandardError $e -PassThru -NoNewWindow) }
59+
}
60+
foreach ($j in $jobs) {
61+
$left = [Math]::Max(1000, 150000 - $sw.ElapsedMilliseconds)
62+
if (-not $j.Proc.WaitForExit($left)) { Write-Host "[$($j.Name)] $($j.Args) HUNG at $($sw.Elapsed.TotalSeconds)s"; Stop-Process -Id $j.Proc.Id -Force }
63+
else { Write-Host "[$($j.Name)] $($j.Args) exit $($j.Proc.ExitCode) at $($sw.Elapsed.TotalSeconds)s" }
64+
}
65+
foreach ($j in $jobs) { Write-Host "--- $($j.Name) tail"; Get-Content $j.Out -Tail 3 -ErrorAction SilentlyContinue; Get-Content $j.Err -Tail 3 -ErrorAction SilentlyContinue }

0 commit comments

Comments
 (0)