forked from pytroll/pyresample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
81 lines (81 loc) · 2.59 KB
/
azure-pipelines.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
trigger:
branches:
include:
- '*'
tags:
include:
- v*
variables:
CIBW_BUILDING: "true"
CIBW_SKIP: "cp27-* cp34-* cp35-* pp27-* pp36-*"
CIBW_TEST_REQUIRES: "pytest pytest-sugar"
CIBW_TEST_COMMAND: "python -c \"import pyresample; from pyresample.ewa import *\""
CIBW_BUILD_VERBOSITY: "2"
CIBW_BEFORE_BUILD: "python -m pip install -U numpy Cython pip setuptools"
# Cython 0.29.x doesn't support python 3.8 so extensions were built manually
# CIBW_ENVIRONMENT: "USE_CYTHON=True"
# needed until pykdtree auto-detects this
CIBW_ENVIRONMENT_MACOS: "USE_OMP=0"
jobs:
- job: linux
pool: {vmImage: 'Ubuntu-16.04'}
steps:
- task: UsePythonVersion@0
- bash: |
git submodule update --init --recursive
python -m pip install --upgrade pip
pip install cibuildwheel twine numpy Cython
python setup.py sdist -d wheelhouse
cibuildwheel --output-dir wheelhouse .
- task: PublishPipelineArtifact@1
inputs:
path: $(System.DefaultWorkingDirectory)/wheelhouse
artifact: pyresampleDeployLinux
- job: macos
pool: {vmImage: 'macOS-10.14'}
steps:
- task: UsePythonVersion@0
- bash: |
git submodule update --init --recursive
python -m pip install --upgrade pip
pip install cibuildwheel
cibuildwheel --output-dir wheelhouse .
- task: PublishPipelineArtifact@1
inputs:
path: $(System.DefaultWorkingDirectory)/wheelhouse
artifact: pyresampleDeployMacOS
- job: windows
pool: {vmImage: 'vs2017-win2016'}
steps:
- task: UsePythonVersion@0
- bash: |
git submodule update --init --recursive
python -m pip install --upgrade pip
pip install cibuildwheel
cibuildwheel --output-dir wheelhouse .
- task: PublishPipelineArtifact@1
inputs:
path: $(System.DefaultWorkingDirectory)/wheelhouse
artifact: pyresampleDeployWindows
- job: deployPyPI
pool: {vmImage: 'Ubuntu-16.04'}
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
dependsOn:
- linux
- macos
- windows
steps:
- task: UsePythonVersion@0
- task: DownloadPipelineArtifact@2
inputs:
patterns: |
pyresampleDeployLinux/*
pyresampleDeployMacOS/*.whl
pyresampleDeployWindows/*.whl
- bash: |
cd $(Pipeline.Workspace)
python -m pip install --upgrade pip
pip install twine
twine upload -u "__token__" --skip-existing pyresampleDeployLinux/* pyresampleDeployMacOS/* pyresampleDeployWindows/*
env:
TWINE_PASSWORD: $(pypiToken)