matrix:
  platform:
  - debian10
  - ubuntu2004
  - macos
  - macos_arm64
  # - windows
  bazel:
  - 7.x
  - 6.x
tasks:
  build_and_test:
    name: Build library and run test targets
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    build_flags:
    - '--cxxopt=-std=c++17'
    - '--host_cxxopt=-std=c++17'
    build_targets:
    - '@ceres-solver//:ceres'
    test_flags:
    - '--cxxopt=-std=c++17'
    - '--host_cxxopt=-std=c++17'
    test_targets:
      # This is not an exhaustive list of test targets but 
      # just a select few for sanity checking the library. 
      - "@ceres-solver//:dense_cholesky_test"
      - "@ceres-solver//:dense_linear_solver_test"
      - "@ceres-solver//:solver_test"
      - "@ceres-solver//:sparse_cholesky_test"
      - "@ceres-solver//:tiny_solver_test"
