|
1 |
| -# As config was originally based on an example by Olivier Grisel. Thanks! |
2 |
| -# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml |
3 |
| -clone_depth: 50 |
4 | 1 |
|
5 |
| -# No reason for us to restrict the number concurrent jobs |
6 |
| -max_jobs: 100 |
7 |
| - |
8 |
| -cache: |
9 |
| - - '%LOCALAPPDATA%\pip\Cache' |
10 |
| - |
11 |
| -environment: |
12 |
| - global: |
13 |
| - MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin |
14 |
| - MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin |
15 |
| - OPENBLAS_32: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.7-win32-gcc_7_1_0.zip" |
16 |
| - OPENBLAS_64: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.7-win_amd64-gcc_7_1_0.zip" |
17 |
| - |
18 |
| - CYTHON_BUILD_DEP: Cython |
19 |
| - TEST_MODE: fast |
20 |
| - APPVEYOR_SAVE_CACHE_ON_ERROR: true |
21 |
| - APPVEYOR_SKIP_FINALIZE_ON_EXIT: true |
22 |
| - WHEELHOUSE_UPLOADER_USERNAME: travis-worker |
23 |
| - WHEELHOUSE_UPLOADER_SECRET: |
24 |
| - secure: |
25 |
| - 9s0gdDGnNnTt7hvyNpn0/ZzOMGPdwPp2SewFTfGzYk7uI+rdAN9rFq2D1gAP4NQh |
26 |
| - BUILD_COMMIT: e94cec800304a6a467cf90ce4e7d3e207770b4b4 |
27 |
| - DAILY_COMMIT: master |
28 |
| - |
29 |
| - matrix: |
30 |
| - - PYTHON: C:\Python36 |
31 |
| - PYTHON_VERSION: 3.6 |
32 |
| - PYTHON_ARCH: 32 |
33 |
| - |
34 |
| - - PYTHON: C:\Python36-x64 |
35 |
| - PYTHON_VERSION: 3.6 |
36 |
| - PYTHON_ARCH: 64 |
37 |
| - |
38 |
| - - PYTHON: C:\Python37 |
39 |
| - PYTHON_VERSION: 3.7 |
40 |
| - PYTHON_ARCH: 32 |
41 |
| - |
42 |
| - - PYTHON: C:\Python37-x64 |
43 |
| - PYTHON_VERSION: 3.7 |
44 |
| - PYTHON_ARCH: 64 |
45 |
| - |
46 |
| - - PYTHON: C:\Python38 |
47 |
| - PYTHON_VERSION: 3.8 |
48 |
| - PYTHON_ARCH: 32 |
49 |
| - |
50 |
| - - PYTHON: C:\Python38-x64 |
51 |
| - PYTHON_VERSION: 3.8 |
52 |
| - PYTHON_ARCH: 64 |
53 |
| - |
54 |
| - |
55 |
| -init: |
56 |
| - - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%" |
57 |
| - - "ECHO \"%APPVEYOR_SCHEDULED_BUILD%\"" |
58 |
| - - ps: >- |
59 |
| - if ($env:APPVEYOR_REPO_BRANCH -eq "master") { |
60 |
| - $env:CONTAINER = "pre-release" |
61 |
| - if ($env:DAILY_COMMIT) { $env:BUILD_COMMIT = $env:DAILY_COMMIT } |
62 |
| - $env:NPY_RELAXED_STRIDES_DEBUG = 1 |
63 |
| - } else { |
64 |
| - $env:CONTAINER = "wheels" |
65 |
| - $env:UPLOAD_ARGS = "--no-update-index" |
66 |
| - } |
67 |
| -install: |
68 |
| - - cmd: echo "Filesystem root:" |
69 |
| - - dir C:\ |
70 |
| - |
71 |
| - - echo "Installed SDKs:" |
72 |
| - - dir "C:/Program Files/Microsoft SDKs/Windows" |
73 |
| - |
74 |
| - # Get needed submodules |
75 |
| - - git submodule update --init |
76 |
| - |
77 |
| - # Install new Python if necessary |
78 |
| - - ps: .\multibuild\install_python.ps1 |
79 |
| - |
80 |
| - # Prepend required Python to the PATH of this build (this cannot be |
81 |
| - # done from inside the powershell script as it would require to restart |
82 |
| - # the parent CMD process). |
83 |
| - - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% |
84 |
| - |
85 |
| - # Check that we have the expected version and architecture for Python |
86 |
| - - python --version |
87 |
| - - >- |
88 |
| - python -c "import sys,platform,struct; |
89 |
| - print(sys.platform, platform.machine(), struct.calcsize('P') * 8, )" |
90 |
| -
|
91 |
| - # Download and install static "openblas.a" to PYTHON\lib |
92 |
| - - ps: | |
93 |
| - $PYTHON_ARCH = $env:PYTHON_ARCH |
94 |
| - $PYTHON = $env:PYTHON |
95 |
| - If ($PYTHON_ARCH -eq 32) { |
96 |
| - $OPENBLAS = $env:OPENBLAS_32 |
97 |
| - } Else { |
98 |
| - $OPENBLAS = $env:OPENBLAS_64 |
99 |
| - } |
100 |
| - $clnt = new-object System.Net.WebClient |
101 |
| - $file = "$(New-TemporaryFile).zip" |
102 |
| - $tmpdir = New-TemporaryFile | %{ rm $_; mkdir $_ } |
103 |
| - $destination = "$PYTHON\lib\openblas.a" |
104 |
| - echo $file |
105 |
| - echo $tmpdir |
106 |
| - echo $OPENBLAS |
107 |
| - $clnt.DownloadFile($OPENBLAS,$file) |
108 |
| - Expand-Archive $file $tmpdir |
109 |
| - rm $tmpdir\$PYTHON_ARCH\lib\*.dll.a |
110 |
| - $lib = ls $tmpdir\$PYTHON_ARCH\lib\*.a | ForEach { ls $_ } | Select-Object -first 1 |
111 |
| - echo $lib |
112 |
| - cp $lib $destination |
113 |
| - ls $destination |
114 |
| -
|
115 |
| - # Upgrade to the latest pip, setuptools, and wheel. |
116 |
| - - python -m pip install -U pip setuptools wheel |
117 |
| - |
118 |
| - # Install build requirements. |
119 |
| - - pip install "%CYTHON_BUILD_DEP%" --install-option="--no-cython-compile" |
120 |
| - |
121 |
| -build_script: |
122 |
| - - cd numpy |
123 |
| - - git checkout %BUILD_COMMIT% |
124 |
| - # Create _distributor_init.py |
125 |
| - - cd .. |
126 |
| - - python -c "import openblas_support; openblas_support.make_init('numpy/numpy')" |
127 |
| - - cd numpy |
128 |
| - # Append license text relevant for the built wheel |
129 |
| - - type ..\LICENSE_win32.txt >> LICENSE.txt |
130 |
| - - ps: | |
131 |
| - $PYTHON_ARCH = $env:PYTHON_ARCH |
132 |
| - If ($PYTHON_ARCH -eq 32) { |
133 |
| - $MINGW = $env:MINGW_32 |
134 |
| - } Else { |
135 |
| - $MINGW = $env:MINGW_64 |
136 |
| - } |
137 |
| - $env:Path += ";$MINGW" |
138 |
| - $env:NPY_NUM_BUILD_JOBS = "4" |
139 |
| - - python setup.py bdist_wheel |
140 |
| - - ps: | |
141 |
| - # Upload artifact to Appveyor immediately after build |
142 |
| - ls dist -r | Foreach-Object { |
143 |
| - appveyor PushArtifact $_.FullName |
144 |
| - pip install $_.FullName |
145 |
| - } |
146 |
| -
|
147 |
| -test_script: |
148 |
| - - pip install pytest |
149 |
| - - cd .. |
150 |
| - - python check_license.py |
151 |
| - - mkdir tmp_for_test |
152 |
| - - cd tmp_for_test |
153 |
| - - pytest --pyargs numpy |
154 |
| - - cd .. |
155 |
| - |
156 |
| -after_test: |
157 |
| - # Upload test results to Appveyor |
158 |
| - - ps: | |
159 |
| - If (Test-Path .\junit-results.xml) { |
160 |
| - (new-object net.webclient).UploadFile( |
161 |
| - "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", |
162 |
| - (Resolve-Path .\junit-results.xml) |
163 |
| - ) |
164 |
| - } |
165 |
| - $LastExitCode = 0 |
166 |
| - # Remove old or huge cache files to hopefully not exceed the 1GB cache limit. |
167 |
| - # |
168 |
| - # If the cache limit is reached, the cache will not be updated (of not even |
169 |
| - # created in the first run). So this is a trade of between keeping the cache |
170 |
| - # current and having a cache at all. |
171 |
| - # NB: This is done only `on_success` since the cache in uploaded only on |
172 |
| - # success anyway. |
173 |
| - - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete |
174 |
| - - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete |
175 |
| - - C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete |
176 |
| - # Show size of cache |
177 |
| - - C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache" |
178 |
| - |
179 |
| -on_success: |
180 |
| - # Upload the generated wheel package to Rackspace |
181 |
| - - cd numpy |
182 |
| - - pip install wheelhouse-uploader certifi |
183 |
| - - python -m wheelhouse_uploader upload |
184 |
| - --local-folder=dist |
185 |
| - %UPLOAD_ARGS% |
186 |
| - %CONTAINER% |
0 commit comments