name: Windows_vcpkg

on:
  push:
  pull_request:

jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@master
    - name: Checkout submodules
      run: git submodule update --init --recursive

#    - name: Setup interactive tmate session
#      uses: mxschmitt/action-tmate@v3

    - name: Install sdl and glfw via vcpkg
      run: vcpkg install glfw3:x64-windows sdl2:x64-windows

    - name: Configure
      run: |
         mkdir build
         cd build
         cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DHELLOIMGUI_USE_SDL2=ON -DHELLOIMGUI_USE_GLFW3=ON -DHELLOIMGUI_HAS_OPENGL3=ON -DHELLOIMGUI_USE_GLAD=ON -DHELLOIMGUI_BUILD_DOCS=ON ..

    - name: Build
      working-directory: build
      run: |
         cmake --build .
