mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
- 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)
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
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
|