1
1
name : windows-builds
2
2
3
- # Trigger on:
4
- # - Manual runs via GitHub UI (workflow_dispatch)
5
- # - Pushes that touch build-relevant files
3
+ # Trigger this workflow on any push or manual dispatch
6
4
on :
7
5
push :
8
6
workflow_dispatch :
9
7
10
8
jobs :
11
- build_windows_msvc :
12
- name : Build with MSVC and CMake
9
+ build_windows_msvc_ninja :
10
+ name : Build with MSVC + Ninja
13
11
runs-on : windows-2022
14
12
15
13
env :
16
14
QT_VERSION : 6.4.2
17
- QT_DIR : ${{ github.workspace }}\Qt
15
+ QT_DIR : ${{ github.workspace }}\Qt # Directory where Qt will be installed
18
16
19
17
steps :
20
18
- name : 📦 Checkout source code
21
19
uses : actions/checkout@v4
22
20
with :
23
- fetch-depth : 0 # Full history for tags/versions if needed
24
-
25
- - name : ⚙️ Install Ninja build system
26
- run : choco install ninja --no-progress
27
- shell : powershell
21
+ fetch-depth : 0 # Fetch full git history and tags
28
22
29
23
- name : 📥 Install Qt for MSVC
30
24
uses : jurplel/install-qt-action@v3
31
25
with :
32
- version : ${{ env.QT_VERSION }}
33
- target : desktop
34
- host : windows
35
- arch : win64_msvc2019_64
36
- dir : ${{ env.QT_DIR }}
37
- setup-python : false
26
+ version : ${{ env.QT_VERSION }} # Qt version to install
27
+ target : desktop # Desktop Qt build
28
+ host : windows # Host OS
29
+ arch : win64_msvc2019_64 # MSVC 2019 64-bit architecture
30
+ dir : ${{ env.QT_DIR }} # Install path for Qt
31
+ setup-python : false # Skip Python setup (optional)
32
+
33
+ - name : ⚙️ Install Ninja build system
34
+ run : choco install ninja --no-progress # Install Ninja via Chocolatey
35
+ shell : powershell
38
36
39
- - name : 🛠️ Configure CMake (MSVC)
37
+ - name : 🛠️ Configure CMake (Ninja + MSVC)
38
+ # Use windows-msvc shell that auto-sets MSVC environment variables
39
+ shell : windows-msvc
40
40
run : |
41
41
cmake -S . -B build `
42
- -DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\msvc2019_64" `
43
- -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
44
- -DCMAKE_BUILD_TYPE=Release `
45
- -G Ninja
46
- shell : powershell
42
+ -G Ninja ` # Use Ninja generator
43
+ -A x64 ` # Target 64-bit architecture
44
+ -DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\msvc2019_64" ` # Qt install path for CMake
45
+ -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\install" ` # Install path
46
+ -DCMAKE_BUILD_TYPE=Release # Release build type
47
47
48
- - name : 🔨 Build with CMake ( MSVC)
49
- run : cmake --build build
50
- shell : powershell
48
+ - name : 🔨 Build with Ninja + MSVC
49
+ shell : windows-msvc
50
+ run : cmake --build build # Build the project
51
51
52
- - name : 📦 Install built files (MSVC)
53
- run : cmake --install build
54
- shell : powershell
52
+ - name : 📦 Install built files
53
+ shell : windows-msvc
54
+ run : cmake --install build # Install the build output
55
55
56
56
build_windows_mingw :
57
- name : Build with MinGW and CMake
57
+ name : Build with MinGW + Ninja
58
58
runs-on : windows-2022
59
59
60
60
env :
61
61
QT_VERSION : 6.4.2
62
- QT_DIR : ${{ github.workspace }}\Qt
62
+ QT_DIR : ${{ github.workspace }}\Qt # Directory where Qt will be installed
63
63
64
64
steps :
65
65
- name : 📦 Checkout source code
66
66
uses : actions/checkout@v4
67
67
with :
68
- fetch-depth : 0
68
+ fetch-depth : 0 # Full history for tags/versions if needed
69
69
70
70
- name : ⚙️ Install Ninja and MinGW toolchain
71
71
run : |
72
- choco install ninja --no-progress
73
- choco install mingw --no-progress
74
- shell : powershell
75
-
76
- - name : ➕ Add MinGW to system PATH
77
- run : echo "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin" >> $env:GITHUB_PATH
78
- shell : powershell
79
-
80
- - name : 📥 Install Qt for MinGW
81
- uses : jurplel/install-qt-action@v3
82
- with :
83
- version : ${{ env.QT_VERSION }}
84
- target : desktop
85
- host : windows
86
- arch : mingw_64
87
- dir : ${{ env.QT_DIR }}
88
- setup-python : false
89
-
90
- - name : 🛠️ Configure CMake (MinGW)
91
- run : |
92
- cmake -S . -B build-mingw `
93
- -DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\mingw_64" `
94
- -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\install `
95
- -DCMAKE_BUILD_TYPE=Release `
96
- -G Ninja
97
- shell : powershell
98
-
99
- - name : 🔨 Build with CMake (MinGW)
100
- run : cmake --build build-mingw
101
- shell : powershell
102
-
103
- - name : 📦 Install built files (MinGW)
104
- run : cmake --install build-mingw
105
- shell : powershell
72
+ choco inst
0 commit comments