|
| 1 | +# With infos from |
| 2 | +# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/ |
| 3 | +# https://packaging.python.org/en/latest/appveyor/ |
| 4 | +# https://github.com/rmcgibbo/python-appveyor-conda-example |
| 5 | +# https://github.com/pandas-dev/pandas/blob/master/appveyor.yml |
| 6 | + |
| 7 | +# Backslashes in quotes need to be escaped: \ -> "\\" |
| 8 | + |
| 9 | +matrix: |
| 10 | + fast_finish: true # immediately finish build once one of the jobs fails. |
| 11 | + |
| 12 | +environment: |
| 13 | + global: |
| 14 | + # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the |
| 15 | + # /E:ON and /V:ON options are not enabled in the batch script interpreter |
| 16 | + # See: http://stackoverflow.com/a/13751649/163740 |
| 17 | + CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\run_with_env.cmd" |
| 18 | + clone_folder: C:\projects\pandas |
| 19 | + |
| 20 | + matrix: |
| 21 | + |
| 22 | + - CONDA_ROOT: "C:\\Miniconda3_64" |
| 23 | + PYTHON_VERSION: "3.6" |
| 24 | + PYTHON_ARCH: "64" |
| 25 | + CONDA_PY: "36" |
| 26 | + NUMPY: "1.11" |
| 27 | + IPADDRESS: "" |
| 28 | + |
| 29 | + - CONDA_ROOT: "C:\\Miniconda3_64" |
| 30 | + PYTHON_VERSION: "2.7" |
| 31 | + PYTHON_ARCH: "64" |
| 32 | + CONDA_PY: "27" |
| 33 | + NUMPY: "1.9" |
| 34 | + IPADDRESS: "ipaddress" |
| 35 | + |
| 36 | +# We always use a 64-bit machine, but can build x86 distributions |
| 37 | +# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV). |
| 38 | +platform: |
| 39 | + - x64 |
| 40 | + |
| 41 | +# all our python builds have to happen in tests_script... |
| 42 | +build: false |
| 43 | + |
| 44 | +install: |
| 45 | + # cancel older builds for the same PR |
| 46 | + - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` |
| 47 | + https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` |
| 48 | + Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` |
| 49 | + throw "There are newer queued builds for this pull request, failing early." } |
| 50 | + |
| 51 | + # this installs the appropriate Miniconda (Py2/Py3, 32/64 bit) |
| 52 | + # updates conda & installs: conda-build jinja2 anaconda-client |
| 53 | + - powershell .\ci\install.ps1 |
| 54 | + - SET PATH=%CONDA_ROOT%;%CONDA_ROOT%\Scripts;%PATH% |
| 55 | + - echo "install" |
| 56 | + - cd |
| 57 | + - ls -ltr |
| 58 | + - git tag --sort v:refname |
| 59 | + |
| 60 | + # this can conflict with git |
| 61 | + - cmd: rmdir C:\cygwin /s /q |
| 62 | + |
| 63 | + # install our build environment |
| 64 | + - cmd: conda config --set show_channel_urls true --set always_yes true --set changeps1 false |
| 65 | + - cmd: conda update -q conda |
| 66 | + - cmd: conda config --set ssl_verify false |
| 67 | + |
| 68 | + # add the pandas channel *before* defaults to have defaults take priority |
| 69 | + - cmd: conda config --add channels conda-forge |
| 70 | + - cmd: conda config --add channels pandas |
| 71 | + - cmd: conda config --remove channels defaults |
| 72 | + - cmd: conda config --add channels defaults |
| 73 | + |
| 74 | + # this is now the downloaded conda... |
| 75 | + - cmd: conda info -a |
| 76 | + |
| 77 | + # create our env |
| 78 | + - cmd: conda create -q -n test-environment python=%PYTHON_VERSION% coverage cython flake8 hypothesis numpy pytest pytest-cov python-dateutil pytz six %IPADDRESS% |
| 79 | + - cmd: activate test-environment |
| 80 | + - cmd: conda list -n test-environment |
| 81 | + |
| 82 | + - cmd: conda build -q conda-recipes/pandas --python=%PYTHON_VERSION% --numpy=%NUMPY% |
| 83 | + - cmd: pip install -e . |
| 84 | + - cmd: conda install -q %MINICONDA_DIR%/conda-bld/*/pandas*.tar.bz2 |
| 85 | + |
| 86 | +test_scrip: |
| 87 | + # tests |
| 88 | + - cmd: pytest |
0 commit comments