From fb88b18fb483517fb81d8fa1548e2f428c10f1ff Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 16 Jun 2026 07:01:37 +0000 Subject: [PATCH] ci(windows): make setup-windows-runner.ps1 ASCII-clean PowerShell 5.1 reads .ps1 in the system code page; an em-dash inside a string literal misparsed (its bytes look like a quote) and the non-ASCII username in the daemon wrapper would have been mangled. Drop the em-dash and copy rustup toolchains to C:\Users\Public\.rustup so the wrapper carries no non-ASCII path. Prep validated: act_runner 1.0.8 + Node 20 + config generated. Co-Authored-By: Claude Opus 4.8 --- scripts/ci/setup-windows-runner.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/ci/setup-windows-runner.ps1 b/scripts/ci/setup-windows-runner.ps1 index c15b08e..657d0a6 100644 --- a/scripts/ci/setup-windows-runner.ps1 +++ b/scripts/ci/setup-windows-runner.ps1 @@ -71,11 +71,18 @@ if (-not (Test-Path "$RunnerHome\.runner")) { & $Exe register --no-interactive --instance $Instance --token $Token --name $RunnerName --labels $Labels } +# rustup toolchains under an ASCII path so nothing in the daemon env carries the non-ASCII +# username (the same hazard that breaks SDL3's PCH; here it also keeps this script ASCII-clean). +if (-not (Test-Path "C:\Users\Public\.rustup\settings.toml")) { + Write-Host "==> copying rustup toolchains to an ASCII path" + robocopy "$env:USERPROFILE\.rustup" "C:\Users\Public\.rustup" /E /NFL /NDL /NJH /NJS /MT:16 | Out-Null +} + # --- daemon env wrapper (the box's MSVC/WinUI/FFmpeg toolchain) --- $wrapper = "$RunnerHome\run-runner.ps1" @' $env:CARGO_HOME = "C:\Users\Public\.cargo" -$env:RUSTUP_HOME = "C:\Users\Enrico Bühler\.rustup" +$env:RUSTUP_HOME = "C:\Users\Public\.rustup" $env:CMAKE_POLICY_VERSION_MINIMUM = "3.5" $env:LIBCLANG_PATH = "C:\Program Files\LLVM\bin" $env:FFMPEG_DIR = "C:\Users\Public\ffmpeg" @@ -104,4 +111,4 @@ Start-Sleep -Seconds 4 Write-Host "==> runner '$RunnerName' labels=$Labels instance=$Instance" $p = Get-Process act_runner -ErrorAction SilentlyContinue if ($p) { Write-Host "daemon running (pid $($p.Id), session $($p.SessionId))" } -else { Write-Warning "daemon not running yet — check $RunnerHome\runner task / logs" } +else { Write-Warning "daemon not running yet - check the gitea-act-runner task" }