@@ -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