From 589b364c017f74ca17b73abe548e1e9c32c64e2e Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Tue, 16 Jun 2026 07:06:54 +0000 Subject: [PATCH] ci(windows): fix runner registration CWD + capture clean daemon logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two fixes after live setup on home-windows-1: register from $RunnerHome (act_runner writes .runner relative to CWD, so it must run there — it had landed in the SSH home and the daemon couldn't find it), and run the daemon under cmd-level redirect (>> runner.log 2>&1) so its native stderr stays out of PowerShell's error stream. Runner is live: windows-amd64:host, SYSTEM scheduled task, "declare successfully" against git.unom.io. Co-Authored-By: Claude Opus 4.8 --- scripts/ci/setup-windows-runner.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/ci/setup-windows-runner.ps1 b/scripts/ci/setup-windows-runner.ps1 index 657d0a6..5040bd1 100644 --- a/scripts/ci/setup-windows-runner.ps1 +++ b/scripts/ci/setup-windows-runner.ps1 @@ -61,14 +61,16 @@ if (-not (Test-Path config.yaml)) { & $Exe generate-config | Set-Content -Encodi Set-Content -Encoding ASCII config.yaml Pop-Location -# --- one-time registration --- +# --- one-time registration (from $RunnerHome: register writes .runner to the CWD) --- if (-not (Test-Path "$RunnerHome\.runner")) { if (-not $Token) { Write-Warning "Not registered yet. Re-run with -Token ." Write-Host " (Gitea: org unom -> Settings -> Actions -> Runners -> Create new runner)" exit 1 } + Push-Location $RunnerHome & $Exe register --no-interactive --instance $Instance --token $Token --name $RunnerName --labels $Labels + Pop-Location } # rustup toolchains under an ASCII path so nothing in the daemon env carries the non-ASCII @@ -88,7 +90,8 @@ $env:LIBCLANG_PATH = "C:\Program Files\LLVM\bin" $env:FFMPEG_DIR = "C:\Users\Public\ffmpeg" $env:PATH = "C:\Users\Public\.cargo\bin;C:\nvm4w\nodejs;C:\Program Files\NASM;C:\Program Files\CMake\bin;C:\Program Files\LLVM\bin;C:\Users\Public\ffmpeg\bin;" + $env:PATH Set-Location "C:\Users\Public\act-runner" -& "C:\Users\Public\act-runner\act_runner.exe" daemon --config config.yaml +# cmd-level redirect (>>, 2>&1) keeps the daemon's native stderr out of PowerShell's error stream. +& cmd /c "act_runner.exe daemon --config config.yaml >> runner.log 2>&1" '@ | Set-Content -Encoding UTF8 $wrapper # --- SYSTEM scheduled task: keep the daemon alive across reboots, no login needed ---