ci: install Qt-matching MinGW 13.1.0 to fix test segfaults

System MinGW on windows-latest is GCC 15.2 which has ABI mismatch
with Qt 6.8.1 (built with MinGW 13.1.0), causing all tests to
segfault. Install the matching toolchain via aqtinstall tools and
use it instead of the system compiler.
This commit is contained in:
IChooseYou
2026-02-21 09:07:09 -07:00
parent b089e20d36
commit d45ee9e4c9

View File

@@ -18,31 +18,32 @@ jobs:
with:
submodules: recursive
- name: Install Qt6
- name: Install Qt6 and MinGW
uses: jurplel/install-qt-action@v4
with:
version: '6.8.1'
arch: 'win64_mingw'
tools: 'tools_mingw1310,qt.tools.win64_mingw1310'
cache: true
aqtversion: '==3.1.21'
- name: Configure
shell: bash
run: |
export PATH="/c/mingw64/bin:$PATH"
export PATH="$IQTA_TOOLS/mingw1310_64/bin:$PATH"
gcc --version
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_UI_TESTS=OFF \
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
- name: Build
shell: bash
run: |
export PATH="/c/mingw64/bin:$PATH"
export PATH="$IQTA_TOOLS/mingw1310_64/bin:$PATH"
cmake --build build
- name: Test
shell: bash
run: |
export PATH="/c/mingw64/bin:$PATH"
export PATH="$IQTA_TOOLS/mingw1310_64/bin:$PATH"
ctest --test-dir build --output-on-failure
- name: Upload artifact
@@ -115,7 +116,6 @@ jobs:
with:
version: '6.8.1'
cache: true
aqtversion: '==3.1.21'
- name: Install dependencies
run: |