matrix:
  platform:
    - debian11
    - debian13
    - macos_arm64
    - ubuntu2204
    - ubuntu2404
  bazel: [8.x, 9.x, rolling]
tasks:
  verify_target_with_zenoh_pico:
    name: Verify build targets
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
      - "--@zenoh-cpp//:use_zenoh_pico=true"
    build_targets:
      - "@zenoh-cpp//:zenoh-cpp"
  verify_target_with_zenoh_c:
    name: Verify build targets
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
      - "--@zenoh-cpp//:use_zenoh_pico=false"
    build_targets:
      - "@zenoh-cpp//:zenoh-cpp"
bcr_test_module:
  module_path: tests
  matrix:
    linux_platform:
      - debian11
      - debian13
      - ubuntu2204
      - ubuntu2404
    osx_platform:
      - macos_arm64
    bazel: [8.x, 9.x, rolling]
  tasks:
    run_linux_test_module_with_zenoh_pico:
      name: Run linux test module
      platform: ${{ linux_platform }}
      bazel: ${{ bazel }}
      build_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=true"
      build_targets:
        - //...
      test_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=true"
      test_targets:
        - //...
    run_linux_test_module_with_zenoh_c:
      name: Run linux test module
      platform: ${{ linux_platform }}
      bazel: ${{ bazel }}
      build_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=false"
      build_targets:
        - //...
      test_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=false"
      test_targets:
        - //...
        - -//:tests_universal_network_pub_sub
        - -//:tests_zenohc_shm_api
    run_osx_test_module_with_zenoh_pico:
      name: Run osx test module
      platform: ${{ osx_platform }}
      bazel: ${{ bazel }}
      build_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=true"
      build_targets:
        - //...
      test_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=true"
      test_targets:
        - //...
    run_osx_test_module_with_zenoh_c:
      name: Run osx test module
      platform: ${{ osx_platform }}
      bazel: ${{ bazel }}
      build_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=false"
      build_targets:
        - //...
      test_flags:
        - "--@zenoh-cpp//:use_zenoh_pico=false"
      test_targets:
        - //...
