2018-11-07 06:15:48 +03:00
|
|
|
|
version: 2.2.3.{build}
|
2017-09-08 13:17:00 +03:00
|
|
|
|
|
2018-09-12 05:40:11 +03:00
|
|
|
|
image: Visual Studio 2015
|
|
|
|
|
platform: x64
|
|
|
|
|
configuration: # a trick to construct a build matrix with multiple Python versions
|
2017-09-08 13:17:00 +03:00
|
|
|
|
- 3.6
|
2017-06-18 14:44:57 +03:00
|
|
|
|
|
|
|
|
|
environment:
|
|
|
|
|
matrix:
|
2018-09-12 05:40:11 +03:00
|
|
|
|
- COMPILER: MSVC
|
|
|
|
|
- COMPILER: MINGW
|
2017-06-18 14:44:57 +03:00
|
|
|
|
|
|
|
|
|
clone_depth: 50
|
|
|
|
|
|
2017-09-08 13:17:00 +03:00
|
|
|
|
install:
|
2017-09-10 03:27:48 +03:00
|
|
|
|
- git submodule update --init --recursive # get `compute` folder
|
2018-06-09 05:04:57 +03:00
|
|
|
|
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=% # delete sh.exe from PATH (mingw32-make fix)
|
2018-09-12 05:40:11 +03:00
|
|
|
|
- set PATH=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;%PATH%
|
2017-09-08 13:17:00 +03:00
|
|
|
|
- set PYTHON_VERSION=%CONFIGURATION%
|
|
|
|
|
- ps: >-
|
|
|
|
|
switch ($env:PYTHON_VERSION) {
|
|
|
|
|
"2.7" {$env:MINICONDA = """C:\Miniconda-x64"""}
|
2017-12-04 04:08:40 +03:00
|
|
|
|
"3.4" {$env:MINICONDA = """C:\Miniconda34-x64"""}
|
2017-09-08 13:17:00 +03:00
|
|
|
|
"3.5" {$env:MINICONDA = """C:\Miniconda35-x64"""}
|
|
|
|
|
"3.6" {$env:MINICONDA = """C:\Miniconda36-x64"""}
|
2018-10-04 04:26:32 +03:00
|
|
|
|
"3.7" {$env:MINICONDA = """C:\Miniconda37-x64"""}
|
|
|
|
|
default {$env:MINICONDA = """C:\Miniconda37-x64"""}
|
2017-09-08 13:17:00 +03:00
|
|
|
|
}
|
|
|
|
|
- set PATH=%MINICONDA%;%MINICONDA%\Scripts;%PATH%
|
|
|
|
|
- ps: $env:LGB_VER = (Get-Content VERSION.txt).trim()
|
|
|
|
|
- conda config --set always_yes yes --set changeps1 no
|
|
|
|
|
- conda update -q conda
|
2019-01-30 16:34:06 +03:00
|
|
|
|
- conda create -q -n test-env python=%PYTHON_VERSION% matplotlib nose numpy pandas psutil pytest python-graphviz scikit-learn scipy
|
2017-09-08 13:17:00 +03:00
|
|
|
|
- activate test-env
|
2017-06-18 14:44:57 +03:00
|
|
|
|
|
2017-06-18 15:37:31 +03:00
|
|
|
|
build_script:
|
2018-09-12 05:40:11 +03:00
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%\python-package
|
2017-09-08 13:17:00 +03:00
|
|
|
|
- IF "%COMPILER%"=="MINGW" (
|
2018-09-12 05:40:11 +03:00
|
|
|
|
python setup.py install --mingw)
|
2017-09-08 13:17:00 +03:00
|
|
|
|
ELSE (
|
2018-09-12 05:40:11 +03:00
|
|
|
|
python setup.py install)
|
|
|
|
|
|
|
|
|
|
test_script:
|
2018-07-15 19:03:39 +03:00
|
|
|
|
- pytest %APPVEYOR_BUILD_FOLDER%\tests\python_package_test
|
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%\examples\python-guide
|
2018-06-09 05:04:57 +03:00
|
|
|
|
- ps: >-
|
2018-06-29 15:07:08 +03:00
|
|
|
|
@("import matplotlib", "matplotlib.use('Agg')") + (Get-Content "plot_example.py") | Set-Content "plot_example.py" # prevent interactive window mode
|
2018-09-12 05:40:11 +03:00
|
|
|
|
(Get-Content "plot_example.py").replace('graph.render(view=True)', 'graph.render(view=False)') | Set-Content "plot_example.py"
|
2018-06-09 05:04:57 +03:00
|
|
|
|
- ps: >-
|
|
|
|
|
foreach ($file in @(Get-ChildItem *.py)) {
|
|
|
|
|
python $file
|
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
|
|
} # run all examples
|
2018-11-05 10:49:54 +03:00
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%\examples\python-guide\notebooks
|
|
|
|
|
- conda install -y -n test-env ipywidgets notebook
|
|
|
|
|
- jupyter nbconvert --ExecutePreprocessor.timeout=180 --to notebook --execute --inplace *.ipynb # run all notebooks
|