matrix:
  bazel: ["7.x", "rolling"]

tasks:
  verify_targets:
    name: "Build targets under //lib"
    platform: ubuntu2004
    bazel: ${{ bazel }}
    build_targets:
    - '@apple_support//lib/...'
  run_tests_6.x:
    name: "Run test targets"
    platform: "macos_arm64"
    bazel: 6.x
    build_targets:
    - '@apple_support//lib/...'
    test_targets:
    - '@apple_support//test/...'
    - '--'
    # Needs the new toolchain
    - '-@apple_support//test:linking_disable_objc_apple_link_test'
    - '-@apple_support//test:linking_dead_strip_requested_test'
    - '-@apple_support//test:linking_opt_link_test'
    - '-@apple_support//test:binary_watchos_device_arm64e_test'
    - '-@apple_support//test:binary_watchos_device_arm64_test'
    # Needs visionOS SDK
    - '-@apple_support//test:binary_visionos_arm64_simulator_test'
    - '-@apple_support//test:binary_visionos_device_test'
  run_tests:
    name: "Run test targets"
    platform: "macos_arm64"
    bazel: ${{ bazel }}
    build_targets:
    - '@apple_support//lib/...'
    test_targets:
    - '@apple_support//test/...'
    - '--'
    # Needs visionOS SDK
    - '-@apple_support//test:binary_visionos_arm64_simulator_test'
    - '-@apple_support//test:binary_visionos_device_test'
