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 # Bundle the MinGW runtime DLLs next to the binaries. The integration # tests load libagent.dll through System.load, and its dependencies # (libstdc++/libgcc/libwinpthread) are otherwise only found via PATH. # copy-bin.bat then carries them into tests/resources as well. for dll in libstdc++-6.dll libgcc_s_seh-1.dll libwinpthread-1.dll; do if [ -f "/mingw64/bin/$dll" ]; then cp -f "/mingw64/bin/$dll" build/bin/ fi done echo "--- build/bin ---" ls -1 build/bin - name: Run integration tests shell: pwsh run: | # Prepend the toolchain bin as a fallback for the runtime DLLs. $env:PATH = "C:\msys64\mingw64\bin;$env:PATH" ./tests/run-tests.ps1