forked from mechmotum/cyipopt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
99 lines (84 loc) · 3.18 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
environment:
# Python 3 is tested with conda-forge's Ipopt, but we also test at least the
# latest Python with the official Ipopt binaries too.
matrix:
- PYTHON: "C:\\Miniconda36-x64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
CONDA_PY: "36"
IPOPT: "ipopt"
IPOPTWINDIR: "USECONDAFORGEIPOPT"
# Test IPOPT 3.11 specifically for backwards compatibility
- PYTHON: "C:\\Miniconda37-x64"
PYTHON_VERSION: "3.7"
PYTHON_ARCH: "64"
CONDA_PY: "37"
IPOPT: "ipopt>=3.11,<3.13"
IPOPTWINDIR: "USECONDAFORGEIPOPT"
- PYTHON: "C:\\Miniconda37-x64"
PYTHON_VERSION: "3.7"
PYTHON_ARCH: "64"
CONDA_PY: "37"
IPOPT: "ipopt"
IPOPTWINDIR: "USECONDAFORGEIPOPT"
# There is not Miniconda38 on appveyor yet so use Miniconda37.
- PYTHON: "C:\\Miniconda37-x64"
PYTHON_VERSION: "3.8"
PYTHON_ARCH: "64"
CONDA_PY: "38"
IPOPT: "ipopt"
IPOPTWINDIR: "USECONDAFORGEIPOPT"
# There is not Miniconda39 on appveyor yet so use Miniconda37.
- PYTHON: "C:\\Miniconda37-x64"
PYTHON_VERSION: "3.9"
PYTHON_ARCH: "64"
CONDA_PY: "39"
IPOPT: "ipopt"
IPOPTWINDIR: "USECONDAFORGEIPOPT"
# There is not Miniconda38 on appveyor yet so use Miniconda37.
- PYTHON: "C:\\Miniconda37-x64"
PYTHON_VERSION: "3.8"
PYTHON_ARCH: "64"
CONDA_PY: "38"
IPOPT: ""
IPOPTWINDIR: "C:\\projects\\cyipopt\\Ipopt-3.13.3-win64-msvs2019-md"
install:
- ECHO "Filesystem root:"
- ps: "ls \"C:/\""
- ECHO "Installed SDKs:"
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
# This upates conda and installs the necessary packages.
- "CALL %PYTHON%\\Scripts\\activate.bat base"
- "%PYTHON%\\Scripts\\conda.exe clean --yes --all"
- "%PYTHON%\\Scripts\\conda.exe update --yes conda"
- "%PYTHON%\\Scripts\\conda.exe update --yes --all"
- "%PYTHON%\\Scripts\\conda.exe config --prepend channels conda-forge"
- "%PYTHON%\\Scripts\\conda.exe install --yes python=%PYTHON_VERSION% %IPOPT%"
- "%PYTHON%\\Scripts\\conda.exe install --yes --freeze-installed --file requirements.txt"
- "%PYTHON%\\Scripts\\conda.exe update -y --all"
- "%PYTHON%\\Scripts\\conda.exe info"
- "%PYTHON%\\Scripts\\conda.exe list"
# This downloads and extracts a precomplied IPOPT for Windows.
- ps: >-
if(!($env:IPOPT -eq "ipopt ")){
Start-FileDownload 'https://github.com/coin-or/Ipopt/releases/download/releases%2F3.13.3/Ipopt-3.13.3-win64-msvs2019-md.zip'
7z x Ipopt-3.13.3-win64-msvs2019-md.zip
ls
}
# 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;%PYTHON%\\Library\\bin;%PATH%"
# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
build: false
test_script:
# Test package install
- "python setup.py install"
- 'python -c "import cyipopt"'
# Run test suite
- "conda.exe install --yes pytest>=3.3.2"
- "pytest"
- "conda.exe install --yes scipy>=0.19.1"
- "pytest"