Skip to content

Commit 0566677

Browse files
Updated workflow
1 parent 2689989 commit 0566677

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

.github/workflows/windows-cmake.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: windows-builds
22

3-
# Trigger on push to any branch and manual runs
43
on:
54
push:
65
workflow_dispatch:
@@ -18,7 +17,7 @@ jobs:
1817
- name: 📦 Checkout source code
1918
uses: actions/checkout@v4
2019
with:
21-
fetch-depth: 0 # Fetch full history for tags if needed
20+
fetch-depth: 0
2221

2322
- name: ⚙️ Install Ninja build system
2423
run: choco install ninja --no-progress
@@ -34,32 +33,25 @@ jobs:
3433
dir: ${{ env.QT_DIR }}
3534
setup-python: false
3635

37-
- name: 🛠️ Configure CMake (Ninja + MSVC)
38-
shell: pwsh
36+
- name: 🛠️ Configure CMake with Ninja + MSVC
37+
shell: cmd
3938
run: |
40-
# Initialize MSVC environment variables for 64-bit architecture
41-
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
42-
43-
# Run cmake with Ninja generator and MSVC toolchain
44-
cmake -S . -B build -G Ninja -A x64 `
45-
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\msvc2019_64" `
46-
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\install" `
39+
"C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 && ^
40+
cmake -S . -B build -G Ninja -A x64 ^
41+
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}\Qt\${{ env.QT_VERSION }}\msvc2019_64" ^
42+
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\install" ^
4743
-DCMAKE_BUILD_TYPE=Release
4844
4945
- name: 🔨 Build with Ninja + MSVC
50-
shell: pwsh
46+
shell: cmd
5147
run: |
52-
# Initialize MSVC environment again for build step
53-
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
54-
48+
"C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 && ^
5549
cmake --build build
5650
5751
- name: 📦 Install built files
58-
shell: pwsh
52+
shell: cmd
5953
run: |
60-
# Initialize MSVC environment again for install step
61-
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64
62-
54+
"C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 && ^
6355
cmake --install build
6456
6557
build_windows_mingw:

0 commit comments

Comments
 (0)