CI: add Windows workflow and a reusable integration-test runner

- ci: build with MinGW-w64 (MSYS2) + Ninja on windows-latest and run the integration tests

- tests: add run-tests.ps1, which compiles the modules, refreshes tests/resources, then runs every test and asserts on its output (the tests exit 0 even on failure, so exit codes are not enough)
This commit is contained in:
xiaozhou233 committed 2026-10-16 12:29:31 +08:00
1 parent 13145f77c9
commit 9aebf29bb5
2 files changed
+208

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
jobs:
build-and-test:
name: Build & integration tests (Windows, MinGW)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
- name: Set up MinGW-w64 toolchain
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: false
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
- name: Configure
shell: msys2 {0}
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: Build
shell: msys2 {0}
run: cmake --build build
- name: Run integration tests
shell: pwsh
run: |
# libagent.dll links against the MinGW runtime DLLs from this toolchain.
$env:PATH = "C:\msys64\mingw64\bin;$env:PATH"
./tests/run-tests.ps1