buildvariants:
  # Alternative hosts tests
  - name: openssl-1.0.2-rhel7-v5.0-python3.9
    tasks:
      - name: .test-no-toolchain
    display_name: OpenSSL 1.0.2 RHEL7 v5.0 Python3.9
    run_on:
      - rhel79-small
    batchtime: 10080
    expansions:
      VERSION: "5.0"
      PYTHON_VERSION: "3.9"
      PYTHON_BINARY: /opt/python/3.9/bin/python3
  - name: other-hosts-rhel9-fips-latest
    tasks:
      - name: .test-no-toolchain
    display_name: Other hosts RHEL9-FIPS latest
    run_on:
      - rhel92-fips
    batchtime: 10080
    expansions:
      VERSION: latest
      NO_EXT: "1"
      REQUIRE_FIPS: "1"
    tags: []
  - name: other-hosts-rhel8-zseries-latest
    tasks:
      - name: .test-no-toolchain
    display_name: Other hosts RHEL8-zseries latest
    run_on:
      - rhel8-zseries-small
    batchtime: 10080
    expansions:
      VERSION: latest
      NO_EXT: "1"
    tags: []
  - name: other-hosts-rhel8-power8-latest
    tasks:
      - name: .test-no-toolchain
    display_name: Other hosts RHEL8-POWER8 latest
    run_on:
      - rhel8-power-small
    batchtime: 10080
    expansions:
      VERSION: latest
      NO_EXT: "1"
    tags: []
  - name: other-hosts-rhel8-arm64-latest
    tasks:
      - name: .test-no-toolchain
    display_name: Other hosts RHEL8-arm64 latest
    run_on:
      - rhel82-arm64-small
    batchtime: 10080
    expansions:
      VERSION: latest
      NO_EXT: "1"
    tags: []
  - name: other-hosts-amazon2023-latest
    tasks:
      - name: .test-no-toolchain
    display_name: Other hosts Amazon2023 latest
    run_on:
      - amazon2023-arm64-latest-large-m8g
    batchtime: 10080
    expansions:
      VERSION: latest
      NO_EXT: "1"
    tags: [pr]

  # Atlas connect tests
  - name: atlas-connect-rhel8
    tasks:
      - name: .test-no-orchestration
    display_name: Atlas connect RHEL8
    run_on:
      - rhel87-small
    expansions:
      TEST_NAME: atlas_connect
    tags: [pr]

  # Atlas data lake tests
  - name: atlas-data-lake-ubuntu-22
    tasks:
      - name: .test-no-orchestration
    display_name: Atlas Data Lake Ubuntu-22
    run_on:
      - ubuntu2204-small
    expansions:
      TEST_NAME: data_lake
    tags: [pr]

  # Aws auth tests
  - name: auth-aws-ubuntu-20
    tasks:
      - name: .auth-aws
    display_name: Auth AWS Ubuntu-20
    run_on:
      - ubuntu2004-small
    tags: []
  - name: auth-aws-win64
    tasks:
      - name: .auth-aws !.auth-aws-ecs
    display_name: Auth AWS Win64
    run_on:
      - windows-64-vsMulti-small
    tags: []
  - name: auth-aws-macos
    tasks:
      - name: .auth-aws !.auth-aws-web-identity !.auth-aws-ecs !.auth-aws-ec2
    display_name: Auth AWS macOS
    run_on:
      - macos-14
    tags: [pr]

  # Aws lambda tests
  - name: faas-lambda
    tasks:
      - name: .aws_lambda
    display_name: FaaS Lambda
    run_on:
      - rhel87-small

  # Backport pr tests
  - name: backport-pr
    tasks:
      - name: backport-pr
    display_name: Backport PR
    run_on:
      - rhel87-small

  # Compression tests
  - name: compression-snappy-rhel8
    tasks:
      - name: .test-standard
    display_name: Compression snappy RHEL8
    run_on:
      - rhel87-small
    expansions:
      COMPRESSOR: snappy
  - name: compression-zlib-rhel8
    tasks:
      - name: .test-standard
    display_name: Compression zlib RHEL8
    run_on:
      - rhel87-small
    expansions:
      COMPRESSOR: zlib
  - name: compression-zstd-rhel8
    tasks:
      - name: .test-standard !.server-4.2
    display_name: Compression zstd RHEL8
    run_on:
      - rhel87-small
    expansions:
      COMPRESSOR: zstd

  # Coverage report tests
  - name: coverage-report
    tasks:
      - name: coverage-report
    display_name: Coverage Report
    run_on:
      - rhel87-small

  # Disable test commands tests
  - name: disable-test-commands-rhel8-python3.9
    tasks:
      - name: .test-standard .server-latest
    display_name: Disable test commands RHEL8 Python3.9
    run_on:
      - rhel87-small
    expansions:
      AUTH: auth
      SSL: ssl
      DISABLE_TEST_COMMANDS: "1"
      PYTHON_BINARY: /opt/python/3.9/bin/python3

  # Doctests tests
  - name: doctests-rhel8
    tasks:
      - name: .test-non-standard .standalone-noauth-nossl
    display_name: Doctests RHEL8
    run_on:
      - rhel87-small
    expansions:
      TEST_NAME: doctest

  # Encryption tests
  - name: encryption-rhel8
    tasks:
      - name: .test-non-standard
    display_name: Encryption RHEL8
    run_on:
      - rhel87-small
    batchtime: 10080
    expansions:
      TEST_NAME: encryption
    tags: [encryption_tag]
  - name: encryption-macos
    tasks:
      - name: .test-non-standard !.pypy
    display_name: Encryption macOS
    run_on:
      - macos-14
    batchtime: 10080
    expansions:
      TEST_NAME: encryption
    tags: [encryption_tag]
  - name: encryption-win64
    tasks:
      - name: .test-non-standard !.pypy
    display_name: Encryption Win64
    run_on:
      - windows-64-vsMulti-small
    batchtime: 10080
    expansions:
      TEST_NAME: encryption
    tags: [encryption_tag]
  - name: encryption-crypt_shared-rhel8
    tasks:
      - name: .test-non-standard
    display_name: Encryption crypt_shared RHEL8
    run_on:
      - rhel87-small
    batchtime: 10080
    expansions:
      TEST_NAME: encryption
      TEST_CRYPT_SHARED: "true"
    tags: [encryption_tag]
  - name: encryption-crypt_shared-macos
    tasks:
      - name: .test-non-standard !.pypy
    display_name: Encryption crypt_shared macOS
    run_on:
      - macos-14
    batchtime: 10080
    expansions:
      TEST_NAME: encryption
      TEST_CRYPT_SHARED: "true"
    tags: [encryption_tag]
  - name: encryption-crypt_shared-win64
    tasks:
      - name: .test-non-standard !.pypy
    display_name: Encryption crypt_shared Win64
    run_on:
      - windows-64-vsMulti-small
    batchtime: 10080
    expansions:
      TEST_NAME: encryption
      TEST_CRYPT_SHARED: "true"
    tags: [encryption_tag]
  - name: encryption-pyopenssl-rhel8
    tasks:
      - name: .test-non-standard
    display_name: Encryption PyOpenSSL RHEL8
    run_on:
      - rhel87-small
    batchtime: 10080
    expansions:
      TEST_NAME: encryption
      SUB_TEST_NAME: pyopenssl
    tags: [encryption_tag]

  # Enterprise auth tests
  - name: auth-enterprise-rhel8
    tasks:
      - name: .test-non-standard .auth
    display_name: Auth Enterprise RHEL8
    run_on:
      - rhel87-small
    expansions:
      TEST_NAME: enterprise_auth
      AUTH: auth
  - name: auth-enterprise-macos
    tasks:
      - name: .test-non-standard !.pypy .auth
    display_name: Auth Enterprise macOS
    run_on:
      - macos-14
    expansions:
      TEST_NAME: enterprise_auth
      AUTH: auth
  - name: auth-enterprise-win64
    tasks:
      - name: .test-non-standard !.pypy .auth
    display_name: Auth Enterprise Win64
    run_on:
      - windows-64-vsMulti-small
    expansions:
      TEST_NAME: enterprise_auth
      AUTH: auth

  # Free threaded tests
  - name: free-threaded-rhel8-python3.14t
    tasks:
      - name: .free-threading
    display_name: Free-threaded RHEL8 Python3.14t
    run_on:
      - rhel87-small
    expansions:
      PYTHON_BINARY: /opt/python/3.14t/bin/python3
    tags: [pr]
  - name: free-threaded-macos-python3.14t
    tasks:
      - name: .free-threading
    display_name: Free-threaded macOS Python3.14t
    run_on:
      - macos-14
    expansions:
      PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.14/bin/python3t
    tags: []
  - name: free-threaded-macos-arm64-python3.14t
    tasks:
      - name: .free-threading
    display_name: Free-threaded macOS Arm64 Python3.14t
    run_on:
      - macos-14-arm64
    expansions:
      PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.14/bin/python3t
    tags: []
  - name: free-threaded-win64-python3.14t
    tasks:
      - name: .free-threading
    display_name: Free-threaded Win64 Python3.14t
    run_on:
      - windows-64-vsMulti-small
    expansions:
      PYTHON_BINARY: C:/python/Python314/python3.14t.exe
    tags: []

  # Green framework tests
  - name: green-eventlet-rhel8
    tasks:
      - name: .test-standard .standalone-noauth-nossl .python-3.9 .sync
    display_name: Green Eventlet RHEL8
    run_on:
      - rhel87-small
    expansions:
      GREEN_FRAMEWORK: eventlet
  - name: green-gevent-rhel8
    tasks:
      - name: .test-standard .standalone-noauth-nossl .sync
    display_name: Green Gevent RHEL8
    run_on:
      - rhel87-small
    expansions:
      GREEN_FRAMEWORK: gevent

  # Import time tests
  - name: import-time
    tasks:
      - name: check-import-time
    display_name: Import Time
    run_on:
      - rhel87-small

  # Kms tests
  - name: kms
    tasks:
      - name: test-gcpkms
        batchtime: 10080
      - name: test-gcpkms-fail
      - name: test-azurekms
        batchtime: 10080
      - name: test-azurekms-fail
    display_name: KMS
    run_on:
      - debian11-small

  # Load balancer tests
  - name: load-balancer
    tasks:
      - name: .test-non-standard .server-6.0 .sharded_cluster-auth-ssl
      - name: .test-non-standard .server-7.0 .sharded_cluster-auth-ssl
      - name: .test-non-standard .server-8.0 .sharded_cluster-auth-ssl
      - name: .test-non-standard .server-rapid .sharded_cluster-auth-ssl
      - name: .test-non-standard .server-latest .sharded_cluster-auth-ssl
    display_name: Load Balancer
    run_on:
      - rhel87-small
    batchtime: 10080
    expansions:
      TEST_NAME: load_balancer

  # Mockupdb tests
  - name: mockupdb-rhel8
    tasks:
      - name: .test-no-orchestration
    display_name: MockupDB RHEL8
    run_on:
      - rhel87-small
    expansions:
      TEST_NAME: mockupdb
    tags: [pr]

  # Mod wsgi tests
  - name: mod_wsgi-ubuntu-22
    tasks:
      - name: .mod_wsgi
    display_name: Mod_WSGI Ubuntu-22
    run_on:
      - ubuntu2204-small
    expansions:
      MOD_WSGI_VERSION: "4"

  # No c ext tests
  - name: no-c-ext-rhel8
    tasks:
      - name: .test-standard
    display_name: No C Ext RHEL8
    run_on:
      - rhel87-small

  # No server tests
  - name: no-server-rhel8
    tasks:
      - name: .test-no-orchestration
    display_name: No server RHEL8
    run_on:
      - rhel87-small
    tags: [pr]

  # Ocsp tests
  - name: ocsp-rhel8
    tasks:
      - name: .ocsp
    display_name: OCSP RHEL8
    run_on:
      - rhel87-small
    batchtime: 10080
  - name: ocsp-win64
    tasks:
      - name: .ocsp-rsa !.ocsp-staple .latest
      - name: .ocsp-rsa !.ocsp-staple .4.4
    display_name: OCSP Win64
    run_on:
      - windows-64-vsMulti-small
    batchtime: 10080
  - name: ocsp-macos
    tasks:
      - name: .ocsp-rsa !.ocsp-staple .latest
      - name: .ocsp-rsa !.ocsp-staple .4.4
    display_name: OCSP macOS
    run_on:
      - macos-14
    batchtime: 10080

  # Oidc auth tests
  - name: auth-oidc-ubuntu-22
    tasks:
      - name: .auth_oidc_remote
    display_name: Auth OIDC Ubuntu-22
    run_on:
      - ubuntu2204-small
    batchtime: 10080
  - name: auth-oidc-local-ubuntu-22
    tasks:
      - name: "!.auth_oidc_remote .auth_oidc"
    display_name: Auth OIDC Local Ubuntu-22
    run_on:
      - ubuntu2204-small
    batchtime: 10080
    tags: [pr]
  - name: auth-oidc-macos
    tasks:
      - name: "!.auth_oidc_remote .auth_oidc"
    display_name: Auth OIDC macOS
    run_on:
      - macos-14
    batchtime: 10080
  - name: auth-oidc-win64
    tasks:
      - name: "!.auth_oidc_remote .auth_oidc"
    display_name: Auth OIDC Win64
    run_on:
      - windows-64-vsMulti-small
    batchtime: 10080

  # Perf tests
  - name: performance-benchmarks
    tasks:
      - name: .perf
    display_name: Performance Benchmarks
    run_on:
      - rhel90-dbx-perf-large
    batchtime: 10080

  # Pyopenssl tests
  - name: pyopenssl-rhel8
    tasks:
      - name: .test-standard .sync
      - name: .test-standard .async .replica_set-noauth-ssl
    display_name: PyOpenSSL RHEL8
    run_on:
      - rhel87-small
    batchtime: 10080
    expansions:
      SUB_TEST_NAME: pyopenssl
  - name: pyopenssl-macos
    tasks:
      - name: .test-standard !.pypy .sync
      - name: .test-standard !.pypy .async .replica_set-noauth-ssl
    display_name: PyOpenSSL macOS
    run_on:
      - rhel87-small
    batchtime: 10080
    expansions:
      SUB_TEST_NAME: pyopenssl
  - name: pyopenssl-win64
    tasks:
      - name: .test-standard !.pypy .sync
      - name: .test-standard !.pypy .async .replica_set-noauth-ssl
    display_name: PyOpenSSL Win64
    run_on:
      - rhel87-small
    batchtime: 10080
    expansions:
      SUB_TEST_NAME: pyopenssl

  # Search index tests
  - name: search-index-helpers-rhel8-python3.9
    tasks:
      - name: .search_index
    display_name: Search Index Helpers RHEL8 Python3.9
    run_on:
      - rhel87-small
    expansions:
      PYTHON_BINARY: /opt/python/3.9/bin/python3

  # Server version tests
  - name: mongodb-v4.2
    tasks:
      - name: .server-version
    display_name: "* MongoDB v4.2"
    run_on:
      - rhel87-small
    expansions:
      VERSION: "4.2"
    tags: [coverage_tag]
  - name: mongodb-v4.4
    tasks:
      - name: .server-version
    display_name: "* MongoDB v4.4"
    run_on:
      - rhel87-small
    expansions:
      VERSION: "4.4"
    tags: [coverage_tag]
  - name: mongodb-v5.0
    tasks:
      - name: .server-version
    display_name: "* MongoDB v5.0"
    run_on:
      - rhel87-small
    expansions:
      VERSION: "5.0"
    tags: [coverage_tag]
  - name: mongodb-v6.0
    tasks:
      - name: .server-version
    display_name: "* MongoDB v6.0"
    run_on:
      - rhel87-small
    expansions:
      VERSION: "6.0"
    tags: [coverage_tag]
  - name: mongodb-v7.0
    tasks:
      - name: .server-version
    display_name: "* MongoDB v7.0"
    run_on:
      - rhel87-small
    expansions:
      VERSION: "7.0"
    tags: [coverage_tag]
  - name: mongodb-v8.0
    tasks:
      - name: .server-version
    display_name: "* MongoDB v8.0"
    run_on:
      - rhel87-small
    expansions:
      VERSION: "8.0"
    tags: [coverage_tag]
  - name: mongodb-rapid
    tasks:
      - name: .server-version
    display_name: "* MongoDB rapid"
    run_on:
      - rhel87-small
    expansions:
      VERSION: rapid
    tags: [coverage_tag]
  - name: mongodb-latest
    tasks:
      - name: .server-version
    display_name: "* MongoDB latest"
    run_on:
      - rhel87-small
    expansions:
      VERSION: latest
    tags: [coverage_tag]

  # Stable api tests
  - name: stable-api-require-v1-rhel8-auth
    tasks:
      - name: .test-standard !.replica_set-noauth-ssl .server-5.0
      - name: .test-standard !.replica_set-noauth-ssl .server-6.0
      - name: .test-standard !.replica_set-noauth-ssl .server-7.0
      - name: .test-standard !.replica_set-noauth-ssl .server-8.0
      - name: .test-standard !.replica_set-noauth-ssl .server-rapid
      - name: .test-standard !.replica_set-noauth-ssl .server-latest
    display_name: Stable API require v1 RHEL8 Auth
    run_on:
      - rhel87-small
    expansions:
      AUTH: auth
      REQUIRE_API_VERSION: "1"
      MONGODB_API_VERSION: "1"
    tags: [versionedApi_tag]
  - name: stable-api-accept-v2-rhel8-auth
    tasks:
      - name: .test-standard .server-5.0 .standalone-noauth-nossl
      - name: .test-standard .server-6.0 .standalone-noauth-nossl
      - name: .test-standard .server-7.0 .standalone-noauth-nossl
      - name: .test-standard .server-8.0 .standalone-noauth-nossl
      - name: .test-standard .server-rapid .standalone-noauth-nossl
      - name: .test-standard .server-latest .standalone-noauth-nossl
    display_name: Stable API accept v2 RHEL8 Auth
    run_on:
      - rhel87-small
    expansions:
      AUTH: auth
      ORCHESTRATION_FILE: versioned-api-testing.json
    tags: [versionedApi_tag]

  # Standard nonlinux tests
  - name: test-macos
    tasks:
      - name: .test-standard !.pypy
    display_name: "* Test macOS"
    run_on:
      - macos-14
    tags: [standard-non-linux]
  - name: test-macos-arm64
    tasks:
      - name: .test-standard !.pypy .server-6.0
      - name: .test-standard !.pypy .server-7.0
      - name: .test-standard !.pypy .server-8.0
      - name: .test-standard !.pypy .server-rapid
      - name: .test-standard !.pypy .server-latest
    display_name: "* Test macOS Arm64"
    run_on:
      - macos-14-arm64
    tags: [standard-non-linux]
  - name: test-win64
    tasks:
      - name: .test-standard !.pypy
    display_name: "* Test Win64"
    run_on:
      - windows-64-vsMulti-small
    tags: [standard-non-linux]
  - name: test-win32
    tasks:
      - name: .test-standard !.pypy
    display_name: "* Test Win32"
    run_on:
      - windows-64-vsMulti-small
    expansions:
      IS_WIN32: "1"
    tags: [standard-non-linux]

  # Storage engine tests
  - name: storage-inmemory-rhel8
    tasks:
      - name: .test-standard .standalone-noauth-nossl
    display_name: Storage InMemory RHEL8
    run_on:
      - rhel87-small
    expansions:
      STORAGE_ENGINE: inmemory
