# .github/workflows/ci_linux.yml
name: CI – Linux

on:
  pull_request:
    branches: [main, develop]
  workflow_dispatch: {}

jobs:
  build_and_test:
    runs-on: ubuntu-latest
    steps:
      # 1️⃣ Checkout the repository
      - name: Checkout repository
        uses: actions/checkout@v6

      # 2️⃣ Install Bazelisk (recommended Bazel launcher)
      - name: Setup Bazelisk
        uses: bazel-contrib/setup-bazel@0.19.0
        with:
          bazelisk-version: "1.29.0"

      # 3️⃣ (Optional) Install Doxygen for documentation generation
      - name: Install Doxygen
        run: sudo apt-get update && sudo apt-get install -y doxygen

      # 4️⃣ Build all targets
      - name: Build all targets
        run: bazel build --verbose_failures //...

      # 6️⃣ Run all tests (including Python)
      - name: Run all tests
        run: bazel test --verbose_failures //...
