Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
gevent / appveyor.yml
Size: Mime:
clone_depth: 50
environment:
  global:
    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
    # /E:ON and /V:ON options are not enabled in the batch script interpreter
    # See: http://stackoverflow.com/a/13751649/163740
    CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
    # Use a fixed hash seed for reproducability
    PYTHONHASHSEED: 8675309

  matrix:

    # Pre-installed Python versions, which Appveyor may upgrade to
    # a later point release.

    # 64-bit

    - PYTHON: "C:\\Python37-x64"
      PYTHON_VERSION: "3.7.x"
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    - PYTHON: "C:\\Python27-x64"
      PYTHON_VERSION: "2.7.x" # currently 2.7.13
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    - PYTHON: "C:\\Python36-x64"
      PYTHON_VERSION: "3.6.x" # currently 3.6.0
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    - PYTHON: "C:\\Python35-x64"
      PYTHON_VERSION: "3.5.x" # currently 3.5.2
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    - PYTHON: "C:\\Python34-x64"
      PYTHON_VERSION: "3.4.x" # currently 3.4.4
      PYTHON_ARCH: "64"
      PYTHON_EXE: python

    # 32-bit
    - PYTHON: "C:\\pypy2-v6.0.0-win32"
      PYTHON_ID: "pypy"
      PYTHON_EXE: pypy
      PYTHON_VERSION: "2.7.x"
      PYTHON_ARCH: "32"

    # 32-bit, wheel only (no testing)

    - PYTHON: "C:\\Python37"
      PYTHON_VERSION: "3.7.x"
      PYTHON_ARCH: "32"
      PYTHON_EXE: python
      GWHEEL_ONLY: true

    - PYTHON: "C:\\Python36"
      PYTHON_VERSION: "3.6.x" # currently 3.6.3
      PYTHON_ARCH: "32"
      PYTHON_EXE: python
      GWHEEL_ONLY: true

    - PYTHON: "C:\\Python35"
      PYTHON_VERSION: "3.5.x" # currently 3.5.2
      PYTHON_ARCH: "32"
      PYTHON_EXE: python
      GWHEEL_ONLY: true

    - PYTHON: "C:\\Python34"
      PYTHON_VERSION: "3.4.x" # currently 3.4.3
      PYTHON_ARCH: "32"
      PYTHON_EXE: python
      GWHEEL_ONLY: true

    - PYTHON: "C:\\Python27"
      PYTHON_VERSION: "2.7.x" # currently 2.7.13
      PYTHON_ARCH: "32"
      PYTHON_EXE: python
      GWHEEL_ONLY: true

    # Also test a Python version not pre-installed
    # See: https://github.com/ogrisel/python-appveyor-demo/issues/10

    # - PYTHON: "C:\\Python266"
    #   PYTHON_VERSION: "2.6.6"
    #   PYTHON_ARCH: "32"
    #   PYTHON_EXE: python

matrix:
    allow_failures:
      - PYTHON_ID: "pypy"

install:
  # If there is a newer build queued for the same PR, cancel this one.
  # The AppVeyor 'rollout builds' option is supposed to serve the same
  # purpose but it is problematic because it tends to cancel builds pushed
  # directly to master instead of just PR builds (or the converse).
  # credits: JuliaLang developers.
  - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
        https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
        Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
          throw "There are newer queued builds for this pull request, failing early." }
  - ECHO "Filesystem root:"
  - ps: "ls \"C:/\""

  - ECHO "Installed SDKs:"
  - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""

  # Install Python (from the official .msi of http://python.org) and pip when
  # not already installed.
  # PyPy portion based on https://github.com/wbond/asn1crypto/blob/master/appveyor.yml
  - ps:
      $env:PYTMP = "${env:TMP}\py";
      if (!(Test-Path "$env:PYTMP")) {
        New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null;
      }
      if ("${env:PYTHON_ID}" -eq "pypy") {
        if (!(Test-Path "${env:PYTMP}\pypy2-v6.0.0-win32.zip")) {
          (New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-win32.zip', "${env:PYTMP}\pypy2-v6.0.0-win32.zip");
        }
        7z x -y "${env:PYTMP}\pypy2-v6.0.0-win32.zip" -oC:\ | Out-Null;
        & "${env:PYTHON}\pypy.exe" "-mensurepip";

      }
      elseif (-not(Test-Path($env:PYTHON))) {
        & appveyor\install.ps1;
      }

  # Prepend newly installed Python to the PATH of this build (this cannot be
  # done from inside the powershell script as it would require to restart
  # the parent CMD process).
  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PYTHON%\\bin;%PATH%"
  - "SET PYEXE=%PYTHON%\\%PYTHON_EXE%.exe"

  # Check that we have the expected version and architecture for Python
  - "%PYEXE% --version"
  - "%PYEXE% -c \"import struct; print(struct.calcsize('P') * 8)\""

  # Upgrade to the latest version of pip to avoid it displaying warnings
  # about it being out of date.
  - "%CMD_IN_ENV% %PYEXE% -m pip install --disable-pip-version-check --user --upgrade pip"

  # Install the build dependencies of the project. If some dependencies contain
  # compiled extensions and are not provided as pre-built wheel packages,
  # pip will build them from source using the MSVC compiler matching the
  # target Python version and architecture
  - "%CMD_IN_ENV% %PYEXE% -m pip install -U --upgrade-strategy=eager -r ci-requirements.txt"

  - ps: "if(Test-Path(\"${env:PYTHON}\\bin\")) {ls ${env:PYTHON}\\bin;}"
  - ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}"

cache:
  - "%TMP%\\py\\"
  - '%LOCALAPPDATA%\pip\Cache'

build_script:
  # Build the compiled extension
  - "%CMD_IN_ENV% %PYEXE% -m pip wheel . -w dist"
  - ps: "ls dist"
  # Now install the wheel.
  # I couldn't get wildcards to work for pip install, so stuff it
  # into a variable, using python to glob.
  - "%PYEXE% -c \"import glob; print(glob.glob('dist/gevent*whl')[0])\" > whl.txt"
  - set /p PYWHL=<whl.txt
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -m pip install -U --upgrade-strategy=eager %PYWHL%[test,events,dnspython]

test_script:
  # Run the project tests
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent.core; print(gevent.core.loop)"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent; print(gevent.config.settings['resolver'].get_options())"
  - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --config known_failures.py --quiet

after_test:
  # We already built the wheel during build_script, because it's
  # much faster to do that and install from the wheel than to
  # rebuild it here
  #- "%CMD_IN_ENV% %PYEXE% setup.py bdist_wheel bdist_wininst"
  - ps: "ls dist"

artifacts:
  # Archive the generated wheel package in the ci.appveyor.com build report.
  - path: dist\gevent*whl

#on_success:
#  - TODO: upload the content of dist/*.whl to a public wheelhouse
#