matrix:
  all_platforms:
    - ubuntu2204
    - ubuntu2404
    - ubuntu2404_arm64
    - debian11
    - macos
    - macos_arm64
    - windows
  non_macos_platforms:
    - ubuntu2204
    - ubuntu2404
    - ubuntu2404_arm64
    - debian11
    - windows
  modern_bazel: [8.x, 9.x, rolling]
tasks:
  verify_targets_modern:
    name: Verify build targets
    platform: ${{ all_platforms }}
    bazel: ${{ modern_bazel }}
    build_targets:
      - '@sdl2'
      - '@sdl2//:sdl2_headers'
      - '@sdl2//:sdl2_headers_consumer_compile_test'
      - '@sdl2//:sdl2_consumer_link_test'
    test_targets:
      - '@sdl2//:sdl2_headers_consumer_compile_test'
      - '@sdl2//:sdl2_consumer_link_test'
  verify_targets_bazel7_non_macos:
    name: Verify build targets
    platform: ${{ non_macos_platforms }}
    bazel: 7.x
    build_targets:
      - '@sdl2'
      - '@sdl2//:sdl2_headers'
      - '@sdl2//:sdl2_headers_consumer_compile_test'
      - '@sdl2//:sdl2_consumer_link_test'
    test_targets:
      - '@sdl2//:sdl2_headers_consumer_compile_test'
      - '@sdl2//:sdl2_consumer_link_test'
bcr_test_module:
  module_path: test
  matrix:
    platform:
      - macos
      - macos_arm64
  tasks:
    verify_targets_bazel7_macos:
      name: Verify build targets
      platform: ${{ platform }}
      bazel: 7.x
      build_targets:
        - '@sdl2'
        - '@sdl2//:sdl2_headers'
        - '@sdl2//:sdl2_headers_consumer_compile_test'
        - '@sdl2//:sdl2_consumer_link_test'
      test_targets:
        - '@sdl2//:sdl2_headers_consumer_compile_test'
        - '@sdl2//:sdl2_consumer_link_test'
