Repository navigation
upgrade-windows #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # TEMPORARY DIAGNOSTIC VERSION — branch diagnose/windows-fixture-hash. | |
| # Probes why `Get-FileHash` comes back CommandNotFoundException inside the | |
| # upgrade fixture. Not for merge; the real file lives on main. | |
| name: upgrade-windows | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| upgrade-fixture-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: A - what shell does a bare run step get | |
| continue-on-error: true | |
| run: | | |
| Write-Host "PSEdition=$($PSVersionTable.PSEdition) PSVersion=$($PSVersionTable.PSVersion)" | |
| Write-Host "--- parent PSModulePath ---" | |
| $env:PSModulePath -split ';' | ForEach-Object { Write-Host " $_" } | |
| Write-Host "--- Get-FileHash resolvable in parent? ---" | |
| Write-Host (Get-Command Get-FileHash -ErrorAction SilentlyContinue | Out-String) | |
| - name: B - the exact failing call, powershell child inheriting parent env | |
| continue-on-error: true | |
| run: | | |
| Set-Content -Path probe.bin -Value 'hello' | |
| Write-Host "--- child powershell PSVersion ---" | |
| powershell -NoProfile -Command 'Write-Host $PSVersionTable.PSVersion' | |
| Write-Host "--- child powershell PSModulePath ---" | |
| powershell -NoProfile -Command '$env:PSModulePath -split ";" | ForEach-Object { Write-Host " $_" }' | |
| Write-Host "--- child powershell Get-FileHash (the failing call) ---" | |
| powershell -NoProfile -Command "(Get-FileHash -Algorithm SHA256 -LiteralPath 'probe.bin').Hash.ToLower()" | |
| Write-Host "exit=$LASTEXITCODE" | |
| - name: C - candidate fix 1, pwsh child instead of powershell | |
| continue-on-error: true | |
| run: | | |
| pwsh -NoProfile -Command "(Get-FileHash -Algorithm SHA256 -LiteralPath 'probe.bin').Hash.ToLower()" | |
| Write-Host "exit=$LASTEXITCODE" | |
| - name: D - candidate fix 2, powershell child with PSModulePath cleared | |
| continue-on-error: true | |
| run: | | |
| $env:PSModulePath = '' | |
| powershell -NoProfile -Command "(Get-FileHash -Algorithm SHA256 -LiteralPath 'probe.bin').Hash.ToLower()" | |
| Write-Host "exit=$LASTEXITCODE" | |
| - name: E - candidate fix 3, powershell child with system module path restored | |
| continue-on-error: true | |
| run: | | |
| $env:PSModulePath = "$env:SystemRoot\system32\WindowsPowerShell\v1.0\Modules" | |
| powershell -NoProfile -Command "(Get-FileHash -Algorithm SHA256 -LiteralPath 'probe.bin').Hash.ToLower()" | |
| Write-Host "exit=$LASTEXITCODE" | |
| - name: F - certutil as a shell-free fallback | |
| continue-on-error: true | |
| run: | | |
| certutil -hashfile probe.bin SHA256 | |
| Write-Host "exit=$LASTEXITCODE" | |
| - name: G - the actual suite, current state | |
| continue-on-error: true | |
| run: cargo test --package the-loop --features upgrade --test upgrade_fixture |