Child-process-tree #267
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: Build Check | |
| on: [pull_request, push] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Compile | |
| shell: pwsh | |
| run: | | |
| cl /O2 /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /Fe:win-witr.exe | |
| # Add the current directory (where win-witr.exe was compiled) to PATH | |
| $env:PATH = "$PWD;$env:PATH" | |
| # Verify the exe is accessible | |
| Write-Host "Checking win-witr.exe availability..." | |
| win-witr --version | |
| - name: Run Tests | |
| shell: pwsh | |
| run: | | |
| # Run all test .bat files | |
| Get-ChildItem -Path tests -Recurse -Filter *.bat | ForEach-Object { | |
| Write-Host "Running test: $($_.FullName)" | |
| & $_.FullName | |
| if ($LASTEXITCODE -ne 0) { | |
| Write-Error "Test failed: $($_.Name)" | |
| exit 1 | |
| } | |
| } | |