| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,43 @@ | ||
| sudo: required | ||
| language: python | ||
| sudo: false | ||
|
|
||
| language: python | ||
| python: | ||
| - 2.7 | ||
| - 3.3 | ||
| - 3.4 | ||
| - 3.5 | ||
| - 3.6 | ||
|
|
||
| before_install: | ||
| - sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" | ||
| - sudo apt-get install software-properties-common | ||
| - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | ||
| - echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.2.4.4 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list | ||
| - echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list | ||
| - sudo apt-get update | ||
| - sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono nunit-console | ||
| env: | ||
| global: | ||
| - LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so | ||
| - SEGFAULT_SIGNALS=all | ||
| - PYTHONUNBUFFERED=True | ||
|
|
||
| addons: | ||
| apt: | ||
| sources: | ||
| - mono | ||
| - mono-libtiff-compat | ||
| packages: | ||
| - mono-devel | ||
| - ca-certificates-mono | ||
|
|
||
| install: | ||
| - pip install six | ||
| - pip install pycparser | ||
| - python setup.py build_ext --inplace | ||
| - pip install pycparser coverage codecov six | ||
| - coverage run setup.py build_ext --inplace | ||
|
|
||
| script: | ||
| - export PYTHONPATH=`pwd`:$PYTHONPATH | ||
| - python src/tests/runtests.py | ||
| # - nunit-console src/embed_tests/bin/x64/ReleaseMono/Python.EmbeddingTest.dll | ||
|
|
||
| after_success: | ||
| # Uncomment if need to geninterop, ie. py37 final | ||
| # - python tools/geninterop/geninterop.py | ||
|
|
||
| # Waiting on mono-cov support or SharpCover | ||
| - codecov | ||
|
|
||
| notifications: | ||
| email: false | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -38,6 +38,13 @@ init: | |
| - if %PLATFORM%==x86 (set NUNIT=%NUNIT%-x86) | ||
| - if %PLATFORM%==x64 (set PYTHON=%PYTHON%-x64) | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWhy don't you use %CONDA_PY%? Why change the casing?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality%CONDA_PY% was removed originally, I added it back later, but decided to keep it on PYTHON_VERSION in case it was removed later.
Sorry, something went wrong.
All reactions
|
||
|
|
||
| # Shortcut path to executables. Mostly because of OpenCover | ||
| - set PYTHON_EXE=%PYTHON%\python.exe | ||
| - set NUNIT_EXE=.\packages\NUnit.Runners.2.6.2\tools\%NUNIT%.exe | ||
| - set OPENCOVER_EXE=.\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityYou are hard-coding versions here, this just leads to unnecessary pain (e.g. I'd like to update NUnit in the future).
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIts a very annoying shortcoming from OpenCover.
Sorry, something went wrong.
All reactions
|
||
| - set RUNTIME_DIR=.\src\runtime\bin\%PLATFORM%\ReleaseWin\ | ||
| - set CS_TESTS=.\src\embed_tests\bin\%PLATFORM%\ReleaseWin\Python.EmbeddingTest.dll | ||
|
|
||
| # Prepend newly installed Python to the PATH of this build | ||
| - set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% | ||
|
|
||
| Expand All | @@ -47,26 +54,33 @@ init: | |
| - python -c "import ctypes; print(ctypes.sizeof(ctypes.c_wchar))" | ||
|
|
||
| install: | ||
| # install conda and deps | ||
| - ps: .\ci\install_miniconda.ps1 | ||
| # install for wheels & coverage | ||
| - pip install --upgrade pip wheel coverage codecov six | ||
|
|
||
| # install for wheels | ||
| - pip install --upgrade pip wheel six | ||
| # Install OpenCover. Can't put on packages.config; not Linux/Mono compatible | ||
| - .\tools\nuget\nuget.exe install OpenCover -OutputDirectory packages | ||
|
|
||
| build_script: | ||
| # build clean sdist & wheel | ||
| - python setup.py sdist bdist_wheel | ||
|
|
||
| # build and dist conda package | ||
| - '%CMD_IN_ENV% %CONDA_BLD%\Scripts\conda build conda.recipe' | ||
| - ps: $CONDA_PKG=(&"$env:CONDA_BLD\Scripts\conda" build conda.recipe --output -q) | ||
| - ps: Copy-Item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\dist\" | ||
| # build clean sdist & wheel with coverage of setup.py, install local wheel | ||
| - coverage run setup.py sdist bdist_wheel | ||
|
|
||
| test_script: | ||
| - pip install --no-index --find-links=.\dist\ pythonnet | ||
| - ps: Copy-Item (Resolve-Path .\build\*\Python.Test.dll) C:\testdir | ||
| - python src\tests\runtests.py | ||
| # - "%NUNIT% src/embed_tests/bin/%PLATFORM%/ReleaseWin/Python.EmbeddingTest.dll" | ||
|
|
||
| # Run python tests with C# coverage | ||
| - '%OPENCOVER_EXE% -register:user -searchdirs:%RUNTIME_DIR% -output:py.coverage -target:%PYTHON_EXE% -targetargs:src\tests\runtests.py -returntargetcode' | ||
|
|
||
| # Run Embedded tests with C# coverage | ||
| # Embedded tests disabled due to open issues | ||
| # - '%OPENCOVER_EXE% -register:user -searchdirs:%RUNTIME_DIR% -output:cs.coverage -target:%NUNIT_EXE% -targetargs:%CS_TESTS% -returntargetcode' | ||
|
|
||
| # Build conda-recipe on Pull Requests | ||
| - ps: .\ci\appveyor_build_recipe.ps1 | ||
|
|
||
| on_finish: | ||
| # Upload coverage | ||
| - codecov | ||
|
|
||
| artifacts: | ||
| - path: dist\* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { | ||
| Invoke-Expression .\ci\install_miniconda.ps1 | ||
| &"$env:CONDA_BLD\Scripts\conda" build conda.recipe --dirty -q | ||
| $CONDA_PKG=(&"$env:CONDA_BLD\Scripts\conda" build conda.recipe --output -q) | ||
| Copy-Item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\dist\" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Conda Recipe | ||
|
|
||
| The files here are needed to build Python.Net with conda | ||
|
|
||
| http://conda.pydata.org/docs/building/recipe.html |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <packages> | ||
| <package id="NUnit" version="3.5.0" targetFramework="net40" /> | ||
| <package id="NUnit.Runners" version="2.6.2" targetFramework="net40" /> | ||
| </packages> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| [tox] | ||
| skipsdist=True | ||
| skip_missing_interpreters=True | ||
| envlist = | ||
| py27 | ||
| py33 | ||
| py34 | ||
| py35 | ||
| py36 | ||
| check | ||
|
|
||
| [testenv] | ||
| recreate=True | ||
| basepython = | ||
| py27: {env:TOXPYTHON:python2.7} | ||
| py33: {env:TOXPYTHON:python3.3} | ||
| py34: {env:TOXPYTHON:python3.4} | ||
| py35: {env:TOXPYTHON:python3.5} | ||
| py36: {env:TOXPYTHON:python3.6} | ||
| check: python3.5 | ||
| setenv = | ||
| PYTHONUNBUFFERED=True | ||
| DISTUTILS_DEBUG= | ||
| passenv = | ||
| * | ||
| commands = | ||
| python --version | ||
| python -c "import struct; print('ARCH: %d' % (struct.calcsize('P') * 8))" | ||
| python -c "import ctypes; print('UCS%d' % ctypes.sizeof(ctypes.c_wchar))" | ||
| python setup.py bdist_wheel | ||
| pip install --no-index --find-links=dist/ pythonnet | ||
| {posargs:python src\tests\runtests.py} | ||
|
|
||
| [testenv:check] | ||
| ignore_errors=True | ||
| deps = | ||
| check-manifest | ||
| flake8 | ||
| commands = | ||
| check-manifest {toxinidir} | ||
| flake8 src setup.py | ||
| python setup.py check --strict --metadata |
| Back | FazBrowse Home | New Git URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualitycan you explain the purpose of this?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIt can help get a bit more info on the tracebacks:
http://stackoverflow.com/a/18947029/5208670
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.