name: test-csharp-win

on: [push, pull_request]

jobs:
  fast_build_release:
    runs-on: windows-2019

    steps:
      - uses: actions/checkout@v4

      - name: Create Build Environment
        run: cmake -E make_directory ${{runner.workspace}}/build

      - name: Configure CMake
        shell: bash
        working-directory: ${{runner.workspace}}/build
        run: cmake $GITHUB_WORKSPACE -DCSHARP=ON 

      - name: Build
        shell: bash
        working-directory: ${{runner.workspace}}/build
        run: cmake --build . --config Release --parallel

      - name: Test
        shell: bash
        working-directory: ${{runner.workspace}}/build
        run: |
          ls 
          ./bin/Release/csharpexample.exe

  fast_build_debug:
    runs-on: windows-latest

    steps:
      - uses: actions/checkout@v4

      - name: Create Build Environment
        run: cmake -E make_directory ${{runner.workspace}}/build

      - name: Configure CMake
        shell: bash
        working-directory: ${{runner.workspace}}/build
        run: cmake $GITHUB_WORKSPACE -DCSHARP=ON 

      - name: Build
        shell: bash
        working-directory: ${{runner.workspace}}/build
        run: cmake --build . --config Debug --parallel

      - name: Test
        shell: bash
        working-directory: ${{runner.workspace}}/build
        run: |
          ls 
          ./bin/Debug/csharpexample.exe
