build_and_test_flags: &build_and_test_flags
    - --@osqp//:algebra_backend=builtin
    - --@osqp//:use_float=false

matrix: &matrix
  platform:
    - debian10
    - debian11
    - ubuntu2004
    - ubuntu2204
    - ubuntu2404
    - macos
    - macos_arm64
    - 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:
      - "@osqp//:osqp"

bcr_test_module:
  module_path: tests
  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:
        - //:lin_alg_tester
        - //:osqp_tester
      test_targets:
        - //:lin_alg_tester
        - //:osqp_tester