name: Windows (MinGW)

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  build:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4

      - name: "Setup WinFlexBison"
        run: choco install winflexbison3

      - name: "Setup cmake"
        run: cmake --version

      - name: "Setup gil"
        run: |
          pip3 install gil
          gil update

      - name: "Build"
        env:
          INCLUDE: C:\mingw64\x86_64-w64-mingw32\include
          LIB: C:\mingw64\x86_64-w64-mingw32\lib
        run: |
          cd build
          ./mingw.bat
