Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

jobs:

- job: Windows
pool:
vmIMage: 'VS2017-Win2016'
variables:
# openblas URLs from numpy-wheels
# appveyor / Windows config
OPENBLAS_32: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.0-win32-gcc_7_1_0.zip"
OPENBLAS_64: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.0-win_amd64-gcc_7_1_0.zip"
strategy:
maxParallel: 6
matrix:
Python36-32bit-fast:
PYTHON_VERSION: '3.6'
PYTHON_ARCH: 'x86'
TEST_MODE: fast
OPENBLAS: $(OPENBLAS_32)
BITS: 32
Python37-32bit-fast:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x86'
TEST_MODE: fast
OPENBLAS: $(OPENBLAS_32)
BITS: 32
Python27-64bit-fast:
PYTHON_VERSION: '2.7'
PYTHON_ARCH: 'x64'
TEST_MODE: fast
OPENBLAS: $(OPENBLAS_64)
BITS: 64
Python35-64bit-full:
PYTHON_VERSION: '3.5'
PYTHON_ARCH: 'x64'
TEST_MODE: full
OPENBLAS: $(OPENBLAS_64)
BITS: 64
Python36-64bit-full:
PYTHON_VERSION: '3.6'
PYTHON_ARCH: 'x64'
TEST_MODE: full
INSTALL_PICKLE5: 1
OPENBLAS: $(OPENBLAS_64)
BITS: 64
Python37-64bit-full:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: 'x64'
TEST_MODE: full
INSTALL_PICKLE5: 1
OPENBLAS: $(OPENBLAS_64)
BITS: 64
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: $(PYTHON_ARCH)
# as noted by numba project, currently need
# specific VC install for Python 2.7
- powershell: |
$wc = New-Object net.webclient
$wc.Downloadfile("https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi", "VCForPython27.msi")
Start-Process "VCForPython27.msi" /qn -Wait
displayName: 'Install VC 9.0'
condition: eq(variables['PYTHON_VERSION'], '2.7')
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- powershell: |
$wc = New-Object net.webclient
$wc.Downloadfile("$(OPENBLAS)", "openblas.zip")
$tmpdir = New-TemporaryFile | %{ rm $_; mkdir $_ }
Expand-Archive "openblas.zip" $tmpdir
$pyversion = python -c "from __future__ import print_function; import sys; print(sys.version.split()[0])"
Write-Host "Python Version: $pyversion"
$target = "C:\\hostedtoolcache\\windows\\Python\\$pyversion\\$(PYTHON_ARCH)\\lib\\openblas.a"
Write-Host "target path: $target"
cp $tmpdir\$(BITS)\lib\libopenblas_v0.3.0-gcc_7_1_0.a $target
displayName: 'Download / Install OpenBLAS'
- powershell: |
choco install -y mingw --forcex86 --force
displayName: 'Install 32-bit mingw for 32-bit builds'
condition: eq(variables['BITS'], 32)
- script: python -m pip install cython nose pytz pytest
displayName: 'Install dependencies; some are optional to avoid test skips'
# NOTE: for Windows builds it seems much more tractable to use runtests.py
# vs. manual setup.py and then runtests.py for testing only
- script: if [%INSTALL_PICKLE5%]==[1] python -m pip install pickle5
displayName: 'Install optional pickle5 backport (only for python3.6 and 3.7)'
- powershell: |
If ($(BITS) -eq 32) {
$env:NPY_DISTUTILS_APPEND_FLAGS = 1
$env:CFLAGS = "-m32"
$env:LDFLAGS = "-m32"
$env:PATH = "C:\\tools\\mingw32\\bin;" + $env:PATH
refreshenv
}
pip wheel -v -v -v --wheel-dir=dist .
ls dist -r | Foreach-Object {
pip install $_.FullName
}
displayName: 'Build cesium'