@@ -216,3 +216,73 @@ jobs:
216
216
env :
217
217
NO_MINETEST_GAME : 1
218
218
NO_PACKAGE : 1
219
+
220
+ msvc :
221
+ name : VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }}
222
+ runs-on : windows-2019
223
+ env :
224
+ VCPKG_VERSION : c7ab9d3110813979a873b2dbac630a9ab79850dc
225
+ # 2020.04
226
+ vcpkg_packages : irrlicht zlib curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit
227
+ strategy :
228
+ fail-fast : false
229
+ matrix :
230
+ config :
231
+ - {
232
+ arch : x86,
233
+ generator : " -G'Visual Studio 16 2019' -A Win32" ,
234
+ vcpkg_triplet : x86-windows
235
+ }
236
+ - {
237
+ arch : x64,
238
+ generator : " -G'Visual Studio 16 2019' -A x64" ,
239
+ vcpkg_triplet : x64-windows
240
+ }
241
+ type : [portable]
242
+ # type: [portable, installer]
243
+ # The installer type is working, but disabled, to save runner jobs.
244
+ # Enable it, when working on the installer.
245
+
246
+ steps :
247
+ - name : Checkout
248
+ uses : actions/checkout@v2
249
+
250
+ - name : Restore from cache and run vcpkg
251
+ uses : lukka/run-vcpkg@v2
252
+ with :
253
+ vcpkgArguments : ${{env.vcpkg_packages}}
254
+ vcpkgDirectory : ' ${{ github.workspace }}\vcpkg'
255
+ appendedCacheKey : ${{ matrix.config.vcpkg_triplet }}
256
+ vcpkgGitCommitId : ${{ env.VCPKG_VERSION }}
257
+ vcpkgTriplet : ${{ matrix.config.vcpkg_triplet }}
258
+
259
+ - name : CMake
260
+ run : |
261
+ cmake ${{matrix.config.generator}} `
262
+ -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
263
+ -DCMAKE_BUILD_TYPE=Release `
264
+ -DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} .
265
+
266
+ - name : Build
267
+ run : cmake --build . --config Release
268
+
269
+ - name : CPack
270
+ run : |
271
+ If ($env:TYPE -eq "installer")
272
+ {
273
+ cpack -G WIX -B "$env:GITHUB_WORKSPACE\Package"
274
+ }
275
+ ElseIf($env:TYPE -eq "portable")
276
+ {
277
+ cpack -G ZIP -B "$env:GITHUB_WORKSPACE\Package"
278
+ }
279
+ env :
280
+ TYPE : ${{matrix.type}}
281
+
282
+ - name : Package Clean
283
+ run : rm -r $env:GITHUB_WORKSPACE\Package\_CPack_Packages
284
+
285
+ - uses : actions/upload-artifact@v1
286
+ with :
287
+ name : msvc-${{ matrix.config.arch }}-${{ matrix.type }}
288
+ path : .\Package\
0 commit comments