3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-26 17:02:38 +00:00

ci: add MinGW build/test job to Windows.yml (#10211)

MinGW silently ignores `#pragma comment(lib, ...)` (MSVC-only), so
linker errors like missing `dbghelp` symbols go undetected until a
downstream user hits them. No CI coverage existed for MinGW on Windows.

## Changes

- **`.github/workflows/Windows.yml`**: New `mingw-build` job using MSYS2
UCRT64 (`mingw-w64-ucrt-x86_64-gcc`) that builds Z3 via `cmake -G Ninja`
and runs `test-z3 /a`, exercising the full link step under MinGW on
every push/PR to master.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot 2026-07-24 13:11:08 -07:00 committed by GitHub
parent 19781df2bc
commit 18b4a86740
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 29 additions and 2 deletions

View file

@ -11,6 +11,33 @@ concurrency:
cancel-in-progress: true
jobs:
mingw-build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Setup MSYS2 (UCRT64 / MinGW-w64)
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-ninja
python3
- name: Build Z3 with MinGW
shell: msys2 {0}
run: |
mkdir build && cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja -j$(nproc) shell test-z3
- name: Run unit tests
shell: msys2 {0}
run: |
cd build
./test-z3.exe /a
build:
strategy:
matrix:

View file

@ -19,6 +19,7 @@ Revision History:
#include "util/hwf.h"
#include "util/f2n.h"
#include "util/rational.h"
#include <cfloat>
#include <iostream>
static void bug_set_double() {

View file

@ -497,10 +497,9 @@ void tst_quant_elim() {
memory::finalize();
#ifdef _WINDOWS
#if defined(_WINDOWS) && defined(_MSC_VER)
_CrtDumpMemoryLeaks();
#endif
exit(0);
}