Skip to content

Commit 31402ee

Browse files
Updated windows-cmake.yml to use bundled Qt MinGW toolchain
1 parent b7cbac8 commit 31402ee

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/windows-cmake.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
shell: powershell
5555

5656
build_windows_mingw:
57-
name: Build with MinGW and CMake (no Ninja)
57+
name: Build with Qt's MinGW and CMake (no Ninja)
5858
runs-on: windows-2022
5959

6060
env:
@@ -67,15 +67,7 @@ jobs:
6767
with:
6868
fetch-depth: 0
6969

70-
- name: ⚙️ Install MinGW toolchain
71-
run: choco install mingw --no-progress
72-
shell: powershell
73-
74-
- name: ➕ Add MinGW to system PATH
75-
run: echo "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin" >> $env:GITHUB_PATH
76-
shell: powershell
77-
78-
- name: 📥 Install Qt for MinGW
70+
- name: 📥 Install Qt for MinGW (with bundled toolchain)
7971
uses: jurplel/install-qt-action@v4
8072
with:
8173
aqtversion: '==3.1.19'
@@ -86,6 +78,12 @@ jobs:
8678
dir: ${{ env.QT_DIR }}
8779
setup-python: false
8880

81+
- name: ➕ Add Qt-bundled MinGW to PATH
82+
shell: powershell
83+
run: |
84+
$mingwPath = Get-ChildItem "${{ env.QT_DIR }}\Tools" | Where-Object { $_.Name -like "mingw*" } | Select-Object -First 1
85+
echo "${{ env.QT_DIR }}\Tools\$($mingwPath.Name)\bin" >> $env:GITHUB_PATH
86+
8987
- name: 🛠️ Configure CMake (MinGW)
9088
shell: powershell
9189
run: |
@@ -101,4 +99,4 @@ jobs:
10199

102100
- name: 📦 Install built files (MinGW)
103101
shell: powershell
104-
run: cmake --install build-mingw
102+
run: cmake --install build-mingw

0 commit comments

Comments
 (0)