name: "Windows Build"
on:
  push:
    branches: [ v1.x ]
  pull_request:
    # branches: [ master ]

jobs:
  build_libebml:
    name: ${{ matrix.config }} libebml for Windows
    runs-on: windows-latest
    strategy:
      fail-fast: false
      matrix:
        config: [Debug, Release]
    steps:
      - name: Get pushed code
        uses: actions/checkout@v7

      - name: Configure CMake
        run: cmake -S . -B _build -DCMAKE_INSTALL_PREFIX:STRING=${GITHUB_WORKSPACE}/_built -G Ninja

      - name: Build with CMake
        run: cmake --build _build --config ${{ matrix.config }} --parallel

      - name: Test installation
        run: cmake --install _build --config ${{ matrix.config }} --prefix ${GITHUB_WORKSPACE}/_built
