debug: round 2 — raw exit code + verbose + log dir dump #3
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
| name: debug-mcpp230 | |
| on: | |
| push: | |
| branches: [ "debug/mcpp230-windows-repro" ] | |
| permissions: | |
| contents: read | |
| env: | |
| MCPP_VERSION: "0.0.95" | |
| jobs: | |
| win-repro: | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download mcpp | |
| shell: bash | |
| run: | | |
| curl -L -fsS -o mcpp.zip \ | |
| "https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/mcpp-${MCPP_VERSION}-windows-x86_64.zip" | |
| powershell -NoProfile -Command "Expand-Archive -Force -Path 'mcpp.zip' -DestinationPath '.'" | |
| root="$PWD/mcpp-${MCPP_VERSION}-windows-x86_64" | |
| mkdir -p "$HOME/.mcpp/registry" | |
| cp -a "$root/registry/." "$HOME/.mcpp/registry/" | |
| echo "MCPP=$(cygpath -m "$root/bin/mcpp.exe")" >> "$GITHUB_ENV" | |
| - name: repro with verbose + raw exit code | |
| shell: powershell | |
| continue-on-error: true | |
| env: | |
| MCPP_INDEX_MIRROR: GLOBAL | |
| MCPP_LOG_LEVEL: debug | |
| run: | | |
| cd tests\examples\archive | |
| $p = Start-Process -FilePath $env:MCPP -ArgumentList "test","--verbose" -NoNewWindow -Wait -PassThru ` | |
| -RedirectStandardOutput out.txt -RedirectStandardError err.txt | |
| "RAW EXIT CODE: $($p.ExitCode) (0x{0:X8})" -f $p.ExitCode | |
| "===== stdout tail =====" | |
| Get-Content out.txt -Tail 40 | |
| "===== stderr tail =====" | |
| Get-Content err.txt -Tail 80 | |
| - name: dump logs | |
| if: always() | |
| shell: bash | |
| run: | | |
| echo "===== ls ~/.mcpp ====="; ls -la "$HOME/.mcpp" 2>/dev/null || true | |
| echo "===== ls ~/.mcpp/log ====="; ls -la "$HOME/.mcpp/log" 2>/dev/null || true | |
| for f in "$HOME"/.mcpp/log/mcpp.log*; do | |
| [ -f "$f" ] || continue | |
| echo "===== $f (last 200 lines) ====="; tail -n 200 "$f" | |
| done | |
| echo "===== crash dumps ====="; ls -la "$LOCALAPPDATA/CrashDumps" 2>/dev/null || true |