name: BuildExamplesWindows

on: [push, pull_request]

jobs:
  windows_build_tests:
    name: Build Examples (Windows)
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup env variables
      id: envs
      run: |
        echo "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC" >> $GITHUB_ENV
    - name: Setup MSVC
      uses: ilammy/msvc-dev-cmd@v1
    - name: Install Qt
      uses: jurplel/install-qt-action@v2
    - name: Build Samples
      run: |
        mkdir build
        cd build
        cmake -GNinja -DVCG_BUILD_EXAMPLES=ON ..
        ninja
