name: Unit Tests Windows

on: [ push ]

jobs:
  build_mingw:
    runs-on: windows-latest
    
    steps:
    - uses: actions/checkout@v2

    - name: cmake
      run: cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNIT_TESTS=TRUE -G "MinGW Makefiles" -S ./source
      
    - name: build
      run: cmake --build ./

    - name: unit-tests
      run: ./unittests
      
  build_msvc:
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v2

      - name: cmake
        shell: cmd
        run: |
          call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
          cmake -G "Visual Studio 16 2019" -A x64 -DENABLE_UNIT_TESTS=TRUE -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -S ./source

      - name: build
        run: cmake --build ./ --config Debug

      - name: unit-tests
        run: ./Debug/unittests

name: Unit Tests Windows

on: [ push ]

jobs:
  build_mingw:
    runs-on: windows-latest
    
    steps:
    - uses: actions/checkout@v2

    - name: cmake
      run: cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNIT_TESTS=TRUE -G "MinGW Makefiles" -S ./source
      
    - name: build
      run: cmake --build ./

    - name: unit-tests
      run: ./unittests
      
  build_msvc:
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v2

      - name: cmake
        shell: cmd
        run: |
          call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
          cmake -G "Visual Studio 17 2022" -A x64 -DENABLE_UNIT_TESTS=TRUE -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -S ./source

      - name: build
        run: cmake --build ./ --config Debug

      - name: unit-tests
        run: ./Debug/unittests

Use Microsoft Visual Studio 17 2022
[CI] Use Microsoft Visual Studio 17 2022
