# Appveyor, continuous integration for Windows
# https://ci.appveyor.com/project/nedbat/coveragepy

version: '{branch}-{build}'

build: off

shallow_clone: true

environment:

  PYTHON_PRERELEASE: ""
  WITH_COMPILER: "cmd /E:ON /V:ON /C .\\ci\\appveyor-with-compiler.cmd"

  matrix:
    - TOXENV: "py26"
      WINDOWS_SDK_VERSION: "v7.0"
      PYTHON_HOME: "C:\\Python266"
      PYTHON_VERSION: "2.6.6"
      PYTHON_ARCH: "32"

    - TOXENV: "py27"
      WINDOWS_SDK_VERSION: "v7.0"
      PYTHON_HOME: "C:\\Python27"
      PYTHON_VERSION: "2.7"
      PYTHON_ARCH: "32"

    - TOXENV: "py33"
      WINDOWS_SDK_VERSION: "v7.1"
      PYTHON_HOME: "C:\\Python33"
      PYTHON_VERSION: "3.3"
      PYTHON_ARCH: "32"

    - TOXENV: "py34"
      WINDOWS_SDK_VERSION: "v7.1"
      PYTHON_HOME: "C:\\Python34"
      PYTHON_VERSION: "3.4"
      PYTHON_ARCH: "32"

    # Meta coverage
    - TOXENV: "py27"
      WINDOWS_SDK_VERSION: "v7.0"
      PYTHON_HOME: "C:\\Python27"
      PYTHON_VERSION: "2.7"
      PYTHON_ARCH: "32"
      COVERAGE_COVERAGE: "yes"

    - TOXENV: "py34"
      WINDOWS_SDK_VERSION: "v7.1"
      PYTHON_HOME: "C:\\Python34"
      PYTHON_VERSION: "3.4"
      PYTHON_ARCH: "32"
      COVERAGE_COVERAGE: "yes"

init:
  - "ECHO %TOXENV%"

install:
  - "powershell ci\\appveyor-bootstrap.ps1"

test_script:
  - "%PYTHON_HOME%\\Scripts\\tox --version"
  - "%PYTHON_HOME%\\Scripts\\virtualenv --version"
  - "%PYTHON_HOME%\\Scripts\\pip --version"
  - "%WITH_COMPILER% %PYTHON_HOME%\\Scripts\\tox"

after_test:
  - if "%COVERAGE_COVERAGE%" == "yes" 7z a metacov-win-%TOXENV%.zip %APPVEYOR_BUILD_FOLDER%\.metacov*

artifacts:
  - path: "dist\\*"
  - path: "metacov-*.zip"

notifications:
  - provider: Email
    to:
      - ned@nedbatchelder.com
    on_build_status_changed: true
