-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.04 KB
/
build.yml
File metadata and controls
36 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
}
}