name: test-csharp-win

on: [push, pull_request]

jobs:
  fast_build_release:
    runs-on: windows-2022

    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 
          ./Release/bin/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 
          ./Debug/bin/csharpexample.exe
