skip_tags: true
clone_depth: 50

os: Visual Studio 2015

environment:
  # Undefining will run test from installation
  PYTEST_DIRECTIVES: --skip-slow
  PYTHONHASHSEED: 0 # Ensure tests are correctly gathered by xdist
  MKL_NUM_THREADS: 1
  NUMEXPR_NUM_THREADS: 1
  OMP_NUM_THREADS: 1
  OPENBLAS_NUM_THREADS: 1
  SETUPTOOLS_USE_DISTUTILS: "stdlib"
  matrix:
    # Pip builds
    - PYTHON: C:\Python38
      PYTEST_DIRECTIVES:
    - PY_MAJOR_VER: 3
      PYTHON_ARCH: "x86"
    - PY_MAJOR_VER: 3
      PYTHON_ARCH: "x86_64"
      TEST_INSTALL: "true"


platform:
    - x64

build_script:
  # Search for [appveyor skip] or [skip appveyor] and exit if found in full commit message
  - ps: $commit=$env:APPVEYOR_REPO_COMMIT_MESSAGE + $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED
  - ps: $skip_appveyor=$commit.Contains("[skip appveyor]") -Or $commit.Contains("[appveyor skip]")
  - ps: If ($skip_appveyor) { echo "[skip appveyor]"; Exit-AppVeyorBuild }
  # Show information about CPU running job to understand BLAS issues
  - wmic cpu get caption, name, numberofcores
  - If Defined PY_MAJOR_VER ( call tools\ci\appveyor_conda.bat ) else ( call tools\ci\appveyor_pip.bat )
  # Pin to 1.29 for now due to test discovery issues
  - python -m pip install --upgrade pip "setuptools<50.0"
  - pip install pytest "pytest-xdist==1.29" pytest-randomly
  - if Defined PYTEST_DIRECTIVES ( pip install -e . --no-build-isolation ) else ( pip install . )

test_script:
  - call tools\ci\run_test.bat
