matrix:
  platform:
    - debian10
    - debian11
    - macos
    - macos_arm64
    - ubuntu2004
    - ubuntu2004_arm64
    - ubuntu2204
    - ubuntu2404
  bazel: [7.x, 8.x, rolling]
tasks:
  verify_targets:
    name: Verify build targets
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
      - '--process_headers_in_dependencies'
    build_targets:
      - '@range-v3//...'

  verify_targets_on_windows:
    name: Verify build targets
    platform: windows
    bazel: ${{ bazel }}
    build_flags:
      - '--process_headers_in_dependencies'
      - '--cxxopt=/std:c++17'
      - '--cxxopt=/permissive-'
    build_targets:
      - '@range-v3//...'

bcr_test_module:
  module_path: test
  matrix:
    platform:
      - debian10
      - debian11
      - macos
      - macos_arm64
      - ubuntu2004
      - ubuntu2004_arm64
      - ubuntu2204
      - ubuntu2404
    bazel: [7.x, 8.x, rolling]
  tasks:
    run_test_module:
      name: Run test module
      platform: ${{ platform }}
      bazel: ${{ bazel }}
      build_flags:
        - '--process_headers_in_dependencies'
      build_targets:
        - //...
      test_targets:
        - //...

    run_test_module_on_windows:
      name: Run test module
      platform: windows
      bazel: ${{ bazel }}
      build_flags:
        - '--process_headers_in_dependencies'
        - '--cxxopt=/std:c++17'
        - '--cxxopt=/permissive-'
      build_targets:
        - //...
      test_flags:
        - '--cxxopt=/std:c++17'
        - '--cxxopt=/permissive-'
      test_targets:
        - //...
