matrix:
  platform:
  - debian10
  - ubuntu2004
  bazel:
  - "7.x"
  - "8.x"
tasks:
  run_tests:
    name: Run LLVM unit tests
    platform: ${{ platform }}
    bazel: ${{ bazel }}
    test_flags:
    - '--cxxopt=-std=c++17'
    - '--host_cxxopt=-std=c++17'
    - '--incompatible_disallow_empty_glob=true'
    - '--incompatible_autoload_externally='
    test_targets:
    - '@llvm-project//llvm/unittests:all'
    - '@llvm-project//clang/unittests:all'
  run_tests_macos:
    name: Run LLVM unit tests
    platform: macos
    bazel: ${{ bazel }}
    test_flags:
    - '--cxxopt=-std=c++17'
    - '--host_cxxopt=-std=c++17'
    - '--test_tmpdir=ci' # Avoid CI permissions error on macOS
    - '--incompatible_disallow_empty_glob=true'
    - '--incompatible_autoload_externally='
    test_targets:
    - '@llvm-project//llvm/unittests:all'
    - '@llvm-project//clang/unittests:all'
  run_tests_macos_arm64:
    name: Run LLVM unit tests
    platform: macos_arm64
    bazel: ${{ bazel }}
    test_flags:
    - '--cxxopt=-std=c++17'
    - '--host_cxxopt=-std=c++17'
    - '--test_tmpdir=ci' # Avoid CI permissions error on macOS
    - '--incompatible_disallow_empty_glob=true'
    - '--incompatible_autoload_externally='
    test_targets:
    - '@llvm-project//llvm/unittests:all'
    - '@llvm-project//clang/unittests:all'
  run_tests_windows:
    name: Run LLVM unit tests
    platform: windows
    bazel: ${{ bazel }}
    test_flags:
    - '--cxxopt=/std:c++17'
    - '--host_cxxopt=/std:c++17'
    - '--incompatible_disallow_empty_glob=true'
    - '--incompatible_autoload_externally='
    test_targets:
    - '@llvm-project//llvm/unittests:ir_tests'
