matrix:
  platform:
  - debian10
  - ubuntu2004
  - macos
  - macos_arm64
  # disable Windows for now, it fails with
  # "this rule is missing dependency declarations for the following files ..."
  #- windows
tasks:
  verify_targets:
    name: Verify build targets
    platform: ${{ platform }}
    environment:
      BAZEL_USE_CPP_ONLY_TOOLCHAIN: '1'
    shell_commands:
    - |
      if apt --version >/dev/null 2>/dev/null; then
        sudo apt update
        sudo apt install --no-install-recommends -yy libtinfo5 libgmp-dev
      fi
    batch_commands:
    # enforce certificate update
    - 'powershell -Command "Invoke-WebRequest -Uri https://hackage.haskell.org/root.json -OutFile out.json"'
    - set BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
    build_flags:
      - '--incompatible_enable_cc_toolchain_resolution'
    build_targets:
    - '@rules_haskell//haskell/...'
    - '@rules_haskell//tools/...'
