]> git.lizzy.rs Git - irrlicht.git/commitdiff
Add MSVC CI build (#26)
authorLoneWolfHT <lonewolf04361@gmail.com>
Thu, 7 Jul 2022 19:44:48 +0000 (12:44 -0700)
committerGitHub <noreply@github.com>
Thu, 7 Jul 2022 19:44:48 +0000 (21:44 +0200)
.github/workflows/build.yml
.gitignore

index 5feea3e4ac19b5c722462c39aa6e16594ace06c0..b45988dc848d7bcafdf71102a1398530aeab61b1 100644 (file)
@@ -118,3 +118,62 @@ jobs:
       - name: Test (headless)
         run: |
           ./bin/OSX/AutomatedTest null
+
+  msvc:
+    name: VS 2019 ${{ matrix.config.arch }}
+    runs-on: windows-2019
+    env:
+      VCPKG_VERSION: 14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44
+        # 2022.05.10
+      vcpkg_packages: zlib libpng libjpeg-turbo opengl-registry
+    strategy:
+      fail-fast: false
+      matrix:
+        config:
+          -
+            arch: x86
+            generator: "-G'Visual Studio 16 2019' -A Win32"
+            vcpkg_triplet: x86-windows
+          -
+            arch: x64
+            generator: "-G'Visual Studio 16 2019' -A x64"
+            vcpkg_triplet: x64-windows
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Restore from cache and run vcpkg
+        uses: lukka/run-vcpkg@v7
+        with:
+          vcpkgArguments: ${{env.vcpkg_packages}}
+          vcpkgDirectory: '${{ github.workspace }}\vcpkg'
+          appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
+          vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
+          vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
+
+      - name: CMake
+        run: |
+            cmake ${{matrix.config.generator}}  `
+            -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake"  `
+            -DCMAKE_BUILD_TYPE=Release .
+
+      - name: Build
+        run: cmake --build . --config Release
+
+      - name: Create artifact folder
+        run: |
+          mkdir artifact/
+          mkdir artifact/lib/
+
+      - name: Move dlls into artifact folder
+        run: move bin\Win32-VisualStudio\Release\* artifact\lib\
+
+      - name: Move includes into artifact folder
+        run: move include artifact/
+
+      - name: Upload Artifact
+        uses: actions/upload-artifact@v2
+        with:
+          name: msvc-${{ matrix.config.arch }}
+          path: artifact/
index 901d81ce9078fb19ee4cf674dfbfab55d91e39ea..09bcdd59e9b2cbc41159d7e79712b0e14f784bd7 100644 (file)
@@ -15,3 +15,7 @@ bin/Linux
 scripts/gl2ext.h
 scripts/glcorearb.h
 scripts/glext.h
+*.vcxproj*
+*.dir/
+*.sln
+*visualstudio/