| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,65 +1,72 @@ | |||
| 1 | 1 | version: '{branch}-{build}' | |
| 2 | + build: off | ||
| 2 | 3 | ||
| 3 | 4 | platform: | |
| 4 | 5 | - x86 | |
| 5 | 6 | - x64 | |
| 6 | 7 | ||
| 7 | 8 | environment: | |
| 8 | 9 | global: | |
| 9 | - PYTHONPATH: "C:\\testdir" | ||
| 10 | - PYTHONWARNINGS: "ignore:::wheel.pep425tags:" | ||
| 11 | - CONDA_BLD_VERSION: "3.5" | ||
| 12 | - CONDA_BLD: "C:\\conda" | ||
| 13 | - NUNIT: "nunit-console" | ||
| 10 | + PYTHONUNBUFFERED: True | ||
| 11 | + PYTHONWARNINGS: 'ignore:::wheel.pep425tags:' | ||
| 12 | + PYTHONPATH: C:\testdir | ||
| 13 | + NUNIT: nunit-console | ||
| 14 | + CONDA_BLD: C:\conda | ||
| 15 | + CONDA_BLD_VERSION: 3.5 | ||
| 14 | 16 | ||
| 15 | 17 | # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the | |
| 16 | 18 | # /E:ON and /V:ON options are not enabled in the batch script interpreter | |
| 17 | 19 | # See: http://stackoverflow.com/a/13751649/163740 | |
| 18 | - CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\run_with_env.cmd" | ||
| 20 | + CMD_IN_ENV: 'cmd /E:ON /V:ON /C .\ci\run_with_env.cmd' | ||
| 19 | 21 | ||
| 20 | 22 | matrix: | |
| 21 | - - PYTHON_VERSION: "2.7" | ||
| 22 | - - PYTHON_VERSION: "3.3" | ||
| 23 | - - PYTHON_VERSION: "3.4" | ||
| 24 | - - PYTHON_VERSION: "3.5" | ||
| 25 | - - PYTHON_VERSION: "3.6" | ||
| 23 | + - PYTHON_VERSION: 2.7 | ||
| 24 | + - PYTHON_VERSION: 3.3 | ||
| 25 | + - PYTHON_VERSION: 3.4 | ||
| 26 | + - PYTHON_VERSION: 3.5 | ||
| 27 | + - PYTHON_VERSION: 3.6 | ||
| 26 | 28 | ||
| 27 | 29 | init: | |
| 28 | 30 | # Prepare environment | |
| 29 | 31 | - mkdir C:\testdir | |
| 30 | 32 | ||
| 31 | 33 | # Set environment variables depending based on build cfg | |
| 32 | - - SET CONDA_PY=%PYTHON_VERSION:.=% | ||
| 33 | - - SET CONDA_BLD_ARCH=%PLATFORM:x=% | ||
| 34 | - - SET PYTHON=C:\PYTHON%CONDA_PY% | ||
| 35 | - - IF %PLATFORM%==x86 (SET CONDA_BLD_ARCH=32) | ||
| 36 | - - IF %PLATFORM%==x86 (SET NUNIT=%NUNIT%-x86) | ||
| 37 | - - IF %PLATFORM%==x64 (SET PYTHON=%PYTHON%-x64) | ||
| 34 | + - set CONDA_PY=%PYTHON_VERSION:.=% | ||
| 35 | + - set CONDA_BLD_ARCH=%PLATFORM:x=% | ||
| 36 | + - set PYTHON=C:\PYTHON%PYTHON_VERSION:.=% | ||
| 37 | + - if %PLATFORM%==x86 (set CONDA_BLD_ARCH=32) | ||
| 38 | + - if %PLATFORM%==x86 (set NUNIT=%NUNIT%-x86) | ||
| 39 | + - if %PLATFORM%==x64 (set PYTHON=%PYTHON%-x64) | ||
| 40 | + | ||
| 41 | + # Prepend newly installed Python to the PATH of this build | ||
| 42 | + - set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% | ||
| 43 | + | ||
| 44 | + # Check that we have the expected version, architecture for Python | ||
| 45 | + - python --version | ||
| 46 | + - python -c "import struct; print(struct.calcsize('P') * 8)" | ||
| 47 | + - python -c "import ctypes; print(ctypes.sizeof(ctypes.c_wchar))" | ||
| 38 | 48 | ||
| 39 | 49 | install: | |
| 40 | 50 | # install conda and deps | |
| 41 | 51 | - ps: .\ci\install_miniconda.ps1 | |
| 42 | 52 | ||
| 43 | 53 | # install for wheels | |
| 44 | - - "%PYTHON%\\python.exe -m pip install --upgrade pip" | ||
| 45 | - - "%PYTHON%\\python.exe -m pip install wheel" | ||
| 46 | - - "%PYTHON%\\python.exe -m pip install six" | ||
| 54 | + - pip install --upgrade pip wheel six | ||
| 47 | 55 | ||
| 48 | 56 | build_script: | |
| 49 | 57 | # build clean sdist & wheel | |
| 50 | - - "%PYTHON%\\python.exe setup.py sdist bdist_wheel" | ||
| 58 | + - python setup.py sdist bdist_wheel | ||
| 51 | 59 | ||
| 52 | 60 | # build and dist conda package | |
| 53 | - - cmd: "%CMD_IN_ENV% %CONDA_BLD%\\Scripts\\conda build conda.recipe" | ||
| 54 | - - ps: $CONDA_PKG=(& "$env:CONDA_BLD\\Scripts\\conda" build conda.recipe --output -q) | ||
| 55 | - - ps: copy-item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\\dist\\" | ||
| 61 | + - '%CMD_IN_ENV% %CONDA_BLD%\Scripts\conda build conda.recipe' | ||
| 62 | + - ps: $CONDA_PKG=(&"$env:CONDA_BLD\Scripts\conda" build conda.recipe --output -q) | ||
| 63 | + - ps: Copy-Item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\dist\" | ||
| 56 | 64 | ||
| 57 | 65 | test_script: | |
| 58 | - - ps: '& "$env:PYTHON\\Scripts\\pip.exe" install --no-cache-dir --force-reinstall --ignore-installed ("dist\\" + (gci dist\*.whl)[0].Name)' | ||
| 59 | - - ps: copy-item (gci -path build -re -include Python.Test.dll)[0].FullName C:\testdir | ||
| 60 | - - "%PYTHON%\\python.exe src\\tests\\runtests.py" | ||
| 66 | + - pip install --no-index --find-links=.\dist\ pythonnet | ||
| 67 | + - ps: Copy-Item (Resolve-Path .\build\*\Python.Test.dll) C:\testdir | ||
| 68 | + - python src\tests\runtests.py | ||
| 61 | 69 | # - "%NUNIT% src/embed_tests/bin/%PLATFORM%/ReleaseWin/Python.EmbeddingTest.dll" | |
| 62 | 70 | ||
| 63 | 71 | artifacts: | |
| 64 | - # bdist_wheel puts your built wheel in the dist directory | ||
| 65 | 72 | - path: dist\* | |
| Back | FazBrowse Home | New Git URL |
0 commit comments