From 54cd084b6a9b4fb0922eb5f8ad6bc2b456fe570a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 7 May 2026 10:44:43 +0000 Subject: [PATCH] CI(windows): use *>&1 to capture PS Information stream (Write-Host) into install.log setup.ps1 emits the "prebuilt installed and validated" / "prebuilt up to date and validated" markers via the `step` function, which calls Write-Host. In PowerShell 5+, Write-Host writes to the Information stream, NOT stdout. Plain `2>&1 | Tee-Object` only redirects stderr -> stdout, so Information-stream output flows to the host (visible in the GitHub Actions log) but never lands in logs/install.log. The post-step grep asserter then fails with "no Windows prebuilt llama.cpp marker in install.log" even though the prebuilt was installed correctly. Switch to `*>&1` (the wildcard "all streams" redirect) so Tee-Object captures Information stream too. Also silence the ProgressPreference noise that fills install.log with progress-bar ANSI sequences. --- .github/workflows/studio-windows-api-smoke.yml | 6 +++++- .../studio-windows-inference-smoke.yml | 18 +++++++++++++++--- .github/workflows/studio-windows-ui-smoke.yml | 11 ++++++++++- .../workflows/studio-windows-update-smoke.yml | 6 +++++- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.github/workflows/studio-windows-api-smoke.yml b/.github/workflows/studio-windows-api-smoke.yml index b1d6a31b1e..7c10183f35 100644 --- a/.github/workflows/studio-windows-api-smoke.yml +++ b/.github/workflows/studio-windows-api-smoke.yml @@ -84,7 +84,11 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | New-Item -ItemType Directory -Force -Path logs | Out-Null - & ./install.ps1 --local --no-torch 2>&1 | Tee-Object -FilePath logs/install.log + # *>&1 captures Write-Host (Information stream) output; + # plain 2>&1 does not. setup.ps1 emits "prebuilt installed + # and validated" via Write-Host, and we grep for that. + $ProgressPreference = 'SilentlyContinue' + & ./install.ps1 --local --no-torch *>&1 | Tee-Object -FilePath logs/install.log - name: Assert install.ps1 used the Windows llama.cpp prebuilt run: | diff --git a/.github/workflows/studio-windows-inference-smoke.yml b/.github/workflows/studio-windows-inference-smoke.yml index e387e8326f..3a11e494cb 100644 --- a/.github/workflows/studio-windows-inference-smoke.yml +++ b/.github/workflows/studio-windows-inference-smoke.yml @@ -94,7 +94,11 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | New-Item -ItemType Directory -Force -Path logs | Out-Null - & ./install.ps1 --local --no-torch 2>&1 | Tee-Object -FilePath logs/install.log + # *>&1 captures Write-Host (Information stream) output; + # plain 2>&1 does not. setup.ps1 emits "prebuilt installed + # and validated" via Write-Host, and we grep for that. + $ProgressPreference = 'SilentlyContinue' + & ./install.ps1 --local --no-torch *>&1 | Tee-Object -FilePath logs/install.log - name: Assert install.ps1 used the Windows llama.cpp prebuilt run: | @@ -329,7 +333,11 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | New-Item -ItemType Directory -Force -Path logs | Out-Null - & ./install.ps1 --local --no-torch 2>&1 | Tee-Object -FilePath logs/install.log + # *>&1 captures Write-Host (Information stream) output; + # plain 2>&1 does not. setup.ps1 emits "prebuilt installed + # and validated" via Write-Host, and we grep for that. + $ProgressPreference = 'SilentlyContinue' + & ./install.ps1 --local --no-torch *>&1 | Tee-Object -FilePath logs/install.log - name: Assert install.ps1 used the Windows llama.cpp prebuilt run: | @@ -655,7 +663,11 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | New-Item -ItemType Directory -Force -Path logs | Out-Null - & ./install.ps1 --local --no-torch 2>&1 | Tee-Object -FilePath logs/install.log + # *>&1 captures Write-Host (Information stream) output; + # plain 2>&1 does not. setup.ps1 emits "prebuilt installed + # and validated" via Write-Host, and we grep for that. + $ProgressPreference = 'SilentlyContinue' + & ./install.ps1 --local --no-torch *>&1 | Tee-Object -FilePath logs/install.log - name: Assert install.ps1 used the Windows llama.cpp prebuilt run: | diff --git a/.github/workflows/studio-windows-ui-smoke.yml b/.github/workflows/studio-windows-ui-smoke.yml index a96b54d28a..843caf71a6 100644 --- a/.github/workflows/studio-windows-ui-smoke.yml +++ b/.github/workflows/studio-windows-ui-smoke.yml @@ -97,7 +97,16 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | New-Item -ItemType Directory -Force -Path logs | Out-Null - & ./install.ps1 --local --no-torch 2>&1 | Tee-Object -FilePath logs/install.log + # *>&1 redirects ALL PowerShell streams (stdout, stderr, + # warning, verbose, debug, information) into the success + # stream so Tee-Object captures everything. install.ps1 + # and setup.ps1 emit step/substep markers via Write-Host + # which lands on the Information stream (PS 5+); without + # the wildcard redirect, those markers (including + # "prebuilt installed and validated") never reach + # logs/install.log and the post-step grep asserter fails. + $ProgressPreference = 'SilentlyContinue' + & ./install.ps1 --local --no-torch *>&1 | Tee-Object -FilePath logs/install.log - name: Assert install.ps1 used the Windows llama.cpp prebuilt run: | diff --git a/.github/workflows/studio-windows-update-smoke.yml b/.github/workflows/studio-windows-update-smoke.yml index 551760825a..9b11ab50a3 100644 --- a/.github/workflows/studio-windows-update-smoke.yml +++ b/.github/workflows/studio-windows-update-smoke.yml @@ -79,7 +79,11 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | New-Item -ItemType Directory -Force -Path logs | Out-Null - & ./install.ps1 --local --no-torch 2>&1 | Tee-Object -FilePath logs/install.log + # *>&1 captures Write-Host (Information stream) output; + # plain 2>&1 does not. setup.ps1 emits "prebuilt installed + # and validated" via Write-Host, and we grep for that. + $ProgressPreference = 'SilentlyContinue' + & ./install.ps1 --local --no-torch *>&1 | Tee-Object -FilePath logs/install.log - name: Assert install.ps1 used the Windows llama.cpp prebuilt run: |