name: CI

on:
  pull_request:
  push:
    branches:
      - main
  schedule:
    - cron: "0 0 * * *"

jobs:
  linux_build_and_test:
    runs-on: ubuntu-24.04
    timeout-minutes: 15
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: System information
        run: |
          uname -a
          lsb_release -a
          clang -v
      - name: Build and test
        run: |
          ./project.sh test all
  macos_build_and_test:
    runs-on: macos-15
    timeout-minutes: 15
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Install LLVM
        run: |
          brew install llvm
      - name: System information
        run: |
          uname -a
          sw_vers -productVersion
          clang -v
      - name: Build and test
        run: |
          ./project.sh test all
  windows_build_and_test:
    runs-on: windows-latest
    timeout-minutes: 15
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      # - name: System information
      #   run: |
      #     systeminfo
      #     clang -v
      - name: Build and test
        run: |
          ./project.bat test all
