Skip to content

Commit 705d931

Browse files
Updated MinGW build
1 parent d1367c9 commit 705d931

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

.github/workflows/windows-cmake.yml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -53,60 +53,60 @@ jobs:
5353
run: cmake --install build
5454
shell: powershell
5555

56-
build_windows_mingw:
57-
name: Build with Qt's MinGW and CMake (no Ninja)
58-
runs-on: windows-2022
59-
60-
env:
61-
QT_VERSION: 6.8.2
62-
QT_DIR: ${{ github.workspace }}\Qt
63-
QT_CACHE_KEY: qt-${{ runner.os }}-${{ env.QT_VERSION }}-mingw
64-
65-
steps:
66-
- name: 📦 Checkout source code
67-
uses: actions/checkout@v4
68-
with:
69-
fetch-depth: 0
70-
71-
- name: 💾 Restore Qt cache
72-
id: qt-cache
73-
uses: actions/cache@v4
74-
with:
75-
path: ${{ env.QT_DIR }}
76-
key: ${{ env.QT_CACHE_KEY }}
77-
78-
- name: 📥 Install Qt + MinGW (if not cached)
79-
if: steps.qt-cache.outputs.cache-hit != 'true'
80-
uses: jurplel/install-qt-action@v4
81-
with:
82-
aqtversion: '==3.1.19'
83-
version: ${{ env.QT_VERSION }}
84-
target: desktop
85-
host: windows
86-
arch: win64_mingw
87-
dir: ${{ env.QT_DIR }}
88-
tools: 'tools_mingw'
89-
setup-python: false
90-
91-
- name: ➕ Add Qt-bundled MinGW to PATH
92-
shell: powershell
93-
run: |
94-
$mingwPath = Get-ChildItem "${{ env.QT_DIR }}\Tools" | Where-Object { $_.Name -like "mingw*" } | Select-Object -First 1
95-
echo "${{ env.QT_DIR }}\Tools\$($mingwPath.Name)\bin" >> $env:GITHUB_PATH
96-
97-
- name: 🛠️ Configure CMake (MinGW)
98-
shell: powershell
99-
run: |
100-
cmake -S . -B build-mingw `
101-
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\mingw_64" `
102-
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
103-
-DCMAKE_BUILD_TYPE=Release `
104-
-G "MinGW Makefiles"
105-
106-
- name: 🔨 Build with CMake (MinGW)
107-
shell: powershell
108-
run: cmake --build build-mingw -- -j2
109-
110-
- name: 📦 Install built files (MinGW)
111-
shell: powershell
112-
run: cmake --install build-mingw
56+
build_windows_mingw:
57+
name: Build with Qt's MinGW and CMake (no Ninja)
58+
runs-on: windows-2022
59+
60+
env:
61+
QT_VERSION: 6.8.2
62+
QT_DIR: ${{ github.workspace }}\Qt
63+
QT_CACHE_KEY: qt-${{ runner.os }}-${{ env.QT_VERSION }}-mingw
64+
65+
steps:
66+
- name: 📦 Checkout source code
67+
uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 0
70+
71+
- name: 💾 Restore Qt cache
72+
id: qt-cache
73+
uses: actions/cache@v4
74+
with:
75+
path: ${{ env.QT_DIR }}
76+
key: ${{ env.QT_CACHE_KEY }}
77+
78+
- name: 📥 Install Qt + MinGW (if not cached)
79+
if: steps.qt-cache.outputs.cache-hit != 'true'
80+
uses: jurplel/install-qt-action@v4
81+
with:
82+
aqtversion: '==3.1.19'
83+
version: ${{ env.QT_VERSION }}
84+
target: desktop
85+
host: windows
86+
arch: win64_mingw
87+
dir: ${{ env.QT_DIR }}
88+
tools: 'tools_mingw'
89+
setup-python: false
90+
91+
- name: ➕ Add Qt-bundled MinGW to PATH
92+
shell: powershell
93+
run: |
94+
$mingwPath = Get-ChildItem "${{ env.QT_DIR }}\Tools" | Where-Object { $_.Name -like "mingw*" } | Select-Object -First 1
95+
echo "${{ env.QT_DIR }}\Tools\$($mingwPath.Name)\bin" >> $env:GITHUB_PATH
96+
97+
- name: 🛠️ Configure CMake (MinGW)
98+
shell: powershell
99+
run: |
100+
cmake -S . -B build-mingw `
101+
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\mingw_64" `
102+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
103+
-DCMAKE_BUILD_TYPE=Release `
104+
-G "MinGW Makefiles"
105+
106+
- name: 🔨 Build with CMake (MinGW)
107+
shell: powershell
108+
run: cmake --build build-mingw -- -j2
109+
110+
- name: 📦 Install built files (MinGW)
111+
shell: powershell
112+
run: cmake --install build-mingw

0 commit comments

Comments
 (0)