build_and_test_flags: &build_and_test_flags
  - --cxxopt=-std=c++17
  - --process_headers_in_dependencies
  - --@pcl//:pcl_silence_malloc_warning=True

matrix: &matrix
  platform:
    - debian10
    - debian11
    - macos
    - macos_arm64
    - ubuntu2004
    - ubuntu2204
    - windows
  bazel: [7.x, 8.x, rolling]

tasks:
  verify_targets:
    name: Verify build targets
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags: *build_and_test_flags
    test_flags: *build_and_test_flags
    build_targets:
      - '@pcl//...'
      - '-@pcl//test/...'

bcr_test_module:
  module_path: test
  matrix: *matrix
  tasks:
    run_test_module:
      name: Run test module
      platform: ${{ platform }}
      bazel: ${{ bazel }}
      build_flags: *build_and_test_flags
      test_flags: *build_and_test_flags
      build_targets: [//...]
      test_targets: [//...]
