Add Windows MSVC compilation target and CI

Restructure compat layer: #include_next headers moved to posix/ for
MinGW, new standalone headers in msvc/ for MSVC (unistd.h, utime.h,
getopt.h). Add getopt() implementation, chmod/unlink/chdir compat
functions, MSVC CRT initializer for UTF-8 console, _pgmptr fix.
This commit is contained in:
Eremey Valetov
2026-03-11 08:16:11 -04:00
parent 145c948804
commit 40af7e877e
13 changed files with 196 additions and 8 deletions
+11 -3
View File
@@ -11,13 +11,21 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
include:
- { os: ubuntu-latest, name: Linux }
- { os: macos-latest, name: macOS }
- { os: windows-latest, name: Windows (MSVC) }
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v4
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build
- name: Smoke test
run: cmake --build build --config Release
- name: Smoke test (Unix)
if: runner.os != 'Windows'
run: ./build/cli/uc2 -h
- name: Smoke test (Windows)
if: runner.os == 'Windows'
run: .\build\cli\Release\uc2.exe -h