Skip to content

Commit 05dc82f

Browse files
committed
Also use ninja for 32-bit Windows build
1 parent f3990a7 commit 05dc82f

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

.github/workflows/cmake.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ jobs:
157157
submodules: recursive
158158
fetch-depth: 0
159159

160-
- name: Create Build Environment
161-
run: cmake -E make_directory ${{github.workspace}}/build
162-
163160
- name: ccache
164161
uses: hendrikmuhs/ccache-action@v1.2
165162
with:
@@ -175,13 +172,13 @@ jobs:
175172

176173
- name: Configure CMake
177174
shell: bash
178-
working-directory: ${{github.workspace}}/build
179-
run: cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
175+
working-directory: ${{github.workspace}}
176+
run: cmake -Bbuild -GNinja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
180177

181178
- name: Build
182179
shell: bash
183-
working-directory: ${{github.workspace}}/build
184-
run: cmake --build . --config $BUILD_TYPE
180+
working-directory: ${{github.workspace}}
181+
run: cmake --build build --config $BUILD_TYPE
185182

186183
- name: Creating Installer
187184
working-directory: ${{github.workspace}}
@@ -222,18 +219,28 @@ jobs:
222219
submodules: recursive
223220
fetch-depth: 0
224221

225-
- name: Create Build Environment
226-
run: cmake -E make_directory ${{github.workspace}}/build
222+
- name: ccache
223+
uses: hendrikmuhs/ccache-action@v1.2
224+
with:
225+
key: win32
226+
227+
- name: Set up MSVC environment
228+
uses: ilammy/msvc-dev-cmd@v1
229+
with:
230+
arch: Win32
231+
232+
- name: Install Ninja
233+
uses: seanmiddleditch/gha-setup-ninja@v3
227234

228235
- name: Configure CMake
229236
shell: bash
230-
working-directory: ${{github.workspace}}/build
231-
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 17 2022" -A Win32
237+
working-directory: ${{github.workspace}}
238+
run: cmake -Bbuild -GNinja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
232239

233240
- name: Build
234241
shell: bash
235-
working-directory: ${{github.workspace}}/build
236-
run: cmake --build . --config $BUILD_TYPE
242+
working-directory: ${{github.workspace}}
243+
run: cmake --build build --config $BUILD_TYPE
237244

238245
- name: Creating Installer
239246
working-directory: ${{github.workspace}}

0 commit comments

Comments
 (0)