-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
116 lines (112 loc) · 4.38 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
environment:
PYTHON: "C:\\Python36-conda"
PSYPLOT_PYTHON: "C:\\psyplot-conda-installation"
matrix:
- PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
- PYTHON_VERSION: "3.6"
PYTHON_ARCH: "32"
os: unstable
install:
- "SET ORIGPATH=%PATH%"
# checkout submodules (but not recursively)
- git submodule update --init
# Install miniconda Python
- "powershell ./ci/install_python.ps1"
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%ORIGPATH%"
# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
# use an innocent matplotlibrc
- copy /y nul matplotlibrc
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda env create -f environment_win.yml
- conda install constructor conda-build
- activate psyplot_conda
# install the submodules
- cd psyplot && python setup.py install && cd ../
- cd psyplot-gui && python setup.py install && cd ../
- cd psy-simple && python setup.py install && cd ../
- cd psy-maps && python setup.py install && cd ../
- cd psy-reg && python setup.py install && cd ../
# prepare the recipes
- python recipe_from_setup.py psyplot recipes
- python recipe_from_setup.py psyplot-gui recipes
- python recipe_from_setup.py psy-simple recipes
- python recipe_from_setup.py psy-maps recipes
- python recipe_from_setup.py psy-reg recipes
# update psy-simple and psy-maps reference figures submodules
- cd psy-simple && git submodule update --init tests/reference_figures/win32/py%PYTHON_VERSION%/mpl2.2 && cd ..
- cd psy-maps && git submodule update --init tests/reference_figures/win32/py%PYTHON_VERSION%/mpl2.2 && cd ..
# print debugging informations
- conda env export -n psyplot_conda
# print versions of all the important requirements
- psyplot -aV
- conda config --add channels chilipp
- conda config --add channels conda-forge
# build the receipts and prepare the constructor files
- IF "%APPVEYOR_REPO_TAG_NAME%"=="" (
python prepare_constructor_files.py recipes/* -f environment_win.yml -n psyplot_conda
) ELSE (
python prepare_constructor_files.py recipes/* -f environment_win.yml -n psyplot_conda -v %APPVEYOR_REPO_TAG_NAME%
)
- cat psyplot-conda/construct.yaml
- cat psyplot-conda/post_win.bat
- deactivate
build: false
test_script:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%ORIGPATH%"
# construct the executable
- constructor psyplot-conda
# create executable without shortcut
- cd psyplot-conda
- grep -v menuinst construct.yaml > construct2.yaml
- ps: "Move-Item -Path construct2.yaml -Destination construct.yaml -Force"
- "ECHO exclude: >> construct.yaml"
- "ECHO - menuinst >> construct.yaml"
- cat construct.yaml
- constructor .
- ps: "Get-ChildItem psyplot-conda-*-Windows-*.exe | Rename-Item -NewName { $_.name -Replace '-Windows-', '-Windows-no-shortcut-' }"
- cd ..
# deactivate conda environment and delete the old files
- ps: "Remove-Item -Recurse -Force C:\\Python36-conda"
# execute the executable
- "powershell ./ci/install_psyplot.ps1"
# export the new path and remove current miniconda installation
- "SET PATH=%PSYPLOT_PYTHON%;%PSYPLOT_PYTHON%\\Scripts;%ORIGPATH%"
# install pytest
- pip install pytest
# try to import some libraries for test
- where psyplot
- psyplot -aV
# run tests for psyplot
- py.test -v psyplot
# run tests for psyplot-gui
- py.test -v psyplot-gui -k "UrlHelpTest or Console"
# run (some) tests for psy-simple
- py.test -v psy-simple psy-simple/tests/test_plotters.py
-k "LinePlotterTest2D or Simple2DPlotterTest2D"
--ignore=psy-simple/tests/widgets
# run (some) tests for psy-maps
- py.test -v psy-maps/tests/test_plotters.py::FieldPlotterTest2D
# run tests for psy-reg
- py.test -v psy-reg -k DensityRegPlotterTest
artifacts:
- path: '**\psyplot-conda-*-Windows-*.exe'
name: installer
deploy:
description: ' '
provider: GitHub
auth_token:
secure: VxQCHxFVEha6Rr/BuEU58kSYK3K16ENzLzIgqJIOyVHGWDuf1Tszqpmz2zkEX4Wn
artifacts: installer
draft: true
force_update: true
on:
appveyor_repo_tag: true # deploy on tag push only