Skip to content

Commit ceffdb0

Browse files
committed
for appveyor
1 parent d988174 commit ceffdb0

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

appveyor.yml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,61 @@
11
environment:
2+
global:
3+
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
4+
# /E:ON and /V:ON options are not enabled in the batch script intepreter
5+
# See: http://stackoverflow.com/a/13751649/163740
6+
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
7+
8+
29
matrix:
310
- PYTHON: C:/Python36-x64
411
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
512

613
init:
714
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
815

16+
917
install:
10-
- "%PYTHON%\\python.exe -m pip install wheel"
18+
# If there is a newer build queued for the same PR, cancel this one.
19+
# The AppVeyor 'rollout builds' option is supposed to serve the same
20+
# purpose but it is problematic because it tends to cancel builds pushed
21+
# directly to master instead of just PR builds (or the converse).
22+
# credits: JuliaLang developers.
23+
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
24+
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
25+
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
26+
throw "There are newer queued builds for this pull request, failing early." }
27+
- ECHO "Filesystem root:"
28+
- ps: "ls \"C:/\""
29+
30+
- ECHO "Installed SDKs:"
31+
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
32+
33+
# Install Python (from the official .msi of https://python.org) and pip when
34+
# not already installed.
35+
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
36+
37+
# Prepend newly installed Python to the PATH of this build (this cannot be
38+
# done from inside the powershell script as it would require to restart
39+
# the parent CMD process).
40+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
41+
42+
# Check that we have the expected version and architecture for Python
43+
- "python --version"
44+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
45+
46+
# Upgrade to the latest version of pip to avoid it displaying warnings
47+
# about it being out of date.
48+
- "python -m pip install --upgrade pip"
49+
50+
# Install the build dependencies of the project. If some dependencies contain
51+
# compiled extensions and are not provided as pre-built wheel packages,
52+
# pip will build them from source using the MSVC compiler matching the
53+
# target Python version and architecture
1154
- "%PYTHON%/Scripts/pip.exe install numpy"
1255
- "%PYTHON%/Scripts/pip.exe install pandas"
1356
- "%PYTHON%/Scripts/pip.exe install scipy"
1457

58+
test_script:
59+
# Run the project tests and store results in .xml log
60+
- ps: |
61+
&$env:PYTHON\python -m unittest discover tests

0 commit comments

Comments
 (0)