|
| 1 | +# Based on pygit2's appveyor config |
| 2 | +environment: |
| 3 | + matrix: |
| 4 | + - GENERATOR: 'Visual Studio 10' |
| 5 | + PYTHON: 'C:\Python27\python.exe' |
| 6 | + - GENERATOR: 'Visual Studio 10 Win64' |
| 7 | + PYTHON: 'C:\Python27-x64\python.exe' |
| 8 | + - GENERATOR: 'Visual Studio 10' |
| 9 | + PYTHON: 'C:\Python33\python.exe' |
| 10 | + - GENERATOR: 'Visual Studio 10 Win64' |
| 11 | + PYTHON: 'C:\Python33-x64\python.exe' |
| 12 | + - GENERATOR: 'Visual Studio 10' |
| 13 | + PYTHON: 'C:\Python34\python.exe' |
| 14 | + - GENERATOR: 'Visual Studio 10 Win64' |
| 15 | + PYTHON: 'C:\Python34-x64\python.exe' |
| 16 | + - GENERATOR: 'Visual Studio 14' |
| 17 | + PYTHON: 'C:\Python35\python.exe' |
| 18 | + - GENERATOR: 'Visual Studio 14 Win64' |
| 19 | + PYTHON: 'C:\Python35-x64\python.exe' |
| 20 | + - GENERATOR: 'Visual Studio 14' |
| 21 | + PYTHON: 'C:\Python36\python.exe' |
| 22 | + - GENERATOR: 'Visual Studio 14 Win64' |
| 23 | + PYTHON: 'C:\Python36-x64\python.exe' |
| 24 | + |
| 25 | +init: |
| 26 | + - cmd: '%PYTHON% -m pip install -U nose wheel' |
| 27 | + |
| 28 | +build_script: |
| 29 | + - cmd: | |
| 30 | + set LIBGIT2=%APPVEYOR_BUILD_FOLDER%\build\libgit2 |
| 31 | + git clone --depth=1 -b maint/v0.25 https://github.com/libgit2/libgit2.git libgit2 |
| 32 | + mkdir build |
| 33 | + |
| 34 | + cd build |
| 35 | + cmake -DSTDCALL=OFF -DBUILD_CLAR=OFF -DCMAKE_INSTALL_PREFIX="%LIBGIT2%" ../libgit2 -G "%GENERATOR%" |
| 36 | + cmake --build . --config Release --target install |
| 37 | + cd .. |
| 38 | + |
| 39 | + IF "%GENERATOR%"=="Visual Studio 10 Win64" ( call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" ) |
| 40 | + |
| 41 | + "%PYTHON%" setup.py bdist_wheel |
| 42 | +
|
| 43 | +before_test: |
| 44 | + - cmd: git config --global user.name "appveyor-test" |
| 45 | + - cmd: git config --global user.email "appveyor@test.com" |
| 46 | + |
| 47 | +test_script: |
| 48 | + - ps: | |
| 49 | + cp build\Release\git2.dll . |
| 50 | + &$env:PYTHON setup.py nosetests --logging-level=WARN --with-xunit |
| 51 | + if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) } |
| 52 | + # upload results to AppVeyor |
| 53 | + $wc = New-Object 'System.Net.WebClient' |
| 54 | + $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\nosetests.xml)) |
| 55 | +
|
| 56 | +branches: |
| 57 | + only: |
| 58 | + - master |
| 59 | + - develop |
0 commit comments