name: Build
on: [push, pull_request]

jobs:
  linux:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Build with meson
        run: |
          pip install meson
          pip install ninja
          
          meson setup build
          meson compile -C build

      - name: Build with cmake
        run: |
          cmake .
          cmake --build .
          
  macos:
    runs-on: macos-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Build with meson
        run: |
          pip install meson
          pip install ninja
          
          meson setup build
          meson compile -C build

      - name: Build with cmake
        run: |
          cmake .
          cmake --build .
          
  windows:
    runs-on: windows-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Build with meson
        run: |
          pip install meson
          pip install ninja
          
          meson setup build
          meson compile -C build

      - name: Build with cmake
        run: |
          cmake .
          cmake --build .
