matrix:
  linux_platform: ["debian10", "ubuntu2004"]
  osx_platform: ["macos", "macos_arm64"]
  bazel: [7.x, 8.x] 

tasks:
  verify_windows_targets:
    name: Verify windows build and test targets
    platform: windows
    bazel: ${{ bazel }}
    build_targets:
    # On Windows, build only the external library and not the example,
    # because it uses the GLFW backend which doesn't support Windows as
    # of glfw@3.3.9:
    - '@implot3d//:implot3d'
  verify_linux_targets:
    name: Verify linux build and test targets
    platform: ${{ linux_platform }}
    shell_commands:
    # Because the example binary uses the GLFW+OpenGL3 backends for ImGui,
    # the X11 and OpenGL libraries have to be preinstalled:
    - sudo apt-get update
    - sudo apt-get install xorg-dev libgl1-mesa-dev -y
    bazel: ${{ bazel }}
    build_targets:
    - '@implot3d//...'
  verify_osx_targets:
    name: Verify osx build and test targets
    platform: ${{ osx_platform }}
    bazel: ${{ bazel }}
    build_targets:
    - '@implot3d//...'
    build_flags:
    - "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"