summaryrefslogtreecommitdiff
path: root/.appveyor.yml
diff options
context:
space:
mode:
authorxoviat <xoviat@users.noreply.github.com>2017-12-22 15:18:15 -0600
committerxoviat <xoviat@users.noreply.github.com>2017-12-22 17:30:51 -0600
commit6cd348d5a830c67be62b9e71ffa30033c3ba9e7f (patch)
treeab81a029fc3490642bf7fad928e1a2090ca3ae7f /.appveyor.yml
parent59b073928f1bd521a58b756ef4293135d8bd3e29 (diff)
downloadpython-numpy-6cd348d5a830c67be62b9e71ffa30033c3ba9e7f.tar.gz
python-numpy-6cd348d5a830c67be62b9e71ffa30033c3ba9e7f.tar.bz2
python-numpy-6cd348d5a830c67be62b9e71ffa30033c3ba9e7f.zip
CI: appveyor: cleanup and add a pytest job
Diffstat (limited to '.appveyor.yml')
-rw-r--r--.appveyor.yml118
1 files changed, 42 insertions, 76 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 2356b5c2d..b2d4006b7 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -8,6 +8,10 @@ max_jobs: 100
cache:
- '%LOCALAPPDATA%\pip\Cache'
+matrix:
+ allow_failures:
+ - USE_PYTEST: true
+
environment:
global:
MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
@@ -17,8 +21,14 @@ environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
APPVEYOR_SKIP_FINALIZE_ON_EXIT: true
TEST_TIMEOUT: 1000
+ NPY_NUM_BUILD_JOBS: 4
matrix:
+ - PYTHON: C:\Python34-x64
+ PYTHON_VERSION: 3.4
+ PYTHON_ARCH: 64
+ USE_PYTEST: true
+
- PYTHON: C:\Python36
PYTHON_VERSION: 3.6
PYTHON_ARCH: 32
@@ -29,40 +39,11 @@ environment:
PYTHON_ARCH: 64
TEST_MODE: fast
- - PYTHON: C:\Python34-x64
- PYTHON_VERSION: 3.4
- PYTHON_ARCH: 64
- TEST_MODE: fast
-
- PYTHON: C:\Python36-x64
PYTHON_VERSION: 3.6
PYTHON_ARCH: 64
TEST_MODE: full
- - PYTHON: C:\Python27
- PYTHON_VERSION: 2.7
- PYTHON_ARCH: 32
- SKIP_NOTAG: true
- TEST_MODE: full
-
- - PYTHON: C:\Python34
- PYTHON_VERSION: 3.4
- PYTHON_ARCH: 32
- SKIP_NOTAG: true
- TEST_MODE: full
-
- - PYTHON: C:\Python35-x64
- PYTHON_VERSION: 3.5
- PYTHON_ARCH: 64
- SKIP_NOTAG: true
- TEST_MODE: full
-
- - PYTHON: C:\Python35
- PYTHON_VERSION: 3.5
- PYTHON_ARCH: 32
- SKIP_NOTAG: true
- TEST_MODE: full
-
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
- "ECHO \"%APPVEYOR_SCHEDULED_BUILD%\""
@@ -74,22 +55,16 @@ init:
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
- Write-Host "There are newer queued builds for this pull request, skipping build."
- Exit-AppveyorBuild
+ raise "There are newer queued builds for this pull request, skipping build."
}
- - ps: |
- If (($env:SKIP_NOTAG -eq "true") -and ($env:APPVEYOR_REPO_TAG -ne "true")) {
- Write-Host "Skipping build, not at a tag."
- Exit-AppveyorBuild
- }
install:
- # Show size of cache
- - C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
# 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;%PATH%
+ - if [%PYTHON_ARCH%]==[32] SET PATH=%MINGW_32%;%PATH% & SET OPENBLAS=%OPENBLAS_32%
+ - if [%PYTHON_ARCH%]==[64] SET PATH=%MINGW_64%;%PATH% & SET OPENBLAS=%OPENBLAS_64%
# Check that we have the expected version and architecture for Python
- python --version
@@ -101,33 +76,28 @@ install:
# Install "openblas.a" to PYTHON\lib
# Library provided by Matthew Brett at https://github.com/matthew-brett/build-openblas
- ps: |
- $PYTHON_ARCH = $env:PYTHON_ARCH
- $PYTHON = $env:PYTHON
- If ($PYTHON_ARCH -eq 32) {
- $OPENBLAS = $env:OPENBLAS_32
- } Else {
- $OPENBLAS = $env:OPENBLAS_64
- }
$clnt = new-object System.Net.WebClient
$file = "$(New-TemporaryFile).zip"
$tmpdir = New-TemporaryFile | %{ rm $_; mkdir $_ }
- $destination = "$PYTHON\lib\openblas.a"
+ $destination = "$env:PYTHON\lib\openblas.a"
echo $file
echo $tmpdir
- echo $OPENBLAS
+ echo $env:OPENBLAS
- $clnt.DownloadFile($OPENBLAS,$file)
+ $clnt.DownloadFile($env:OPENBLAS, $file)
Get-FileHash $file | Format-List
Expand-Archive $file $tmpdir
- rm $tmpdir\$PYTHON_ARCH\lib\*.dll.a
- $lib = ls $tmpdir\$PYTHON_ARCH\lib\*.a | ForEach { ls $_ } | Select-Object -first 1
+ rm $tmpdir\$env:PYTHON_ARCH\lib\*.dll.a
+ $lib = ls $tmpdir\$env:PYTHON_ARCH\lib\*.a | ForEach { ls $_ } | Select-Object -first 1
echo $lib
- cp $lib $destination
- ls $destination
+ If ($env:USE_PYTEST -ne "true") {
+ cp $lib $destination
+ ls $destination
+ }
# Upgrade to the latest pip.
- '%CMD_IN_ENV% python -m pip install -U pip setuptools wheel'
@@ -139,34 +109,30 @@ build_script:
# Here, we add MinGW to the path to be able to link an OpenBLAS.dll
# We then use the import library from the DLL to compile with MSVC
- ps: |
- $PYTHON_ARCH = $env:PYTHON_ARCH
- If ($PYTHON_ARCH -eq 32) {
- $MINGW = $env:MINGW_32
+ If ($env:USE_PYTEST -eq "true") {
+ pip install -e .
} Else {
- $MINGW = $env:MINGW_64
- }
- $env:Path += ";$MINGW"
- $env:NPY_NUM_BUILD_JOBS = "4"
- mkdir dist
- pip wheel -v -v -v --wheel-dir=dist .
-
- # For each wheel that pip has placed in the "dist" directory
- # First, upload the wheel to the "artifacts" tab and then
- # install the wheel. If we have only built numpy (as is the case here),
- # then there will be one wheel to install.
-
- # This method is more representative of what will be distributed,
- # because it actually tests what the built wheels will be rather than
- # what 'setup.py install' will do and at it uploads the wheels so that
- # they can be inspected.
-
- ls dist -r | Foreach-Object {
- appveyor PushArtifact $_.FullName
- pip install $_.FullName
+ pip wheel -v -v -v --wheel-dir=dist .
+
+ # For each wheel that pip has placed in the "dist" directory
+ # First, upload the wheel to the "artifacts" tab and then
+ # install the wheel. If we have only built numpy (as is the case here),
+ # then there will be one wheel to install.
+
+ # This method is more representative of what will be distributed,
+ # because it actually tests what the built wheels will be rather than
+ # what 'setup.py install' will do and at it uploads the wheels so that
+ # they can be inspected.
+
+ ls dist -r | Foreach-Object {
+ appveyor PushArtifact $_.FullName
+ pip install $_.FullName
+ }
}
test_script:
- - python runtests.py -v -n -m %TEST_MODE%
+ - if [%USE_PYTEST%]==[true] pytest -n3 --junitxml=junit-results.xml
+ - if [%USE_PYTEST%]==[] python runtests.py -v -n -m %TEST_MODE%
after_build:
# Remove old or huge cache files to hopefully not exceed the 1GB cache limit.