|
| 1 | +name: zz-win-repro |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: [fix/ffmpeg-wrong-build-on-path] |
| 5 | +jobs: |
| 6 | + repro: |
| 7 | + runs-on: windows-latest |
| 8 | + timeout-minutes: 25 |
| 9 | + steps: |
| 10 | + - uses: actions/setup-node@v4 |
| 11 | + with: { node-version: 22 } |
| 12 | + - name: ffmpeg |
| 13 | + shell: pwsh |
| 14 | + run: | |
| 15 | + choco install ffmpeg -y --no-progress | Select-Object -Last 3 |
| 16 | + Get-Command ffmpeg, ffprobe | Format-Table Source |
| 17 | + - name: project with audio |
| 18 | + shell: pwsh |
| 19 | + run: | |
| 20 | + mkdir C:\w; cd C:\w |
| 21 | + npx --yes hyperframes@0.8.204 init proj --example blank --non-interactive 2>&1 | Select-Object -Last 5 |
| 22 | + cd proj |
| 23 | + ffmpeg -y -f lavfi -i "sine=frequency=440:duration=3" -c:a aac tone.m4a 2>&1 | Select-Object -Last 1 |
| 24 | + Get-ChildItem | Format-Table Name |
| 25 | + Get-Content index.html | Select-Object -First 30 |
| 26 | + - name: A - audio render with delete denied on TEMP |
| 27 | + shell: pwsh |
| 28 | + continue-on-error: true |
| 29 | + run: | |
| 30 | + cd C:\w\proj |
| 31 | + $t = "C:\w\tmpdeny"; mkdir $t | Out-Null |
| 32 | + icacls $t /deny "${env:USERNAME}:(OI)(CI)(DE,DC)" | Out-Host |
| 33 | + $env:TEMP = $t; $env:TMP = $t |
| 34 | + '<audio id="a" src="tone.m4a" data-start="0" data-duration="3" data-track-index="2"></audio>' | Out-File -Encoding utf8 audio-snippet.txt |
| 35 | + $h = Get-Content index.html -Raw |
| 36 | + if ($h -notmatch 'tone.m4a') { $h = $h -replace '</div>\s*(<script|</body>)', "<audio id=`"a`" src=`"tone.m4a`" data-start=`"0`" data-duration=`"3`" data-track-index=`"2`"></audio></div>`$1"; Set-Content index.html $h } |
| 37 | + npx --yes hyperframes@0.8.204 render . -o out-a.mp4 --fps 30 2>&1 | Select-Object -Last 25 |
| 38 | + Get-Item out-a.mp4 -ErrorAction SilentlyContinue | Format-Table Name, Length |
| 39 | + - name: B - fake ffprobe first on PATH and in cwd |
| 40 | + shell: pwsh |
| 41 | + continue-on-error: true |
| 42 | + run: | |
| 43 | + cd C:\w\proj |
| 44 | + mkdir C:\w\fake | Out-Null |
| 45 | + '@echo off' + "`r`n" + 'echo ffprobe version 2.8.0 fake' | Set-Content C:\w\fake\ffprobe.cmd |
| 46 | + Copy-Item C:\w\fake\ffprobe.cmd .\ffprobe.cmd |
| 47 | + $env:PATH = "C:\w\fake;" + $env:PATH |
| 48 | + Get-Command ffprobe | Format-Table Source |
| 49 | + npx --yes hyperframes@0.8.204 doctor 2>&1 | Select-Object -Last 20 |
| 50 | + npx --yes hyperframes@0.8.204 render . -o out-b.mp4 --fps 30 2>&1 | Select-Object -Last 25 |
0 commit comments